@alfadocs/ui-kit 0.89.0 → 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-UiZQze4P.js → antenatal-schedule-timeline-BMMpi2lb.js} +17 -17
  2. package/dist/_chunks/{appointment-timeline-CwpbQGC1.js → appointment-timeline-BB-c1LeR.js} +2 -2
  3. package/dist/_chunks/{ar-C9FRRqJs.js → ar-THMLfSoN.js} +22 -22
  4. package/dist/_chunks/{booking-DEwmDprH.js → booking-BSpSMmJ2.js} +4 -4
  5. package/dist/_chunks/{cycle-calculator-DXSNIWFk.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-D9B6hg15.js → date-picker-variants-eL6HjWvw.js} +966 -841
  8. package/dist/_chunks/date-range-picker-Cc4DLAL2.js +824 -0
  9. package/dist/_chunks/{date-time-picker-BU-j0qj4.js → date-time-picker-695QvBGj.js} +2 -2
  10. package/dist/_chunks/{de-C3_KZ6mR.js → de-DmZ-8rTN.js} +4 -4
  11. package/dist/_chunks/{due-date-calculator-BR_GuqHH.js → due-date-calculator-BEcdoy_E.js} +3 -3
  12. package/dist/_chunks/{el-v9xDKHgu.js → el-Bela9mxs.js} +6 -6
  13. package/dist/_chunks/{es-Lgmjq9Rp.js → es-BNncHKex.js} +10 -10
  14. package/dist/_chunks/{fr-INS1OD7m.js → fr-CH8ADfhN.js} +12 -12
  15. package/dist/_chunks/{gestational-age-calculator-DBIcxfjP.js → gestational-age-calculator-CuGkVqKp.js} +5 -5
  16. package/dist/_chunks/{hcg-doubling-BgCkds8R.js → hcg-doubling-fZ6qQN08.js} +2 -2
  17. package/dist/_chunks/{hi-BUYtlosF.js → hi-Bppfxp8l.js} +16 -16
  18. package/dist/_chunks/{isSameWeek-BUNsv4OO.js → isSameWeek-CK4HS9lH.js} +2 -2
  19. package/dist/_chunks/{it-VfsdUqeV.js → it-B4ySaRyK.js} +24 -24
  20. package/dist/_chunks/{ja-Dfk9qwzE.js → ja-CGF6Io9P.js} +12 -12
  21. package/dist/_chunks/{link-cell-renderer-BzITwSXq.js → link-cell-renderer-DQjZeoAr.js} +214 -197
  22. package/dist/_chunks/{nl-Crxwg0IZ.js → nl-DuShqwuV.js} +12 -12
  23. package/dist/_chunks/parse-DvA97ro9.js +1601 -0
  24. package/dist/_chunks/{patient-details-Dggsz-ki.js → patient-details-DrhlTrLf.js} +2 -2
  25. package/dist/_chunks/{patient-table-ps4byVwA.js → patient-table-DU_zFZoq.js} +2 -2
  26. package/dist/_chunks/{pl-IdHtxWTl.js → pl-CKQwX9Fk.js} +22 -22
  27. package/dist/_chunks/{pregnancy-dating-CvIRwWaG.js → pregnancy-dating-BdFl-rB1.js} +5 -5
  28. package/dist/_chunks/{pt-CY2m2bBz.js → pt-_njpXyOZ.js} +16 -16
  29. package/dist/_chunks/{radiograph-panel.agent-C93AXgtV.js → radiograph-panel.agent-rnrQZtK3.js} +3 -3
  30. package/dist/_chunks/{ro-qoxLkXED.js → ro-3X6_4FcN.js} +14 -14
  31. package/dist/_chunks/{ru-BVZlxoKf.js → ru-bAcgmnS-.js} +20 -20
  32. package/dist/_chunks/{sq--eT8hIiD.js → sq-jYFqr4Ga.js} +6 -6
  33. package/dist/_chunks/subDays-BcNi04uf.js +8 -0
  34. package/dist/_chunks/{sv-BGNQ5gX6.js → sv-BSGEJ-8B.js} +10 -10
  35. package/dist/_chunks/{tr-B2NEu6Gy.js → tr-CTpgUtw6.js} +14 -14
  36. package/dist/_chunks/{zh-CN-DClT1wDk.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 +23 -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 +79 -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-ffmyjvlI.js +0 -1845
  117. package/dist/_chunks/date-range-picker-DSOH50-f.js +0 -325
  118. package/dist/_chunks/subDays-fEHRx4hg.js +0 -8
@@ -1,325 +0,0 @@
1
- import { jsx as n, jsxs as g } from "react/jsx-runtime";
2
- import { forwardRef as U, useState as M, useRef as X, useCallback as Z, useMemo as z, useImperativeHandle as ee } from "react";
3
- import { useTranslation as te } from "react-i18next";
4
- import * as f from "@radix-ui/react-popover";
5
- import { u as ae } from "./use-controllable-state-BiY4xTzM.js";
6
- import { u as ne } from "./form-field-context-B3APVHKx.js";
7
- import { u as re } from "./registry-DvAUVLHh.js";
8
- import { b as se, u as oe, g as ie, c as de, e as T, s as W, d as ce, f as le, h as v, j as pe, k as me, t as ue, p as ge, D as fe, C as he, l as ye, m as ke } from "./date-picker-variants-D9B6hg15.js";
9
- import { s as R } from "./subDays-fEHRx4hg.js";
10
- import { C as be } from "./calendar-days-BGWklvE-.js";
11
- function ve(a, s, i) {
12
- return se(a, -1, i);
13
- }
14
- const Re = {
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
- }, De = U(
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
- chrome: j = "input",
123
- disabled: F,
124
- placeholder: L,
125
- className: A,
126
- id: B
127
- }, H) => {
128
- const { t: r, i18n: w } = te(), c = ne(), y = B ?? c.id, P = c.disabled || F, _ = c.invalid ? "error" : "default", o = oe(w.language), k = ie(w.language), $ = L ?? r("inputs.dateRangePicker.placeholder", "Select date range"), [q, C] = ae({
129
- value: a,
130
- defaultValue: s ?? {},
131
- onChange: i
132
- }), t = q ?? {}, [p, m] = M(!1), [J, O] = M(t.from ?? /* @__PURE__ */ new Date()), Y = X(null), d = Z(
133
- (e) => {
134
- C(e);
135
- },
136
- [C]
137
- ), E = de(l, V), S = [
138
- {
139
- label: r("inputs.dateRangePicker.presets.today", "Today"),
140
- range: () => {
141
- const e = /* @__PURE__ */ new Date();
142
- return { from: e, to: e };
143
- }
144
- },
145
- {
146
- label: r("inputs.dateRangePicker.presets.yesterday", "Yesterday"),
147
- range: () => {
148
- const e = R(/* @__PURE__ */ new Date(), 1);
149
- return { from: e, to: e };
150
- }
151
- },
152
- {
153
- label: r("inputs.dateRangePicker.presets.last7", "Last 7 days"),
154
- range: () => ({
155
- from: R(/* @__PURE__ */ new Date(), 6),
156
- to: /* @__PURE__ */ new Date()
157
- })
158
- },
159
- {
160
- label: r("inputs.dateRangePicker.presets.thisWeek", "This week"),
161
- range: () => ({
162
- from: W(/* @__PURE__ */ new Date(), { locale: o }),
163
- to: T(/* @__PURE__ */ new Date(), { locale: o })
164
- })
165
- },
166
- {
167
- label: r("inputs.dateRangePicker.presets.lastWeek", "Last week"),
168
- range: () => {
169
- const e = ve(/* @__PURE__ */ new Date());
170
- return {
171
- from: W(e, { locale: o }),
172
- to: T(e, { locale: o })
173
- };
174
- }
175
- },
176
- {
177
- label: r("inputs.dateRangePicker.presets.thisMonth", "This month"),
178
- range: () => ({
179
- from: le(/* @__PURE__ */ new Date()),
180
- to: ce(/* @__PURE__ */ new Date())
181
- })
182
- },
183
- {
184
- label: r("inputs.dateRangePicker.presets.last30", "Last 30 days"),
185
- range: () => ({
186
- from: R(/* @__PURE__ */ new Date(), 29),
187
- to: /* @__PURE__ */ new Date()
188
- })
189
- }
190
- ], x = h ? K ? [...S, ...h] : h : S, G = (e) => {
191
- d(e ? { from: e.from, to: e.to } : {});
192
- }, Q = (e) => {
193
- const u = e.range();
194
- d(u), O(u.from), m(!1);
195
- }, N = (() => {
196
- if (t.from && t.to) {
197
- const e = v(t.from, k, { locale: o }), u = v(t.to, k, { locale: o });
198
- return `${e} – ${u}`;
199
- }
200
- return t.from ? v(t.from, k, { locale: o }) : "";
201
- })(), I = (() => {
202
- if (t.from && t.to) {
203
- const e = pe(t.to, t.from) + 1;
204
- return r("inputs.dateRangePicker.days", "{{count}} days", {
205
- count: e
206
- });
207
- }
208
- return "";
209
- })(), b = z(
210
- () => ({
211
- getRange: () => t,
212
- setRange: (e) => d(e),
213
- clear: () => d({}),
214
- isOpen: () => p,
215
- open: () => m(!0),
216
- close: () => m(!1)
217
- }),
218
- [t, d, p]
219
- );
220
- return ee(H, () => b, [b]), re(Re, b, y), /* @__PURE__ */ n(f.Root, { open: p, onOpenChange: m, children: /* @__PURE__ */ g(
221
- "div",
222
- {
223
- className: A,
224
- "data-component": "date-range-picker",
225
- "data-component-id": y,
226
- children: [
227
- /* @__PURE__ */ n(f.Trigger, { asChild: !0, disabled: P, children: /* @__PURE__ */ g(
228
- "button",
229
- {
230
- ref: Y,
231
- id: y,
232
- type: "button",
233
- disabled: P,
234
- "aria-describedby": c.describedBy || void 0,
235
- "aria-invalid": c.invalid || void 0,
236
- "aria-haspopup": "dialog",
237
- "aria-expanded": p,
238
- className: ue({ size: D, tone: _, chrome: j }),
239
- children: [
240
- /* @__PURE__ */ n(
241
- "span",
242
- {
243
- className: [
244
- // Truncate so a long value/placeholder ellipsises instead of
245
- // running under the absolutely-positioned calendar icon (the
246
- // trigger reserves the icon's space via `pe-10`). `min-w-0`
247
- // lets the flex child shrink below its content width so
248
- // `truncate` engages.
249
- "ds:min-w-0 ds:flex-1 ds:truncate ds:text-start",
250
- N ? "ds:text-foreground" : "ds:text-muted-foreground"
251
- ].join(" "),
252
- children: N || $
253
- }
254
- ),
255
- /* @__PURE__ */ n(
256
- "span",
257
- {
258
- "aria-hidden": "true",
259
- className: me({ size: D }),
260
- children: /* @__PURE__ */ n(be, {})
261
- }
262
- )
263
- ]
264
- }
265
- ) }),
266
- /* @__PURE__ */ n(f.Portal, { children: /* @__PURE__ */ n(
267
- f.Content,
268
- {
269
- sideOffset: 4,
270
- align: "start",
271
- className: ke(),
272
- children: /* @__PURE__ */ g("div", { className: "ds:flex ds:gap-[var(--spacing-md)]", children: [
273
- 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(
274
- "button",
275
- {
276
- type: "button",
277
- onClick: () => Q(e),
278
- className: ge(),
279
- children: e.label
280
- },
281
- e.label
282
- )) }) : null,
283
- /* @__PURE__ */ g("div", { children: [
284
- /* @__PURE__ */ n(
285
- fe,
286
- {
287
- mode: "range",
288
- selected: t.from ? { from: t.from, to: t.to } : void 0,
289
- onSelect: G,
290
- month: J,
291
- onMonthChange: O,
292
- numberOfMonths: 2,
293
- disabled: E,
294
- locale: o,
295
- showOutsideDays: !0,
296
- fixedWeeks: !0,
297
- pagedNavigation: !0,
298
- classNames: ye,
299
- components: { Chevron: he }
300
- }
301
- ),
302
- I ? /* @__PURE__ */ n(
303
- "div",
304
- {
305
- role: "status",
306
- "aria-live": "polite",
307
- className: "type-body-sm ds:text-muted-foreground ds:mt-[var(--spacing-sm)] ds:text-center",
308
- children: I
309
- }
310
- ) : null
311
- ] })
312
- ] })
313
- }
314
- ) })
315
- ]
316
- }
317
- ) });
318
- }
319
- );
320
- De.displayName = "DateRangePicker";
321
- export {
322
- De as D,
323
- Re as d
324
- };
325
- //# sourceMappingURL=date-range-picker-DSOH50-f.js.map
@@ -1,8 +0,0 @@
1
- import { a as o } from "./date-picker-variants-D9B6hg15.js";
2
- function n(a, s, r) {
3
- return o(a, -s, r);
4
- }
5
- export {
6
- n as s
7
- };
8
- //# sourceMappingURL=subDays-fEHRx4hg.js.map