@alfadocs/ui-kit 0.25.1 → 0.30.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 (205) hide show
  1. package/dist/_chunks/{agenda-card-BmpaUG1h.js → agenda-card-CznB7K8e.js} +2 -2
  2. package/dist/_chunks/{agenda-tray-DiInnVqk.js → agenda-tray-C_bha7oK.js} +4 -4
  3. package/dist/_chunks/{ai-prompt-input-B5MdixzR.js → ai-prompt-input-Bka3jX3i.js} +2 -2
  4. package/dist/_chunks/{alia-sidebar-CUi2UCbY.js → alia-sidebar-CnvXq95r.js} +92 -109
  5. package/dist/_chunks/{audio-recorder-D4xM3H5i.js → audio-recorder-OB6IV9B1.js} +2 -2
  6. package/dist/_chunks/{autocomplete-C7xq06bP.js → autocomplete-CUh0f7Dj.js} +2 -2
  7. package/dist/_chunks/{avatar-BpFohgWG.js → avatar-D_H4emLo.js} +7 -7
  8. package/dist/_chunks/{benefit-card-DXmrAyfn.js → benefit-card-CjYM8vNr.js} +29 -29
  9. package/dist/_chunks/booking-BYuc_8HV.js +2250 -0
  10. package/dist/_chunks/{calendar-zy0tUUVG.js → calendar-WWNx448i.js} +114 -142
  11. package/dist/_chunks/{card-C353dU-H.js → card-DKTMLVrw.js} +11 -11
  12. package/dist/_chunks/{carousel.agent-DnPiqijR.js → carousel.agent-C9swH-Uf.js} +2 -2
  13. package/dist/_chunks/{chat-input-B3XmFGDw.js → chat-input-BfDcz1Yi.js} +2 -2
  14. package/dist/_chunks/{chat-message-W3k8rLOA.js → chat-message-fg221-yx.js} +2 -2
  15. package/dist/_chunks/{command-palette-DkL-aW4O.js → command-palette-11BieSNq.js} +2 -2
  16. package/dist/_chunks/{contact-card-CjG7c-1q.js → contact-card-DYbp--s-.js} +3 -3
  17. package/dist/_chunks/{date-picker-BIoSLRly.js → date-picker-D0Ry1dMz.js} +26 -27
  18. package/dist/_chunks/{date-range-picker-9gANFNG9.js → date-range-picker-DYgHzMOo.js} +19 -20
  19. package/dist/_chunks/{date-time-picker-DG7BiGdb.js → date-time-picker-CGmGtcyc.js} +10 -11
  20. package/dist/_chunks/{description-list-Bsga4IW8.js → description-list-yl3y3QKg.js} +34 -24
  21. package/dist/_chunks/{dialog-DUomPCRS.js → dialog-BBXqpZIt.js} +2 -2
  22. package/dist/_chunks/{editable-currency-cell-renderer-DJB5MxAI.js → editable-currency-cell-renderer-DSReCae7.js} +7 -7
  23. package/dist/_chunks/{empty-state-3CLJIXSj.js → empty-state-BLy7tigq.js} +13 -33
  24. package/dist/_chunks/eye-LHlSU38h.js +21 -0
  25. package/dist/_chunks/{freemium-paywall-CM6V1zNf.js → freemium-paywall-B9c8Ylww.js} +11 -11
  26. package/dist/_chunks/{header-DqmKROIY.js → header-CkMb1TZS.js} +24 -24
  27. package/dist/_chunks/heart-pulse-CvuyFKHB.js +21 -0
  28. package/dist/_chunks/icon-button-BRHSSFmZ.js +70 -0
  29. package/dist/_chunks/{isSameDay-ecuM8PBB.js → isSameDay-DHG8Xade.js} +4 -4
  30. package/dist/_chunks/{key-value-pair-DBuOCtIc.js → key-value-pair-CqeKiP__.js} +2 -2
  31. package/dist/_chunks/{link-DmM5IevO.js → link-DrD_cRUg.js} +50 -45
  32. package/dist/_chunks/{locale-picker-BxEUUPW7.js → locale-picker-BHxbTNmR.js} +297 -208
  33. package/dist/_chunks/{map-view-CcwycFQX.js → map-view-DyB8tr6c.js} +9 -9
  34. package/dist/_chunks/{matrix-rain-CRPMXcVx.js → matrix-rain-sDOUUwZp.js} +35 -35
  35. package/dist/_chunks/{message-card-i61k1TGc.js → message-card-DjRtA8GG.js} +3 -3
  36. package/dist/_chunks/{message-tray-DrV7G-wR.js → message-tray-DfsAMncP.js} +3 -3
  37. package/dist/_chunks/monitor-D-SFdbrU.js +16 -0
  38. package/dist/_chunks/{notification-card-ejOw5g6g.js → notification-card-B_847w5g.js} +3 -3
  39. package/dist/_chunks/{notification-tray-D_69dXFY.js → notification-tray-6f7smmT1.js} +22 -19
  40. package/dist/_chunks/parseISO-Dk4xa7q6.js +120 -0
  41. package/dist/_chunks/patient-search-BhlxYAI3.js +1102 -0
  42. package/dist/_chunks/patient-shell-CAXYzbRw.js +173 -0
  43. package/dist/_chunks/{payment-form-F7uh0Rqr.js → payment-form-Ds3rxvad.js} +2 -2
  44. package/dist/_chunks/{pdf-viewer-CuYaVR1I.js → pdf-viewer-CIuaocnq.js} +2 -2
  45. package/dist/_chunks/{popover--derJ_wq.js → popover-D0slaBB9.js} +17 -13
  46. package/dist/_chunks/{privacy-lock-BKsI6ReN.js → privacy-lock-BI4vi9Ud.js} +2 -2
  47. package/dist/_chunks/public-footer.agent-CA29gxHJ.js +516 -0
  48. package/dist/_chunks/{public-header.agent-BQ3r6Hgq.js → public-header.agent-5U3S9QiC.js} +49 -41
  49. package/dist/_chunks/react-day-picker-D3yzgvDB.js +3127 -0
  50. package/dist/_chunks/{recaptcha-widget-Kp1XntuE.js → recaptcha-widget-BtBNb6tB.js} +2 -2
  51. package/dist/_chunks/reviews-panel-CFttsfuC.js +513 -0
  52. package/dist/_chunks/{search-bar-DORSAzNt.js → search-bar-BRMW1-WG.js} +2 -2
  53. package/dist/_chunks/{search-input-BtEJAJHa.js → search-input-CIA6pPfn.js} +2 -2
  54. package/dist/_chunks/{sheet-BT0izeoI.js → sheet-D8M8hf8B.js} +2 -2
  55. package/dist/_chunks/{sign-in-with-alfadocs-button-4zZC-I6y.js → sign-in-with-alfadocs-button-BI0fVonM.js} +2 -2
  56. package/dist/_chunks/slot-grid-B2zprPcv.js +387 -0
  57. package/dist/_chunks/sparkles-CuYXqQLg.js +23 -0
  58. package/dist/_chunks/{spinner-DirtWZNG.js → spinner-CCByyvcb.js} +2 -2
  59. package/dist/_chunks/stepper-accordion-BfS6lUB9.js +257 -0
  60. package/dist/_chunks/stepper-accordion.agent-C4quJ-MD.js +71 -0
  61. package/dist/_chunks/stethoscope-DT5qCW8Y.js +18 -0
  62. package/dist/_chunks/{sun-Eweh5fvi.js → sun-BuXE0xUS.js} +3 -15
  63. package/dist/_chunks/{task-tray-B3A2fRGR.js → task-tray-Bcmrrs8m.js} +3 -3
  64. package/dist/_chunks/{theme-toggle-FrotC2VI.js → theme-toggle-nPzb378f.js} +37 -36
  65. package/dist/_chunks/{timeline-jmd7lfDf.js → timeline-CR7HjZCK.js} +3 -3
  66. package/dist/_chunks/{toast.agent-32WNQ-_x.js → toast.agent-CTF6nIj5.js} +2 -2
  67. package/dist/_chunks/{transcript-panel-DUrjx5sa.js → transcript-panel-QUQ9XJmf.js} +2 -2
  68. package/dist/_chunks/{use-password-requirements-C9vKBSVn.js → use-password-requirements-E0sSfx5X.js} +38 -53
  69. package/dist/_chunks/use-theme-C2dHKUAN.js +145 -0
  70. package/dist/_chunks/{workflow-map-BR6txfFX.js → workflow-map-BKsKdYvZ.js} +5 -5
  71. package/dist/agent-catalog.json +151 -51
  72. package/dist/components/agenda-card/index.js +1 -1
  73. package/dist/components/agenda-tray/index.js +1 -1
  74. package/dist/components/ai-prompt-input/index.js +1 -1
  75. package/dist/components/audio-recorder/index.js +1 -1
  76. package/dist/components/autocomplete/index.js +1 -1
  77. package/dist/components/avatar/index.js +1 -1
  78. package/dist/components/benefit-card/index.js +1 -1
  79. package/dist/components/booking/booking-types.d.ts +145 -0
  80. package/dist/components/booking/booking.agent.d.ts +4 -0
  81. package/dist/components/booking/booking.d.ts +6 -0
  82. package/dist/components/booking/cascade.d.ts +96 -0
  83. package/dist/components/booking/details-form.d.ts +32 -0
  84. package/dist/components/booking/index.d.ts +5 -0
  85. package/dist/components/booking/index.js +8 -0
  86. package/dist/components/button/index.js +1 -1
  87. package/dist/components/calendar/index.js +1 -1
  88. package/dist/components/card/index.js +1 -1
  89. package/dist/components/carousel/index.js +1 -1
  90. package/dist/components/chat-input/index.js +1 -1
  91. package/dist/components/chat-message/index.js +1 -1
  92. package/dist/components/checkbox/checkbox.d.ts +6 -2
  93. package/dist/components/command-palette/index.js +1 -1
  94. package/dist/components/contact-card/index.js +1 -1
  95. package/dist/components/data-table/index.js +1 -1
  96. package/dist/components/date-picker/index.js +1 -1
  97. package/dist/components/date-range-picker/index.js +1 -1
  98. package/dist/components/date-time-picker/index.js +1 -1
  99. package/dist/components/description-list/index.js +1 -1
  100. package/dist/components/dialog/index.js +1 -1
  101. package/dist/components/empty-state/index.js +1 -1
  102. package/dist/components/freemium-paywall/index.js +1 -1
  103. package/dist/components/header/index.js +1 -1
  104. package/dist/components/header-settings/index.js +16 -15
  105. package/dist/components/icon-button/index.js +1 -1
  106. package/dist/components/index.d.ts +4 -1
  107. package/dist/components/key-value-pair/index.js +1 -1
  108. package/dist/components/link/index.js +1 -1
  109. package/dist/components/link/link.d.ts +7 -0
  110. package/dist/components/locale-picker/index.js +1 -1
  111. package/dist/components/map-view/index.js +1 -1
  112. package/dist/components/matrix-rain/index.js +1 -1
  113. package/dist/components/message-card/index.js +1 -1
  114. package/dist/components/message-tray/index.js +1 -1
  115. package/dist/components/notification-card/index.js +1 -1
  116. package/dist/components/notification-tray/index.js +1 -1
  117. package/dist/components/password-input/index.js +1 -1
  118. package/dist/components/patient-search/index.d.ts +4 -0
  119. package/dist/components/patient-search/index.js +6 -0
  120. package/dist/components/patient-search/patient-search.agent.d.ts +4 -0
  121. package/dist/components/patient-search/patient-search.d.ts +103 -0
  122. package/dist/components/payment-form/index.js +1 -1
  123. package/dist/components/pdf-viewer/index.js +1 -1
  124. package/dist/components/popover/index.js +1 -1
  125. package/dist/components/privacy-lock/index.js +1 -1
  126. package/dist/components/public-footer/index.d.ts +6 -0
  127. package/dist/components/public-footer/index.js +10 -0
  128. package/dist/components/public-footer/legal-urls.d.ts +18 -0
  129. package/dist/components/public-footer/public-footer.agent.d.ts +4 -0
  130. package/dist/components/public-footer/public-footer.d.ts +51 -0
  131. package/dist/components/public-footer/socials.d.ts +9 -0
  132. package/dist/components/public-header/index.js +1 -1
  133. package/dist/components/recaptcha-widget/index.js +1 -1
  134. package/dist/components/reviews-panel/index.d.ts +4 -0
  135. package/dist/components/reviews-panel/index.js +6 -0
  136. package/dist/components/reviews-panel/reviews-panel.agent.d.ts +4 -0
  137. package/dist/components/reviews-panel/reviews-panel.d.ts +76 -0
  138. package/dist/components/search-bar/index.js +1 -1
  139. package/dist/components/search-input/index.js +1 -1
  140. package/dist/components/sheet/index.js +1 -1
  141. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  142. package/dist/components/slot-grid/index.js +1 -1
  143. package/dist/components/spinner/index.js +1 -1
  144. package/dist/components/stepper-accordion/index.js +4 -3
  145. package/dist/components/task-tray/index.js +1 -1
  146. package/dist/components/theme-toggle/index.js +1 -1
  147. package/dist/components/timeline/index.js +1 -1
  148. package/dist/components/toast/index.js +1 -1
  149. package/dist/components/transcript-panel/index.js +1 -1
  150. package/dist/components/workflow/index.js +1 -1
  151. package/dist/hooks/index.js +1 -1
  152. package/dist/i18n/config.js +4923 -49
  153. package/dist/i18n/locales/ar.d.ts +272 -0
  154. package/dist/i18n/locales/de.d.ts +272 -0
  155. package/dist/i18n/locales/el.d.ts +272 -0
  156. package/dist/i18n/locales/es.d.ts +272 -0
  157. package/dist/i18n/locales/fr.d.ts +272 -0
  158. package/dist/i18n/locales/hi.d.ts +272 -0
  159. package/dist/i18n/locales/ja.d.ts +272 -0
  160. package/dist/i18n/locales/nl.d.ts +272 -0
  161. package/dist/i18n/locales/pl.d.ts +272 -0
  162. package/dist/i18n/locales/pt.d.ts +272 -0
  163. package/dist/i18n/locales/ro.d.ts +272 -0
  164. package/dist/i18n/locales/ru.d.ts +272 -0
  165. package/dist/i18n/locales/sq.d.ts +272 -0
  166. package/dist/i18n/locales/sv.d.ts +272 -0
  167. package/dist/i18n/locales/tr.d.ts +272 -0
  168. package/dist/i18n/locales/zh.d.ts +272 -0
  169. package/dist/i18n/resources.d.ts +544 -0
  170. package/dist/index.js +364 -348
  171. package/dist/locales/ar.json +273 -1
  172. package/dist/locales/de.json +273 -1
  173. package/dist/locales/el.json +273 -1
  174. package/dist/locales/en.json +273 -1
  175. package/dist/locales/es.json +273 -1
  176. package/dist/locales/fr.json +273 -1
  177. package/dist/locales/hi.json +273 -1
  178. package/dist/locales/it.json +273 -1
  179. package/dist/locales/ja.json +273 -1
  180. package/dist/locales/nl.json +273 -1
  181. package/dist/locales/pl.json +273 -1
  182. package/dist/locales/pt.json +273 -1
  183. package/dist/locales/ro.json +273 -1
  184. package/dist/locales/ru.json +273 -1
  185. package/dist/locales/sq.json +273 -1
  186. package/dist/locales/sv.json +273 -1
  187. package/dist/locales/tr.json +273 -1
  188. package/dist/locales/zh.json +273 -1
  189. package/dist/patterns/alia-assistant/index.js +1 -1
  190. package/dist/patterns/patient-shell/index.js +1 -1
  191. package/dist/tokens.css +1 -1
  192. package/package.json +17 -1
  193. package/dist/_chunks/icon-button-C4CGcYuz.js +0 -54
  194. package/dist/_chunks/isSameMonth-5wNF2f4I.js +0 -1307
  195. package/dist/_chunks/patient-shell-B164drIa.js +0 -173
  196. package/dist/_chunks/react-day-picker-C5F3-TTX.js +0 -1827
  197. package/dist/_chunks/slot-grid-CgpYgBkW.js +0 -502
  198. package/dist/_chunks/stepper-C-sIpRRU.js +0 -7
  199. package/dist/_chunks/stepper-accordion.agent-ckKYZCIP.js +0 -322
  200. package/dist/_chunks/stepper-calendar-BLOJUE0-.js +0 -648
  201. package/dist/_chunks/use-theme-B1cwAXJR.js +0 -145
  202. package/dist/components/stepper-calendar/index.d.ts +0 -4
  203. package/dist/components/stepper-calendar/index.js +0 -6
  204. package/dist/components/stepper-calendar/stepper-calendar.agent.d.ts +0 -4
  205. package/dist/components/stepper-calendar/stepper-calendar.d.ts +0 -62
@@ -0,0 +1,387 @@
1
+ import { jsx as t, jsxs as x } from "react/jsx-runtime";
2
+ import { forwardRef as os, useId as ls, useState as cs, useCallback as L } from "react";
3
+ import { c as f } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as ms } from "react-i18next";
5
+ import { B as $ } from "./button-DD_0Xdmr.js";
6
+ import { I as A } from "./icon-button-BRHSSFmZ.js";
7
+ import { E as us } from "./empty-state-BLy7tigq.js";
8
+ import { S as B } from "./skeleton-CZbwyJAA.js";
9
+ import { i as fs } from "./isSameDay-DHG8Xade.js";
10
+ import { p as gs } from "./parseISO-Dk4xa7q6.js";
11
+ const ps = f(
12
+ [
13
+ "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
14
+ "ds:text-[var(--foreground)]",
15
+ "ds:w-full"
16
+ ].join(" "),
17
+ {
18
+ variants: {
19
+ size: {
20
+ sm: "ds:text-[length:var(--font-size-sm)]",
21
+ md: "ds:text-[length:var(--font-size-base)]",
22
+ lg: "ds:text-[length:var(--font-size-lg)]"
23
+ }
24
+ },
25
+ defaultVariants: { size: "md" }
26
+ }
27
+ ), vs = f(
28
+ "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)] ds:w-full"
29
+ ), hs = 12, bs = f(
30
+ "ds:grid ds:gap-[var(--spacing-sm)] ds:w-full ds:auto-rows-min ds:items-start",
31
+ {
32
+ variants: {
33
+ cols: {
34
+ 1: "ds:grid-cols-1",
35
+ 2: "ds:grid-cols-2",
36
+ 3: "ds:grid-cols-3",
37
+ 4: "ds:grid-cols-4",
38
+ 5: "ds:grid-cols-5",
39
+ 6: "ds:grid-cols-6",
40
+ 7: "ds:grid-cols-7",
41
+ 8: "ds:grid-cols-8",
42
+ 9: "ds:grid-cols-9",
43
+ 10: "ds:grid-cols-10",
44
+ 11: "ds:grid-cols-11",
45
+ 12: "ds:grid-cols-12"
46
+ }
47
+ },
48
+ defaultVariants: { cols: 1 }
49
+ }
50
+ );
51
+ function xs(s) {
52
+ return Math.max(1, Math.min(s, hs));
53
+ }
54
+ const R = f(
55
+ [
56
+ "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
57
+ "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
58
+ "ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]",
59
+ "ds:rounded-[var(--radius-md)]",
60
+ "ds:bg-[var(--card)]",
61
+ "ds:min-w-0"
62
+ ].join(" ")
63
+ ), ys = f(
64
+ [
65
+ "ds:font-[var(--font-weight-semibold)]",
66
+ "ds:text-[var(--foreground)]",
67
+ "ds:text-start",
68
+ "ds:truncate"
69
+ ].join(" "),
70
+ {
71
+ variants: {
72
+ size: {
73
+ sm: "ds:text-[length:var(--font-size-xs)]",
74
+ md: "ds:text-[length:var(--font-size-sm)]",
75
+ lg: "ds:text-[length:var(--font-size-base)]"
76
+ }
77
+ },
78
+ defaultVariants: { size: "md" }
79
+ }
80
+ ), T = f(
81
+ "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:w-full ds:m-0 ds:p-0 ds:list-none"
82
+ ), ws = f(
83
+ [
84
+ "ds:inline-flex ds:items-center ds:justify-center",
85
+ "ds:w-full",
86
+ "ds:rounded-[var(--radius-sm)]",
87
+ "ds:font-[var(--font-weight-medium)]",
88
+ "ds:bg-[var(--secondary)]",
89
+ "ds:shadow-[var(--shadow-sm)]",
90
+ "ds:text-[var(--foreground)]",
91
+ "ds:transition-[background-color,color,box-shadow]",
92
+ "ds:duration-[var(--animation-duration)]",
93
+ "ds:motion-reduce:transition-none",
94
+ "ds:focus-visible:outline-[var(--focus-ring-width)]",
95
+ "ds:focus-visible:outline-solid",
96
+ "ds:focus-visible:outline-[var(--ring)]",
97
+ "ds:focus-visible:outline-offset-[var(--focus-ring-offset)]",
98
+ "ds:min-h-[var(--min-target-size)]",
99
+ "ds:disabled:opacity-50 ds:disabled:cursor-not-allowed ds:disabled:shadow-none",
100
+ "ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-not-allowed ds:aria-disabled:shadow-none",
101
+ "ds:hover:enabled:shadow-[var(--shadow-md)]",
102
+ "ds:aria-pressed:bg-[var(--primary)] ds:aria-pressed:text-[var(--primary-foreground)]"
103
+ ].join(" "),
104
+ {
105
+ variants: {
106
+ size: {
107
+ sm: "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:text-[length:var(--font-size-xs)] ds:h-8",
108
+ md: "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-sm)] ds:h-10",
109
+ lg: "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:text-[length:var(--font-size-base)] ds:h-12"
110
+ }
111
+ },
112
+ defaultVariants: { size: "md" }
113
+ }
114
+ );
115
+ function u(s) {
116
+ return s instanceof Date ? s : gs(s);
117
+ }
118
+ function Rs(s, r) {
119
+ return fs(u(s), u(r));
120
+ }
121
+ function Ts(s) {
122
+ for (const r of s) {
123
+ const e = r.slots.find((n) => n.available !== !1);
124
+ if (e) return { day: r, slot: e };
125
+ }
126
+ }
127
+ function F(s, r, e) {
128
+ try {
129
+ return new Intl.DateTimeFormat(r, {
130
+ weekday: "short",
131
+ month: "short",
132
+ day: "numeric",
133
+ timeZone: e
134
+ }).format(s);
135
+ } catch {
136
+ return new Intl.DateTimeFormat("en", {
137
+ weekday: "short",
138
+ month: "short",
139
+ day: "numeric"
140
+ }).format(s);
141
+ }
142
+ }
143
+ function O(s, r, e) {
144
+ if (s.label !== void 0) return s.label;
145
+ const n = u(s.start);
146
+ try {
147
+ const d = new Intl.DateTimeFormat(r, {
148
+ hour: "numeric",
149
+ minute: "2-digit",
150
+ timeZone: e
151
+ });
152
+ if (s.end) {
153
+ const g = u(s.end);
154
+ if (typeof d.formatRange == "function")
155
+ try {
156
+ return d.formatRange(n, g);
157
+ } catch {
158
+ }
159
+ return `${d.format(n)} – ${d.format(g)}`;
160
+ }
161
+ return d.format(n);
162
+ } catch {
163
+ return n.toISOString();
164
+ }
165
+ }
166
+ function ks(s, r, e, n, d) {
167
+ if (s.ariaLabel !== void 0) return s.ariaLabel;
168
+ const g = O(s, e, n), p = r.label !== void 0 ? r.label : F(u(r.date), e, n);
169
+ return d({ time: g, day: p });
170
+ }
171
+ function Cs() {
172
+ return /* @__PURE__ */ t(
173
+ "svg",
174
+ {
175
+ "aria-hidden": "true",
176
+ viewBox: "0 0 24 24",
177
+ fill: "none",
178
+ stroke: "currentColor",
179
+ strokeWidth: "2",
180
+ strokeLinecap: "round",
181
+ strokeLinejoin: "round",
182
+ className: "ds:size-4",
183
+ children: /* @__PURE__ */ t("path", { d: "M15 18l-6-6 6-6" })
184
+ }
185
+ );
186
+ }
187
+ function Ls() {
188
+ return /* @__PURE__ */ t(
189
+ "svg",
190
+ {
191
+ "aria-hidden": "true",
192
+ viewBox: "0 0 24 24",
193
+ fill: "none",
194
+ stroke: "currentColor",
195
+ strokeWidth: "2",
196
+ strokeLinecap: "round",
197
+ strokeLinejoin: "round",
198
+ className: "ds:size-4",
199
+ children: /* @__PURE__ */ t("path", { d: "M9 6l6 6-6 6" })
200
+ }
201
+ );
202
+ }
203
+ const Ds = os(
204
+ ({
205
+ days: s,
206
+ state: r = "default",
207
+ size: e = "md",
208
+ selectedSlotId: n,
209
+ maxInitialSlotsPerDay: d = 6,
210
+ locale: g,
211
+ timeZone: p,
212
+ hasPrevious: K = !1,
213
+ hasNext: M = !1,
214
+ showNextAvailable: _ = !1,
215
+ ariaLabel: H,
216
+ onSlotSelect: v,
217
+ onPreviousDays: W,
218
+ onNextDays: X,
219
+ onShowMore: h,
220
+ onJumpToNextAvailable: q,
221
+ className: J,
222
+ ...Q
223
+ }, U) => {
224
+ const { t: o, i18n: Y } = ms(), y = g ?? Y.language ?? "en", P = ls(), [Z, ss] = cs({}), D = r === "loading", z = r === "disabled", m = D || z, as = r === "empty" || s.length === 0 || s.every((a) => a.slots.length === 0), ts = H ?? o("slotGrid.ariaLabel"), w = L(
225
+ (a, i) => {
226
+ m || a.available !== !1 && (v == null || v(a, i));
227
+ },
228
+ [m, v]
229
+ ), es = L(
230
+ (a, i) => {
231
+ ss((l) => ({ ...l, [i]: !0 })), h == null || h(a);
232
+ },
233
+ [h]
234
+ ), rs = L(
235
+ (a, i, l) => {
236
+ (a.key === "Enter" || a.key === " ") && (a.preventDefault(), w(i, l));
237
+ },
238
+ [w]
239
+ ), I = xs(s.length || 1), N = bs({ cols: I });
240
+ let b;
241
+ return D ? b = /* @__PURE__ */ t(
242
+ "div",
243
+ {
244
+ className: N,
245
+ "data-state": "loading",
246
+ role: "status",
247
+ "aria-live": "polite",
248
+ "aria-label": o("common.loading"),
249
+ children: Array.from({ length: I }, (a, i) => /* @__PURE__ */ x("div", { className: R(), children: [
250
+ /* @__PURE__ */ t(B, { variant: "text", size: e, width: "60%" }),
251
+ /* @__PURE__ */ t("div", { className: T(), children: Array.from(
252
+ { length: Math.min(d, 4) },
253
+ (l, k) => /* @__PURE__ */ t(
254
+ B,
255
+ {
256
+ variant: "rounded",
257
+ size: e,
258
+ height: "40px"
259
+ },
260
+ `loading-slot-${i}-${k}`
261
+ )
262
+ ) })
263
+ ] }, `loading-col-${i}`))
264
+ }
265
+ ) : as ? b = /* @__PURE__ */ t("div", { "data-state": "empty", children: /* @__PURE__ */ t(us, { variant: "no-results", title: o("slotGrid.noSlots") }) }) : b = /* @__PURE__ */ t(
266
+ "div",
267
+ {
268
+ className: N,
269
+ "data-state": z ? "disabled" : "default",
270
+ children: s.map((a, i) => {
271
+ const l = `${u(a.date).toISOString()}-${i}`, k = a.label ?? F(u(a.date), y, p), S = `${P}-day-${i}-header`, G = Z[l] ?? !1 ? a.slots : a.slots.slice(0, d), V = a.slots.length - G.length, j = a.slots.length === 0;
272
+ return (
273
+ // Use a plain <div role="group"> rather than <section> — a
274
+ // <section> with aria-labelledby is a landmark, and nesting many
275
+ // landmarks inside the outer slot-grid landmark fails axe's
276
+ // landmark-unique rule.
277
+ /* @__PURE__ */ x(
278
+ "div",
279
+ {
280
+ role: "group",
281
+ className: R(),
282
+ "aria-labelledby": S,
283
+ "data-empty": j || void 0,
284
+ children: [
285
+ /* @__PURE__ */ t("h3", { id: S, className: ys({ size: e }), children: k }),
286
+ j ? /* @__PURE__ */ t("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: o("slotGrid.noSlots") }) : null,
287
+ /* @__PURE__ */ t("ul", { className: T(), children: G.map((c) => {
288
+ const ns = ks(
289
+ c,
290
+ a,
291
+ y,
292
+ p,
293
+ ({ time: C, day: ds }) => o("slotGrid.slotLabel", { time: C, day: ds })
294
+ ), is = n === c.id, E = c.available === !1 || m;
295
+ return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
296
+ "button",
297
+ {
298
+ type: "button",
299
+ className: ws({ size: e }),
300
+ "aria-label": ns,
301
+ "aria-pressed": is,
302
+ disabled: E,
303
+ "aria-disabled": E || void 0,
304
+ "data-slot-id": c.id,
305
+ onClick: () => w(c, a),
306
+ onKeyDown: (C) => rs(C, c, a),
307
+ children: O(c, y, p)
308
+ }
309
+ ) }, c.id);
310
+ }) }),
311
+ V > 0 ? /* @__PURE__ */ t(
312
+ $,
313
+ {
314
+ intent: "ghost",
315
+ size: e === "lg" ? "md" : "sm",
316
+ onClick: () => es(a, l),
317
+ disabled: m,
318
+ children: o("slotGrid.showMore", { count: V })
319
+ }
320
+ ) : null
321
+ ]
322
+ },
323
+ l
324
+ )
325
+ );
326
+ })
327
+ }
328
+ ), /* @__PURE__ */ x(
329
+ "div",
330
+ {
331
+ ref: U,
332
+ role: "region",
333
+ "aria-label": ts,
334
+ className: ps({ size: e, className: J }),
335
+ "data-component": "slot-grid",
336
+ "data-state": r,
337
+ ...Q,
338
+ children: [
339
+ /* @__PURE__ */ x("div", { className: vs(), children: [
340
+ /* @__PURE__ */ t(
341
+ A,
342
+ {
343
+ icon: /* @__PURE__ */ t(Cs, {}),
344
+ "aria-label": o("slotGrid.previousDays"),
345
+ size: e === "lg" ? "md" : "sm",
346
+ intent: "ghost",
347
+ flipIconInRtl: !0,
348
+ disabled: !K || m,
349
+ onClick: W
350
+ }
351
+ ),
352
+ _ ? /* @__PURE__ */ t(
353
+ $,
354
+ {
355
+ intent: "secondary",
356
+ size: e === "lg" ? "md" : "sm",
357
+ disabled: m,
358
+ onClick: q,
359
+ children: o("slotGrid.nextAvailable")
360
+ }
361
+ ) : /* @__PURE__ */ t("span", { "aria-hidden": "true" }),
362
+ /* @__PURE__ */ t(
363
+ A,
364
+ {
365
+ icon: /* @__PURE__ */ t(Ls, {}),
366
+ "aria-label": o("slotGrid.nextDays"),
367
+ size: e === "lg" ? "md" : "sm",
368
+ intent: "ghost",
369
+ flipIconInRtl: !0,
370
+ disabled: !M || m,
371
+ onClick: X
372
+ }
373
+ )
374
+ ] }),
375
+ b
376
+ ]
377
+ }
378
+ );
379
+ }
380
+ );
381
+ Ds.displayName = "SlotGrid";
382
+ export {
383
+ Ds as S,
384
+ Ts as f,
385
+ Rs as i
386
+ };
387
+ //# sourceMappingURL=slot-grid-B2zprPcv.js.map
@@ -0,0 +1,23 @@
1
+ import { c as a } from "./createLucideIcon-CrFbzy84.js";
2
+ /**
3
+ * @license lucide-react v1.8.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const e = [
9
+ [
10
+ "path",
11
+ {
12
+ d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
13
+ key: "1s2grr"
14
+ }
15
+ ],
16
+ ["path", { d: "M20 2v4", key: "1rf3ol" }],
17
+ ["path", { d: "M22 4h-4", key: "gwowj6" }],
18
+ ["circle", { cx: "4", cy: "20", r: "2", key: "6kqj1y" }]
19
+ ], l = a("sparkles", e);
20
+ export {
21
+ l as S
22
+ };
23
+ //# sourceMappingURL=sparkles-CuYXqQLg.js.map
@@ -105,7 +105,7 @@ const f = i("ds:inline-block ds:shrink-0 ds:text-current", {
105
105
  variant: {
106
106
  pulse: "ds:animate-[spinner-pulse_var(--spinner-duration)_ease-in-out_infinite]",
107
107
  chase: "ds:animate-[spinner-chase_var(--spinner-duration)_ease-out_infinite]",
108
- prism: "ds:animate-[spinner-prism_var(--spinner-duration)_linear_infinite] ds:motion-reduce:fill-[var(--color-violet-500)]"
108
+ prism: "ds:animate-[spinner-prism_var(--spinner-duration)_linear_infinite] ds:motion-reduce:fill-[var(--primary)]"
109
109
  },
110
110
  position: {
111
111
  top: "ds:[--spinner-position:0]",
@@ -213,4 +213,4 @@ v.displayName = "Spinner";
213
213
  export {
214
214
  v as S
215
215
  };
216
- //# sourceMappingURL=spinner-DirtWZNG.js.map
216
+ //# sourceMappingURL=spinner-CCByyvcb.js.map
@@ -0,0 +1,257 @@
1
+ import { jsx as e, jsxs as i, Fragment as x } from "react/jsx-runtime";
2
+ import { forwardRef as E, useMemo as P, useImperativeHandle as R } from "react";
3
+ import * as m from "@radix-ui/react-accordion";
4
+ import { c as v } from "./index-D2ZczOXr.js";
5
+ import { useTranslation as B } from "react-i18next";
6
+ import { C as D } from "./chevron-down-BX_NP2Yh.js";
7
+ import { c as G } from "./createLucideIcon-CrFbzy84.js";
8
+ /**
9
+ * @license lucide-react v1.8.0 - ISC
10
+ *
11
+ * This source code is licensed under the ISC license.
12
+ * See the LICENSE file in the root directory of this source tree.
13
+ */
14
+ const H = [
15
+ ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
16
+ ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
17
+ ], U = G("lock", H);
18
+ function W(a, c, r) {
19
+ return r === "error" ? "error" : a === c ? "current" : r === "completed" || a < c ? "completed" : "upcoming";
20
+ }
21
+ const k = "step-", y = (a) => `${k}${a}`, O = (a) => Number(a.slice(k.length)), p = [
22
+ "ds:[stroke-dasharray:1] ds:[stroke-dashoffset:1]",
23
+ "ds:animate-[stepper-icon-draw_var(--animation-duration)_var(--ease-out)_forwards]",
24
+ "ds:motion-reduce:animate-none ds:motion-reduce:[stroke-dashoffset:0]"
25
+ ].join(" ");
26
+ function X() {
27
+ return /* @__PURE__ */ e(
28
+ "svg",
29
+ {
30
+ viewBox: "0 0 24 24",
31
+ fill: "none",
32
+ stroke: "currentColor",
33
+ strokeWidth: "3",
34
+ strokeLinecap: "round",
35
+ strokeLinejoin: "round",
36
+ "aria-hidden": "true",
37
+ className: "ds:size-4",
38
+ children: /* @__PURE__ */ e("path", { pathLength: "1", d: "M5 12l5 5L20 7", className: p })
39
+ }
40
+ );
41
+ }
42
+ function q() {
43
+ return /* @__PURE__ */ i(
44
+ "svg",
45
+ {
46
+ viewBox: "0 0 24 24",
47
+ fill: "none",
48
+ stroke: "currentColor",
49
+ strokeWidth: "3",
50
+ strokeLinecap: "round",
51
+ strokeLinejoin: "round",
52
+ "aria-hidden": "true",
53
+ className: "ds:size-4",
54
+ children: [
55
+ /* @__PURE__ */ e("path", { pathLength: "1", d: "M6 6l12 12", className: p }),
56
+ /* @__PURE__ */ e("path", { pathLength: "1", d: "M18 6l-12 12", className: p })
57
+ ]
58
+ }
59
+ );
60
+ }
61
+ const J = [
62
+ "ds:inline-flex ds:shrink-0 ds:items-center ds:justify-center",
63
+ "ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)]",
64
+ "ds:size-[var(--min-target-size)]",
65
+ "ds:rounded-[var(--radius-full)]",
66
+ "ds:text-[var(--font-size-sm)] ds:font-[var(--font-weight-semibold)]",
67
+ "ds:border ds:border-[var(--border)]",
68
+ "ds:transition-[background-color,border-color,color]",
69
+ "ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]",
70
+ "ds:motion-reduce:transition-none"
71
+ ].join(" "), K = v(J, {
72
+ variants: {
73
+ state: {
74
+ upcoming: "ds:bg-[var(--background)] ds:text-[var(--muted-foreground)]",
75
+ current: [
76
+ "ds:border-[var(--primary)] ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]",
77
+ "ds:animate-[stepper-indicator-pop_var(--animation-duration)_var(--ease-out)_both]",
78
+ "ds:motion-reduce:animate-none"
79
+ ].join(" "),
80
+ completed: "ds:border-[var(--primary)] ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]",
81
+ error: [
82
+ "ds:border-[var(--destructive)] ds:bg-[var(--destructive)] ds:text-[var(--destructive-foreground)]",
83
+ "ds:animate-[stepper-indicator-pop_var(--animation-duration)_var(--ease-out)_both]",
84
+ "ds:motion-reduce:animate-none"
85
+ ].join(" ")
86
+ }
87
+ }
88
+ }), Q = v(
89
+ [
90
+ "ds:group/item ds:overflow-hidden ds:rounded-[var(--radius-md)]",
91
+ "ds:border ds:border-[var(--border)] ds:bg-[var(--card)]",
92
+ "ds:data-[state=open]:border-[var(--primary)]",
93
+ "ds:transition-[border-color] ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]",
94
+ "ds:motion-reduce:transition-none"
95
+ ].join(" "),
96
+ {
97
+ variants: {
98
+ tone: {
99
+ neutral: "",
100
+ error: "ds:data-[state=open]:border-[var(--destructive)]"
101
+ }
102
+ },
103
+ defaultVariants: { tone: "neutral" }
104
+ }
105
+ ), Y = [
106
+ "ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-sm)]",
107
+ "ds:min-h-[var(--min-target-size)]",
108
+ "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
109
+ "ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]",
110
+ "ds:text-start",
111
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
112
+ "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
113
+ "ds:disabled:cursor-not-allowed",
114
+ "ds:transition-[background-color] ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]",
115
+ "ds:motion-reduce:transition-none",
116
+ "ds:hover:enabled:bg-[var(--muted)]/40"
117
+ ].join(" "), Z = (a) => [
118
+ "type-body-sm",
119
+ a === "current" || a === "error" ? "ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]" : a === "completed" ? "ds:text-[var(--foreground)]" : "ds:text-[var(--muted-foreground)]"
120
+ ].join(" "), S = [
121
+ "type-meta ds:text-[var(--muted-foreground)]",
122
+ "ds:mt-[var(--spacing-xs)]"
123
+ ].join(" "), N = [
124
+ "type-meta",
125
+ "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
126
+ "ds:text-[var(--muted-foreground)]"
127
+ ].join(" "), ee = [
128
+ "ds:size-4 ds:shrink-0 ds:text-[var(--muted-foreground)]",
129
+ "ds:transition-transform ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]",
130
+ "ds:motion-reduce:transition-none",
131
+ "ds:group-data-[state=open]/item:rotate-180"
132
+ ].join(" "), re = [
133
+ "type-meta ds:text-[var(--muted-foreground)]",
134
+ "ds:ps-[calc(var(--min-target-size)+var(--spacing-md)+var(--spacing-sm))]",
135
+ "ds:pe-[var(--spacing-md)] ds:pb-[var(--spacing-sm)]",
136
+ "ds:group-data-[state=open]/item:hidden"
137
+ ].join(" "), se = [
138
+ "ds:overflow-hidden",
139
+ "ds:data-[state=open]:animate-[accordion-down_var(--animation-duration)_var(--ease-out)]",
140
+ "ds:data-[state=closed]:animate-[accordion-up_var(--animation-duration)_var(--ease-in)]"
141
+ ].join(" "), ae = [
142
+ "ds:ps-[calc(var(--min-target-size)+var(--spacing-md)+var(--spacing-sm))]",
143
+ "ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-xs)] ds:pb-[var(--spacing-md)]"
144
+ ].join(" "), te = v("ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", {
145
+ variants: {}
146
+ }), ne = E(
147
+ ({
148
+ activeStep: a,
149
+ steps: c,
150
+ onStepChange: r,
151
+ "aria-label": w,
152
+ id: f,
153
+ className: j,
154
+ ..._
155
+ }, C) => {
156
+ const { t: d } = B(), l = c.length, o = Math.max(0, Math.min(a, l - 1)), z = w ?? d("navigation.stepper.label"), g = d("navigation.stepper.edit"), L = d("navigation.stepper.locked"), M = d("navigation.stepper.completed"), V = d("navigation.stepper.error"), A = (t) => {
157
+ if (!t) return;
158
+ const s = O(t);
159
+ Number.isFinite(s) && s !== o && (r == null || r(s));
160
+ }, h = P(
161
+ () => ({
162
+ getCurrentStep: () => o,
163
+ getTotalSteps: () => l,
164
+ getOpenSteps: () => [o],
165
+ gotoStep: (t) => {
166
+ if (!r) return;
167
+ const s = Math.max(0, Math.min(t, Math.max(l - 1, 0)));
168
+ s !== o && r(s);
169
+ },
170
+ next: () => {
171
+ r && o < l - 1 && r(o + 1);
172
+ },
173
+ previous: () => {
174
+ r && o > 0 && r(o - 1);
175
+ }
176
+ }),
177
+ [o, l, r]
178
+ );
179
+ return R(C, () => h, [h]), /* @__PURE__ */ e(
180
+ m.Root,
181
+ {
182
+ type: "single",
183
+ value: y(o),
184
+ onValueChange: A,
185
+ collapsible: !1,
186
+ "aria-label": z,
187
+ id: f,
188
+ "data-component": "stepper-accordion",
189
+ "data-component-id": f,
190
+ className: te({ className: j }),
191
+ ..._,
192
+ children: c.map((t, s) => {
193
+ const n = W(s, o, t.status), u = n === "current" || n === "error", F = n === "upcoming", I = n === "error" ? "error" : "neutral", b = d("navigation.stepper.stepN", { n: s + 1 }), T = n === "completed" ? /* @__PURE__ */ i(x, { children: [
194
+ /* @__PURE__ */ e(X, {}),
195
+ /* @__PURE__ */ e("span", { className: "ds:sr-only", children: M })
196
+ ] }) : n === "error" ? /* @__PURE__ */ i(x, { children: [
197
+ /* @__PURE__ */ e(q, {}),
198
+ /* @__PURE__ */ e("span", { className: "ds:sr-only", children: V })
199
+ ] }) : /* @__PURE__ */ e("span", { children: s + 1 }), $ = n === "completed" ? /* @__PURE__ */ e("span", { className: N, children: g }) : n === "upcoming" ? /* @__PURE__ */ i("span", { className: N, children: [
200
+ /* @__PURE__ */ e(U, { "aria-hidden": "true", className: "ds:size-3" }),
201
+ L
202
+ ] }) : null;
203
+ return /* @__PURE__ */ i(
204
+ m.Item,
205
+ {
206
+ value: y(s),
207
+ "data-step-id": String(s),
208
+ className: Q({ tone: I }),
209
+ children: [
210
+ /* @__PURE__ */ e(m.Header, { className: "ds:flex", children: /* @__PURE__ */ i(
211
+ m.Trigger,
212
+ {
213
+ disabled: F,
214
+ "aria-disabled": u || void 0,
215
+ "aria-label": n === "completed" ? `${b}, ${g}` : b,
216
+ "aria-current": u ? "step" : void 0,
217
+ className: Y,
218
+ children: [
219
+ /* @__PURE__ */ e(
220
+ "span",
221
+ {
222
+ "aria-hidden": "true",
223
+ className: K({ state: n }),
224
+ children: T
225
+ }
226
+ ),
227
+ /* @__PURE__ */ i("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col", children: [
228
+ /* @__PURE__ */ e("span", { className: Z(n), children: t.label }),
229
+ t.description ? /* @__PURE__ */ e("span", { className: S, children: t.description }) : null
230
+ ] }),
231
+ $,
232
+ u ? null : /* @__PURE__ */ e(
233
+ D,
234
+ {
235
+ "aria-hidden": "true",
236
+ className: ee
237
+ }
238
+ )
239
+ ]
240
+ }
241
+ ) }),
242
+ t.summary && n === "completed" ? /* @__PURE__ */ e("div", { className: re, children: t.summary }) : null,
243
+ /* @__PURE__ */ e(m.Content, { className: se, children: /* @__PURE__ */ e("div", { className: ae, children: t.content }) })
244
+ ]
245
+ },
246
+ s
247
+ );
248
+ })
249
+ }
250
+ );
251
+ }
252
+ );
253
+ ne.displayName = "StepperAccordion";
254
+ export {
255
+ ne as S
256
+ };
257
+ //# sourceMappingURL=stepper-accordion-BfS6lUB9.js.map