@alfadocs/ui-kit 1.3.13 → 1.4.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 (185) hide show
  1. package/dist/_chunks/agenda-card.agent-Cb5tuEh3.js +28 -0
  2. package/dist/_chunks/{alia-sidebar-DzNz1gDf.js → alia-sidebar-DSBZMick.js} +3 -3
  3. package/dist/_chunks/{anamnesis-i18n-CfC0qYzy.js → anamnesis-i18n-BA631X4t.js} +2209 -2144
  4. package/dist/_chunks/{antenatal-schedule-timeline-BMMpi2lb.js → antenatal-schedule-timeline-u8TsS2QJ.js} +27 -26
  5. package/dist/_chunks/{appointment-timeline-B630OT_J.js → appointment-timeline-Bqf1sTU5.js} +2 -2
  6. package/dist/_chunks/{ar-THMLfSoN.js → ar-BR1FGFP2.js} +14 -14
  7. package/dist/_chunks/{bmi-calculator-CM0-G2mg.js → bmi-calculator-CpyY13MV.js} +2 -2
  8. package/dist/_chunks/{booking-DjNbd7C1.js → booking-BjsA7j1-.js} +699 -688
  9. package/dist/_chunks/calculator-dialog-12d3Sxaz.js +48 -0
  10. package/dist/_chunks/{care-plan-card-1G_f4I5s.js → care-plan-card-BvQy366X.js} +3 -3
  11. package/dist/_chunks/{care-plan-entry-card-DmBsffHS.js → care-plan-entry-card-apk_5B3O.js} +2 -2
  12. package/dist/_chunks/{chat-container-HlFnoEIl.js → chat-container-CYYego1W.js} +105 -81
  13. package/dist/_chunks/cycle-calculator-B7fyH-h4.js +425 -0
  14. package/dist/_chunks/{date-picker-ZHejTVAJ.js → date-picker-Bp64zk2p.js} +19 -19
  15. package/dist/_chunks/date-picker-variants-pKAJfnWr.js +2089 -0
  16. package/dist/_chunks/{date-range-picker-pEG3Ln3i.js → date-range-picker-CDrZ8Zh0.js} +27 -27
  17. package/dist/_chunks/{date-time-picker-695QvBGj.js → date-time-picker-DafkGDGO.js} +10 -10
  18. package/dist/_chunks/{de-DmZ-8rTN.js → de-3iM4rGqo.js} +7 -7
  19. package/dist/_chunks/{document-preview-D3gg4MXB.js → document-preview-DOrsqiN1.js} +2 -2
  20. package/dist/_chunks/due-date-calculator-CnkbbAej.js +571 -0
  21. package/dist/_chunks/{editor-overlay-DE3esyio.js → editor-overlay-B1tr2i7B.js} +22 -21
  22. package/dist/_chunks/{el-Bela9mxs.js → el-C96rGJvU.js} +2 -2
  23. package/dist/_chunks/{es-BNncHKex.js → es-Cxiqjx8r.js} +12 -12
  24. package/dist/_chunks/fetal-weight-avlj-l-S.js +223 -0
  25. package/dist/_chunks/format-4HNwNGrN.js +1315 -0
  26. package/dist/_chunks/{fr-CH8ADfhN.js → fr-Bhr6SYKj.js} +21 -21
  27. package/dist/_chunks/{freemium-paywall-C_Ue6wxU.js → freemium-paywall-DRDdWuOg.js} +3 -3
  28. package/dist/_chunks/gestational-age-calculator-BljY_DVJ.js +488 -0
  29. package/dist/_chunks/hcg-doubling-Cv_vH61p.js +312 -0
  30. package/dist/_chunks/header-settings-Cn5fPXCE.js +335 -0
  31. package/dist/_chunks/{hi-Bppfxp8l.js → hi-BxXX26d_.js} +12 -12
  32. package/dist/_chunks/isSameWeek-B73MagWB.js +13 -0
  33. package/dist/_chunks/{it-B4ySaRyK.js → it-Xmjomvyj.js} +24 -24
  34. package/dist/_chunks/{ja-CGF6Io9P.js → ja-mfZvt1ZV.js} +16 -16
  35. package/dist/_chunks/{link-cell-renderer-C5XLwVXQ.js → link-cell-renderer-CJ_gk7gl.js} +3 -3
  36. package/dist/_chunks/{locale-picker-BfBUdT1m.js → locale-picker-D9Kv2zrK.js} +153 -132
  37. package/dist/_chunks/map-view-2yZCQW2l.js +445 -0
  38. package/dist/_chunks/{marketplace-app-shell-DwcFMxzp.js → marketplace-app-shell-BLRvg-M0.js} +49 -40
  39. package/dist/_chunks/{nl-DuShqwuV.js → nl-DDs-KEnD.js} +15 -15
  40. package/dist/_chunks/{notes-panel-DPsgB4Mv.js → notes-panel-CiFN3sLW.js} +2 -2
  41. package/dist/_chunks/{number-input-DrozbZAU.js → number-input-DOe5VYei.js} +64 -64
  42. package/dist/_chunks/{optical-prescription-BDHJr8Zz.js → optical-prescription-CRemE8fL.js} +2 -2
  43. package/dist/_chunks/{parse-DvA97ro9.js → parse-JqixfsU0.js} +43 -43
  44. package/dist/_chunks/parseISO-fOGpHKXm.js +120 -0
  45. package/dist/_chunks/{patient-details-DqjjwPmt.js → patient-details-CpunD0qx.js} +3 -3
  46. package/dist/_chunks/{patient-table-BmIDrLIS.js → patient-table-2eWx-Rrk.js} +2 -2
  47. package/dist/_chunks/{payment-form-h-BZ8onk.js → payment-form-Ds1I9KqB.js} +308 -231
  48. package/dist/_chunks/{pdf-viewer-Ddx-T053.js → pdf-viewer-DUIsV9s5.js} +429 -369
  49. package/dist/_chunks/{pl-CKQwX9Fk.js → pl-BYYMnEWP.js} +18 -18
  50. package/dist/_chunks/{practice-results-B-HPc13W.js → practice-results-SjCniMd2.js} +2 -2
  51. package/dist/_chunks/pregnancy-dating-BmpHScZ0.js +770 -0
  52. package/dist/_chunks/pregnancy-weight-gain-B5KSJzdc.js +553 -0
  53. package/dist/_chunks/progress-CK8otcQ-.js +343 -0
  54. package/dist/_chunks/{pt-_njpXyOZ.js → pt-BSPnVrQ7.js} +20 -20
  55. package/dist/_chunks/{radiograph-panel.agent-BQZ64Riy.js → radiograph-panel.agent-CtFtNMzk.js} +3 -3
  56. package/dist/_chunks/{rich-text-editor-CfeXPPWs.js → rich-text-editor-BedTpWzL.js} +2 -2
  57. package/dist/_chunks/{ro-3X6_4FcN.js → ro-BbiylGmG.js} +14 -14
  58. package/dist/_chunks/{ru-bAcgmnS-.js → ru-BX_qsV67.js} +14 -14
  59. package/dist/_chunks/{session-countdown-Bc70VXN1.js → session-countdown-BL-Psg8u.js} +2 -2
  60. package/dist/_chunks/{sign-document-CW_ByDUh.js → sign-document-jF4fZDJ5.js} +2 -2
  61. package/dist/_chunks/slot-grid-DNiUcXy2.js +640 -0
  62. package/dist/_chunks/{sparkline-BTY4B5tv.js → sparkline-BmGcEyZO.js} +209 -164
  63. package/dist/_chunks/{sq-jYFqr4Ga.js → sq-i9UOk4P7.js} +10 -10
  64. package/dist/_chunks/subDays-CAUv47M1.js +8 -0
  65. package/dist/_chunks/{sv-BSGEJ-8B.js → sv-CpTdtmDQ.js} +8 -8
  66. package/dist/_chunks/{tab-bar-Axhk6xzx.js → tab-bar-BYESZINM.js} +83 -77
  67. package/dist/_chunks/task-card.agent-CF2N_uu4.js +29 -0
  68. package/dist/_chunks/{tr-CTpgUtw6.js → tr-DXG2QN1K.js} +17 -17
  69. package/dist/_chunks/{unit-converter-COgkN7YP.js → unit-converter-CHPDuV7W.js} +2 -2
  70. package/dist/_chunks/{warning-stack-BtjmJChC.js → warning-stack-B7t_8jRE.js} +42 -37
  71. package/dist/_chunks/{zh-CN-BgM0Io2O.js → zh-CN-vPkPEK6H.js} +18 -18
  72. package/dist/agent-catalog.json +6426 -3382
  73. package/dist/agent-i18n/en.json +234 -15
  74. package/dist/components/agenda-card/index.js +1 -1
  75. package/dist/components/appointment-timeline/index.js +1 -1
  76. package/dist/components/bmi-calculator/index.js +1 -1
  77. package/dist/components/booking/index.js +1 -1
  78. package/dist/components/calculator-dialog/index.js +1 -1
  79. package/dist/components/care-plan-card/index.js +1 -1
  80. package/dist/components/care-plan-entry-card/index.js +1 -1
  81. package/dist/components/chat-container/chat-container.d.ts +14 -0
  82. package/dist/components/chat-container/index.js +1 -1
  83. package/dist/components/cycle-calculator/cycle-calculator.agent.d.ts +4 -0
  84. package/dist/components/cycle-calculator/cycle-calculator.d.ts +42 -0
  85. package/dist/components/cycle-calculator/index.d.ts +1 -1
  86. package/dist/components/cycle-calculator/index.js +1 -1
  87. package/dist/components/data-table/index.js +1 -1
  88. package/dist/components/date-picker/index.js +1 -1
  89. package/dist/components/date-range-picker/index.js +1 -1
  90. package/dist/components/date-time-picker/index.js +1 -1
  91. package/dist/components/document-preview/index.js +1 -1
  92. package/dist/components/due-date-calculator/due-date-calculator.agent.d.ts +4 -0
  93. package/dist/components/due-date-calculator/due-date-calculator.d.ts +61 -1
  94. package/dist/components/due-date-calculator/index.d.ts +1 -1
  95. package/dist/components/due-date-calculator/index.js +2 -2
  96. package/dist/components/editor-overlay/editor-overlay.d.ts +7 -1
  97. package/dist/components/editor-overlay/index.js +1 -1
  98. package/dist/components/fetal-weight/fetal-weight.agent.d.ts +4 -0
  99. package/dist/components/fetal-weight/fetal-weight.d.ts +26 -0
  100. package/dist/components/fetal-weight/index.d.ts +1 -1
  101. package/dist/components/fetal-weight/index.js +1 -1
  102. package/dist/components/freemium-paywall/index.js +1 -1
  103. package/dist/components/gestational-age-calculator/gestational-age-calculator.agent.d.ts +4 -0
  104. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +44 -2
  105. package/dist/components/gestational-age-calculator/index.d.ts +1 -1
  106. package/dist/components/gestational-age-calculator/index.js +1 -1
  107. package/dist/components/hcg-doubling/hcg-doubling.agent.d.ts +4 -0
  108. package/dist/components/hcg-doubling/hcg-doubling.d.ts +30 -0
  109. package/dist/components/hcg-doubling/index.d.ts +1 -1
  110. package/dist/components/hcg-doubling/index.js +1 -1
  111. package/dist/components/header-settings/header-settings.d.ts +13 -1
  112. package/dist/components/header-settings/index.js +1 -1
  113. package/dist/components/locale-picker/index.js +1 -1
  114. package/dist/components/locale-picker/locale-picker.d.ts +9 -0
  115. package/dist/components/map-view/index.js +1 -1
  116. package/dist/components/map-view/map-view.d.ts +22 -0
  117. package/dist/components/notes-panel/index.js +1 -1
  118. package/dist/components/number-input/index.js +1 -1
  119. package/dist/components/number-input/number-input.d.ts +2 -1
  120. package/dist/components/optical-prescription/index.js +1 -1
  121. package/dist/components/patient-details/index.js +1 -1
  122. package/dist/components/patient-table/index.js +1 -1
  123. package/dist/components/payment-form/index.d.ts +1 -1
  124. package/dist/components/payment-form/index.js +1 -1
  125. package/dist/components/payment-form/payment-form.d.ts +32 -1
  126. package/dist/components/pdf-viewer/index.js +1 -1
  127. package/dist/components/pdf-viewer/pdf-viewer.d.ts +13 -0
  128. package/dist/components/practice-results/index.js +1 -1
  129. package/dist/components/pregnancy-dating/index.d.ts +1 -1
  130. package/dist/components/pregnancy-dating/index.js +1 -1
  131. package/dist/components/pregnancy-dating/pregnancy-dating.agent.d.ts +4 -0
  132. package/dist/components/pregnancy-dating/pregnancy-dating.d.ts +65 -1
  133. package/dist/components/pregnancy-weight-gain/index.d.ts +2 -1
  134. package/dist/components/pregnancy-weight-gain/index.js +6 -5
  135. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.agent.d.ts +4 -0
  136. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +35 -0
  137. package/dist/components/progress/index.js +1 -1
  138. package/dist/components/progress/progress.d.ts +13 -0
  139. package/dist/components/radiograph-panel/index.js +1 -1
  140. package/dist/components/rich-text-editor/index.js +1 -1
  141. package/dist/components/session-countdown/index.js +1 -1
  142. package/dist/components/sign-document/index.js +1 -1
  143. package/dist/components/slot-grid/index.d.ts +2 -1
  144. package/dist/components/slot-grid/index.js +5 -4
  145. package/dist/components/slot-grid/slot-grid.agent.d.ts +4 -0
  146. package/dist/components/slot-grid/slot-grid.d.ts +34 -0
  147. package/dist/components/sparkline/index.js +1 -1
  148. package/dist/components/sparkline/sparkline.d.ts +10 -0
  149. package/dist/components/tab-bar/index.js +1 -1
  150. package/dist/components/tab-bar/tab-bar.d.ts +13 -0
  151. package/dist/components/task-card/index.js +1 -1
  152. package/dist/components/unit-converter/index.js +1 -1
  153. package/dist/components/warning-stack/index.js +1 -1
  154. package/dist/index.js +630 -627
  155. package/dist/patterns/alia-assistant/index.js +1 -1
  156. package/dist/patterns/anamnesis/anamnesis-derive.d.ts +27 -8
  157. package/dist/patterns/anamnesis/anamnesis-format.d.ts +11 -3
  158. package/dist/patterns/anamnesis/anamnesis-highlight.d.ts +6 -0
  159. package/dist/patterns/anamnesis/anamnesis-questionnaire.d.ts +23 -9
  160. package/dist/patterns/anamnesis/anamnesis-types.d.ts +7 -0
  161. package/dist/patterns/anamnesis/anamnesis.d.ts +16 -7
  162. package/dist/patterns/anamnesis/index.d.ts +3 -2
  163. package/dist/patterns/anamnesis/index.js +7 -6
  164. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  165. package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +6 -0
  166. package/dist/tokens.css +1 -1
  167. package/package.json +1 -1
  168. package/dist/_chunks/agenda-card.agent-mTCrkKSZ.js +0 -27
  169. package/dist/_chunks/calculator-dialog-DuXMQSdm.js +0 -40
  170. package/dist/_chunks/cycle-calculator-BwqYVPB4.js +0 -252
  171. package/dist/_chunks/date-picker-variants-eL6HjWvw.js +0 -3363
  172. package/dist/_chunks/due-date-calculator-CwfsFd3T.js +0 -256
  173. package/dist/_chunks/fetal-weight-ePlLjJPc.js +0 -122
  174. package/dist/_chunks/gestational-age-calculator-DdgbH69Z.js +0 -311
  175. package/dist/_chunks/hcg-doubling-BBqD2wI2.js +0 -170
  176. package/dist/_chunks/header-settings--pjYOe6g.js +0 -284
  177. package/dist/_chunks/isSameDay-DUEiAT0G.js +0 -39
  178. package/dist/_chunks/isSameWeek-CK4HS9lH.js +0 -14
  179. package/dist/_chunks/map-view-CsaHfoo6.js +0 -378
  180. package/dist/_chunks/pregnancy-dating-DzYTlBkT.js +0 -421
  181. package/dist/_chunks/pregnancy-weight-gain-O6J0sUIi.js +0 -322
  182. package/dist/_chunks/progress-DA413-zn.js +0 -299
  183. package/dist/_chunks/slot-grid-CQSULZjd.js +0 -502
  184. package/dist/_chunks/subDays-BcNi04uf.js +0 -8
  185. package/dist/_chunks/task-card.agent-Bt14CzUd.js +0 -25
@@ -1,502 +0,0 @@
1
- import { jsx as i, jsxs as C } from "react/jsx-runtime";
2
- import { forwardRef as pe, useId as he, useState as ve, useCallback as S } from "react";
3
- import { c as b } from "./index-D2ZczOXr.js";
4
- import { useTranslation as be } from "react-i18next";
5
- import { B as Y } from "./button-CPGiR_bH.js";
6
- import { I as A } from "./icon-button-C_kbcd7I.js";
7
- import { E as xe } from "./empty-state-CrLsi0XI.js";
8
- import { S as B } from "./skeleton-CZbwyJAA.js";
9
- import { t as W, c as De, m as K, a as Z, i as ye } from "./isSameDay-DUEiAT0G.js";
10
- function Ne(t, e) {
11
- const s = () => De(e == null ? void 0 : e.in, NaN), n = Te(t);
12
- let d;
13
- if (n.date) {
14
- const o = Ie(n.date, 2);
15
- d = ze(o.restDateString, o.year);
16
- }
17
- if (!d || isNaN(+d)) return s();
18
- const l = +d;
19
- let u = 0, f;
20
- if (n.time && (u = Le(n.time), isNaN(u)))
21
- return s();
22
- if (n.timezone) {
23
- if (f = Se(n.timezone), isNaN(f)) return s();
24
- } else {
25
- const o = new Date(l + u), x = W(0, e == null ? void 0 : e.in);
26
- return x.setFullYear(
27
- o.getUTCFullYear(),
28
- o.getUTCMonth(),
29
- o.getUTCDate()
30
- ), x.setHours(
31
- o.getUTCHours(),
32
- o.getUTCMinutes(),
33
- o.getUTCSeconds(),
34
- o.getUTCMilliseconds()
35
- ), x;
36
- }
37
- return W(l + u + f, e == null ? void 0 : e.in);
38
- }
39
- const k = {
40
- dateTimeDelimiter: /[T ]/,
41
- timeZoneDelimiter: /[Z ]/i,
42
- timezone: /([Z+-].*)$/
43
- }, we = /^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/, Ce = /^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/, ke = /^([+-])(\d{2})(?::?(\d{2}))?$/;
44
- function Te(t) {
45
- const e = {}, s = t.split(k.dateTimeDelimiter);
46
- let a;
47
- if (s.length > 2)
48
- return e;
49
- if (/:/.test(s[0]) ? a = s[0] : (e.date = s[0], a = s[1], k.timeZoneDelimiter.test(e.date) && (e.date = t.split(k.timeZoneDelimiter)[0], a = t.substr(
50
- e.date.length,
51
- t.length
52
- ))), a) {
53
- const n = k.timezone.exec(a);
54
- n ? (e.time = a.replace(n[1], ""), e.timezone = n[1]) : e.time = a;
55
- }
56
- return e;
57
- }
58
- function Ie(t, e) {
59
- const s = new RegExp(
60
- "^(?:(\\d{4}|[+-]\\d{" + (4 + e) + "})|(\\d{2}|[+-]\\d{" + (2 + e) + "})$)"
61
- ), a = t.match(s);
62
- if (!a) return { year: NaN, restDateString: "" };
63
- const n = a[1] ? parseInt(a[1]) : null, d = a[2] ? parseInt(a[2]) : null;
64
- return {
65
- year: d === null ? n : d * 100,
66
- restDateString: t.slice((a[1] || a[2]).length)
67
- };
68
- }
69
- function ze(t, e) {
70
- if (e === null) return /* @__PURE__ */ new Date(NaN);
71
- const s = t.match(we);
72
- if (!s) return /* @__PURE__ */ new Date(NaN);
73
- const a = !!s[4], n = D(s[1]), d = D(s[2]) - 1, l = D(s[3]), u = D(s[4]), f = D(s[5]) - 1;
74
- if (a)
75
- return je(e, u, f) ? $e(e, u, f) : /* @__PURE__ */ new Date(NaN);
76
- {
77
- const o = /* @__PURE__ */ new Date(0);
78
- return !Ge(e, d, l) || !Ve(e, n) ? /* @__PURE__ */ new Date(NaN) : (o.setUTCFullYear(e, d, Math.max(n, l)), o);
79
- }
80
- }
81
- function D(t) {
82
- return t ? parseInt(t) : 1;
83
- }
84
- function Le(t) {
85
- const e = t.match(Ce);
86
- if (!e) return NaN;
87
- const s = $(e[1]), a = $(e[2]), n = $(e[3]);
88
- return Ee(s, a, n) ? s * K + a * Z + n * 1e3 : NaN;
89
- }
90
- function $(t) {
91
- return t && parseFloat(t.replace(",", ".")) || 0;
92
- }
93
- function Se(t) {
94
- if (t === "Z") return 0;
95
- const e = t.match(ke);
96
- if (!e) return 0;
97
- const s = e[1] === "+" ? -1 : 1, a = parseInt(e[2]), n = e[3] && parseInt(e[3]) || 0;
98
- return Fe(a, n) ? s * (a * K + n * Z) : NaN;
99
- }
100
- function $e(t, e, s) {
101
- const a = /* @__PURE__ */ new Date(0);
102
- a.setUTCFullYear(t, 0, 4);
103
- const n = a.getUTCDay() || 7, d = (e - 1) * 7 + s + 1 - n;
104
- return a.setUTCDate(a.getUTCDate() + d), a;
105
- }
106
- const Ue = [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
107
- function J(t) {
108
- return t % 400 === 0 || t % 4 === 0 && t % 100 !== 0;
109
- }
110
- function Ge(t, e, s) {
111
- return e >= 0 && e <= 11 && s >= 1 && s <= (Ue[e] || (J(t) ? 29 : 28));
112
- }
113
- function Ve(t, e) {
114
- return e >= 1 && e <= (J(t) ? 366 : 365);
115
- }
116
- function je(t, e, s) {
117
- return e >= 1 && e <= 53 && s >= 0 && s <= 6;
118
- }
119
- function Ee(t, e, s) {
120
- return t === 24 ? e === 0 && s === 0 : s >= 0 && s < 60 && e >= 0 && e < 60 && t >= 0 && t < 25;
121
- }
122
- function Fe(t, e) {
123
- return e >= 0 && e <= 59;
124
- }
125
- const Re = b(
126
- [
127
- "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
128
- "ds:text-[var(--foreground)]",
129
- "ds:w-full"
130
- ].join(" "),
131
- {
132
- variants: {
133
- size: {
134
- sm: "ds:text-[length:var(--font-size-sm)]",
135
- md: "ds:text-[length:var(--font-size-base)]",
136
- lg: "ds:text-[length:var(--font-size-lg)]"
137
- }
138
- },
139
- defaultVariants: { size: "md" }
140
- }
141
- ), Me = b(
142
- "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:w-full"
143
- ), Oe = 12, Ye = b(
144
- "ds:grid ds:gap-[var(--spacing-sm)] ds:w-full ds:auto-rows-min ds:items-start",
145
- {
146
- variants: {
147
- cols: {
148
- 1: "ds:grid-cols-1",
149
- 2: "ds:grid-cols-2",
150
- 3: "ds:grid-cols-3",
151
- 4: "ds:grid-cols-4",
152
- 5: "ds:grid-cols-5",
153
- 6: "ds:grid-cols-6",
154
- 7: "ds:grid-cols-7",
155
- 8: "ds:grid-cols-8",
156
- 9: "ds:grid-cols-9",
157
- 10: "ds:grid-cols-10",
158
- 11: "ds:grid-cols-11",
159
- 12: "ds:grid-cols-12"
160
- }
161
- },
162
- defaultVariants: { cols: 1 }
163
- }
164
- );
165
- function Ae(t) {
166
- return Math.max(1, Math.min(t, Oe));
167
- }
168
- const H = b(
169
- [
170
- "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
171
- "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
172
- "ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]",
173
- "ds:rounded-[var(--radius-md)]",
174
- "ds:bg-[var(--card)]",
175
- "ds:min-w-0"
176
- ].join(" ")
177
- ), Be = b(
178
- [
179
- "ds:font-[var(--font-weight-semibold)]",
180
- "ds:text-[var(--foreground)]",
181
- "ds:text-start",
182
- "ds:truncate"
183
- ].join(" "),
184
- {
185
- variants: {
186
- size: {
187
- sm: "ds:text-[length:var(--font-size-xs)]",
188
- md: "ds:text-[length:var(--font-size-sm)]",
189
- lg: "ds:text-[length:var(--font-size-base)]"
190
- }
191
- },
192
- defaultVariants: { size: "md" }
193
- }
194
- ), _ = b(
195
- "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:w-full ds:m-0 ds:p-0 ds:list-none"
196
- ), We = b(
197
- [
198
- "ds:inline-flex ds:items-center ds:justify-center",
199
- "ds:w-full",
200
- "ds:rounded-[var(--radius-sm)]",
201
- "ds:font-[var(--font-weight-medium)]",
202
- "ds:bg-[var(--secondary)]",
203
- "ds:shadow-[var(--shadow-sm)]",
204
- "ds:text-[var(--foreground)]",
205
- "ds:transition-[background-color,color,box-shadow]",
206
- "ds:duration-[var(--animation-duration)]",
207
- "ds:motion-reduce:transition-none",
208
- "ds:focus-visible:outline-[var(--focus-ring-width)]",
209
- "ds:focus-visible:outline-solid",
210
- "ds:focus-visible:outline-[var(--ring)]",
211
- "ds:focus-visible:outline-offset-[var(--focus-ring-offset)]",
212
- "ds:min-h-[var(--min-target-size)]",
213
- "ds:disabled:opacity-50 ds:disabled:cursor-not-allowed ds:disabled:shadow-none",
214
- "ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed ds:aria-disabled:shadow-none",
215
- "ds:hover:enabled:shadow-[var(--shadow-md)]",
216
- "ds:aria-pressed:bg-[var(--primary)] ds:aria-pressed:text-[var(--primary-foreground)]"
217
- ].join(" "),
218
- {
219
- variants: {
220
- size: {
221
- sm: "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:text-[length:var(--font-size-xs)] ds:h-8",
222
- md: "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-sm)] ds:h-10",
223
- lg: "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-base)] ds:h-12"
224
- }
225
- },
226
- defaultVariants: { size: "md" }
227
- }
228
- );
229
- function v(t) {
230
- return t instanceof Date ? t : Ne(t);
231
- }
232
- function rt(t, e) {
233
- return ye(v(t), v(e));
234
- }
235
- function it(t) {
236
- for (const e of t) {
237
- const s = e.slots.find((a) => a.available !== !1);
238
- if (s) return { day: e, slot: s };
239
- }
240
- }
241
- function X(t, e, s) {
242
- try {
243
- return new Intl.DateTimeFormat(e, {
244
- weekday: "short",
245
- month: "short",
246
- day: "numeric",
247
- timeZone: s
248
- }).format(t);
249
- } catch {
250
- return new Intl.DateTimeFormat("en", {
251
- weekday: "short",
252
- month: "short",
253
- day: "numeric"
254
- }).format(t);
255
- }
256
- }
257
- function q(t, e, s) {
258
- if (t.label !== void 0) return t.label;
259
- const a = v(t.start);
260
- try {
261
- const n = new Intl.DateTimeFormat(e, {
262
- hour: "numeric",
263
- minute: "2-digit",
264
- timeZone: s
265
- });
266
- if (t.end) {
267
- const d = v(t.end);
268
- if (typeof n.formatRange == "function")
269
- try {
270
- return n.formatRange(a, d);
271
- } catch {
272
- }
273
- return `${n.format(a)} – ${n.format(d)}`;
274
- }
275
- return n.format(a);
276
- } catch {
277
- return a.toISOString();
278
- }
279
- }
280
- function He(t, e, s, a, n) {
281
- if (t.ariaLabel !== void 0) return t.ariaLabel;
282
- const d = q(t, s, a), l = e.label !== void 0 ? e.label : X(v(e.date), s, a);
283
- return n({ time: d, day: l });
284
- }
285
- function _e() {
286
- return /* @__PURE__ */ i(
287
- "svg",
288
- {
289
- "aria-hidden": "true",
290
- viewBox: "0 0 24 24",
291
- fill: "none",
292
- stroke: "currentColor",
293
- strokeWidth: "2",
294
- strokeLinecap: "round",
295
- strokeLinejoin: "round",
296
- className: "ds:size-4",
297
- children: /* @__PURE__ */ i("path", { d: "M15 18l-6-6 6-6" })
298
- }
299
- );
300
- }
301
- function Ke() {
302
- return /* @__PURE__ */ i(
303
- "svg",
304
- {
305
- "aria-hidden": "true",
306
- viewBox: "0 0 24 24",
307
- fill: "none",
308
- stroke: "currentColor",
309
- strokeWidth: "2",
310
- strokeLinecap: "round",
311
- strokeLinejoin: "round",
312
- className: "ds:size-4",
313
- children: /* @__PURE__ */ i("path", { d: "M9 6l6 6-6 6" })
314
- }
315
- );
316
- }
317
- const Ze = pe(
318
- ({
319
- days: t,
320
- state: e = "default",
321
- size: s = "md",
322
- selectedSlotId: a,
323
- maxInitialSlotsPerDay: n = 6,
324
- locale: d,
325
- timeZone: l,
326
- hasPrevious: u = !1,
327
- hasNext: f = !1,
328
- showNextAvailable: o = !1,
329
- ariaLabel: x,
330
- onSlotSelect: y,
331
- onPreviousDays: Q,
332
- onNextDays: P,
333
- onShowMore: N,
334
- onJumpToNextAvailable: ee,
335
- className: te,
336
- ...se
337
- }, ae) => {
338
- const { t: m, i18n: ne } = be(), T = d ?? ne.language ?? "en", re = he(), [ie, de] = ve({}), U = e === "loading", G = e === "disabled", h = U || G, oe = e === "empty" || t.length === 0 || t.every((r) => r.slots.length === 0), le = x ?? m("slotGrid.ariaLabel"), I = S(
339
- (r, c) => {
340
- h || r.available !== !1 && (y == null || y(r, c));
341
- },
342
- [h, y]
343
- ), ce = S(
344
- (r, c) => {
345
- de((g) => ({ ...g, [c]: !0 })), N == null || N(r);
346
- },
347
- [N]
348
- ), ue = S(
349
- (r, c, g) => {
350
- (r.key === "Enter" || r.key === " ") && (r.preventDefault(), I(c, g));
351
- },
352
- [I]
353
- ), V = Ae(t.length || 1), j = Ye({ cols: V });
354
- let w;
355
- return U ? w = /* @__PURE__ */ i(
356
- "div",
357
- {
358
- className: j,
359
- "data-state": "loading",
360
- role: "status",
361
- "aria-live": "polite",
362
- "aria-label": m("common.loading"),
363
- children: Array.from({ length: V }, (r, c) => /* @__PURE__ */ C("div", { className: H(), children: [
364
- /* @__PURE__ */ i(B, { variant: "text", size: s, width: "60%" }),
365
- /* @__PURE__ */ i("div", { className: _(), children: Array.from(
366
- { length: Math.min(n, 4) },
367
- (g, z) => /* @__PURE__ */ i(
368
- B,
369
- {
370
- variant: "rounded",
371
- size: s,
372
- height: "40px"
373
- },
374
- `loading-slot-${c}-${z}`
375
- )
376
- ) })
377
- ] }, `loading-col-${c}`))
378
- }
379
- ) : oe ? w = /* @__PURE__ */ i("div", { "data-state": "empty", children: /* @__PURE__ */ i(xe, { variant: "no-results", title: m("slotGrid.noSlots") }) }) : w = /* @__PURE__ */ i(
380
- "div",
381
- {
382
- className: j,
383
- "data-state": G ? "disabled" : "default",
384
- children: t.map((r, c) => {
385
- const g = `${v(r.date).toISOString()}-${c}`, z = r.label ?? X(v(r.date), T, l), E = `${re}-day-${c}-header`, F = ie[g] ?? !1 ? r.slots : r.slots.slice(0, n), R = r.slots.length - F.length, M = r.slots.length === 0;
386
- return (
387
- // Use a plain <div role="group"> rather than <section> — a
388
- // <section> with aria-labelledby is a landmark, and nesting many
389
- // landmarks inside the outer slot-grid landmark fails axe's
390
- // landmark-unique rule.
391
- /* @__PURE__ */ C(
392
- "div",
393
- {
394
- role: "group",
395
- className: H(),
396
- "aria-labelledby": E,
397
- "data-empty": M || void 0,
398
- children: [
399
- /* @__PURE__ */ i("h3", { id: E, className: Be({ size: s }), children: z }),
400
- M ? /* @__PURE__ */ i("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: m("slotGrid.noSlots") }) : null,
401
- /* @__PURE__ */ i("ul", { className: _(), children: F.map((p) => {
402
- const me = He(
403
- p,
404
- r,
405
- T,
406
- l,
407
- ({ time: L, day: ge }) => m("slotGrid.slotLabel", { time: L, day: ge })
408
- ), fe = a === p.id, O = p.available === !1 || h;
409
- return /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
410
- "button",
411
- {
412
- type: "button",
413
- className: We({ size: s }),
414
- "aria-label": me,
415
- "aria-pressed": fe,
416
- disabled: O,
417
- "aria-disabled": O || void 0,
418
- "data-slot-id": p.id,
419
- onClick: () => I(p, r),
420
- onKeyDown: (L) => ue(L, p, r),
421
- children: q(p, T, l)
422
- }
423
- ) }, p.id);
424
- }) }),
425
- R > 0 ? /* @__PURE__ */ i(
426
- Y,
427
- {
428
- intent: "ghost",
429
- size: s === "lg" ? "md" : "sm",
430
- onClick: () => ce(r, g),
431
- disabled: h,
432
- children: m("slotGrid.showMore", { count: R })
433
- }
434
- ) : null
435
- ]
436
- },
437
- g
438
- )
439
- );
440
- })
441
- }
442
- ), /* @__PURE__ */ C(
443
- "div",
444
- {
445
- ref: ae,
446
- role: "region",
447
- "aria-label": le,
448
- className: Re({ size: s, className: te }),
449
- "data-component": "slot-grid",
450
- "data-state": e,
451
- ...se,
452
- children: [
453
- /* @__PURE__ */ C("div", { className: Me(), children: [
454
- /* @__PURE__ */ i(
455
- A,
456
- {
457
- icon: /* @__PURE__ */ i(_e, {}),
458
- "aria-label": m("slotGrid.previousDays"),
459
- size: s === "lg" ? "md" : "sm",
460
- intent: "ghost",
461
- flipIconInRtl: !0,
462
- disabled: !u || h,
463
- onClick: Q
464
- }
465
- ),
466
- o ? /* @__PURE__ */ i(
467
- Y,
468
- {
469
- intent: "secondary",
470
- size: s === "lg" ? "md" : "sm",
471
- disabled: h,
472
- onClick: ee,
473
- children: m("slotGrid.nextAvailable")
474
- }
475
- ) : /* @__PURE__ */ i("span", { "aria-hidden": "true" }),
476
- /* @__PURE__ */ i(
477
- A,
478
- {
479
- icon: /* @__PURE__ */ i(Ke, {}),
480
- "aria-label": m("slotGrid.nextDays"),
481
- size: s === "lg" ? "md" : "sm",
482
- intent: "ghost",
483
- flipIconInRtl: !0,
484
- disabled: !f || h,
485
- onClick: P
486
- }
487
- )
488
- ] }),
489
- w
490
- ]
491
- }
492
- );
493
- }
494
- );
495
- Ze.displayName = "SlotGrid";
496
- export {
497
- Ze as S,
498
- it as f,
499
- rt as i,
500
- Ne as p
501
- };
502
- //# sourceMappingURL=slot-grid-CQSULZjd.js.map
@@ -1,8 +0,0 @@
1
- import { a as o } from "./date-picker-variants-eL6HjWvw.js";
2
- function n(a, s, r) {
3
- return o(a, -s, r);
4
- }
5
- export {
6
- n as s
7
- };
8
- //# sourceMappingURL=subDays-BcNi04uf.js.map
@@ -1,25 +0,0 @@
1
- const t = {
2
- id: "task-card",
3
- // `dismiss` is host-delegated: the card itself exposes no imperative handle —
4
- // removal is performed by the hosting TaskTray (see task-tray.agent.ts
5
- // `dismiss`). The capability documents the intent for the addressed card.
6
- capabilities: ["dismiss"],
7
- state: {},
8
- actions: {},
9
- domHooks: {
10
- root: {
11
- attr: "data-component",
12
- value: "task-card",
13
- description: "Marks the element as a kit TaskCard. The card root also emits data-component-id sourced from item.id and data-status with the current lifecycle."
14
- },
15
- instanceId: {
16
- attr: "data-component-id",
17
- sourceProp: "item.id",
18
- description: "Sourced from item.id — the stable task identifier."
19
- }
20
- }
21
- };
22
- export {
23
- t
24
- };
25
- //# sourceMappingURL=task-card.agent-Bt14CzUd.js.map