@alfadocs/ui-kit 1.75.1 → 1.77.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 (120) hide show
  1. package/dist/_chunks/{balance-badge-cell-B49xgL6H.js → balance-badge-cell-Dzd-Z_5W.js} +2 -2
  2. package/dist/_chunks/booking-Cz_QjIJe.js +4051 -0
  3. package/dist/_chunks/{breadcrumb-Boan-5n8.js → breadcrumb-Bn29NCnf.js} +8 -8
  4. package/dist/_chunks/{calendar-appointment-editor-dialog-B4My4eiB.js → calendar-appointment-editor-dialog-cvUpUjj-.js} +4 -4
  5. package/dist/_chunks/{control-room-rail-CKZ2nemY.js → control-room-rail-DcJpHbp4.js} +2 -2
  6. package/dist/_chunks/{data-table-DTKGWUQm.js → data-table-BlONA1rP.js} +2 -2
  7. package/dist/_chunks/{file-manager-Ct5QpZZI.js → file-manager-C9iJjDZt.js} +3 -3
  8. package/dist/_chunks/{header-settings-Coh1r41O.js → header-settings-BYpVmLip.js} +2 -2
  9. package/dist/_chunks/{heatmap-Ba9cgfSY.js → heatmap-C2Rg-SV_.js} +2 -2
  10. package/dist/_chunks/{marketplace-app-shell-Ck5NVJcO.js → marketplace-app-shell-mS7Q2-81.js} +3 -3
  11. package/dist/_chunks/{notes-panel-CxjMovCh.js → notes-panel-CZO1qsD-.js} +2 -2
  12. package/dist/_chunks/{otp-input-CGMu30_e.js → otp-input-BgEZi0py.js} +54 -53
  13. package/dist/_chunks/{practice-results-B4Z5q46r.js → practice-results-By2BZFCz.js} +820 -783
  14. package/dist/_chunks/{recaptcha-widget-CsvwlYTE.js → recaptcha-widget-iglUBIF3.js} +2 -2
  15. package/dist/_chunks/{registration-form-DeK2QiJu.js → registration-form-xORq2s4p.js} +3 -3
  16. package/dist/_chunks/signature-request-DjY-X62H.js +2448 -0
  17. package/dist/_chunks/{tasks-panel-Cmr0oMvc.js → tasks-panel-BkjtgjQ8.js} +2 -2
  18. package/dist/_chunks/{theme-toggle-DTrUzIBG.js → theme-toggle-DKpzb0-M.js} +2 -2
  19. package/dist/_chunks/{tool-rail-C_9lm0TC.js → tool-rail-Kup1b7xI.js} +2 -2
  20. package/dist/_chunks/use-theme-CYGyzFgZ.js +196 -0
  21. package/dist/agent-catalog.json +46 -10
  22. package/dist/agent-i18n/en.json +5 -4
  23. package/dist/components/booking/booking-types.d.ts +22 -1
  24. package/dist/components/booking/booking.d.ts +1 -1
  25. package/dist/components/booking/code-step.d.ts +6 -0
  26. package/dist/components/booking/index.d.ts +1 -1
  27. package/dist/components/booking/index.js +1 -1
  28. package/dist/components/booking/step-focus.d.ts +9 -0
  29. package/dist/components/booking/use-booking-payment.d.ts +6 -3
  30. package/dist/components/breadcrumb/index.js +1 -1
  31. package/dist/components/control-room-rail/index.js +1 -1
  32. package/dist/components/data-table/index.js +1 -1
  33. package/dist/components/file-manager/index.js +1 -1
  34. package/dist/components/header-settings/index.js +1 -1
  35. package/dist/components/heatmap/index.js +1 -1
  36. package/dist/components/index.d.ts +1 -1
  37. package/dist/components/notes-panel/index.js +1 -1
  38. package/dist/components/otp-input/index.js +1 -1
  39. package/dist/components/otp-input/otp-input.d.ts +1 -0
  40. package/dist/components/patient-table/index.js +1 -1
  41. package/dist/components/practice-results/index.d.ts +1 -1
  42. package/dist/components/practice-results/index.js +1 -1
  43. package/dist/components/practice-results/practice-results.d.ts +4 -0
  44. package/dist/components/recaptcha-widget/index.js +1 -1
  45. package/dist/components/tasks-panel/index.js +1 -1
  46. package/dist/components/theme-toggle/index.js +1 -1
  47. package/dist/components/tool-rail/index.js +1 -1
  48. package/dist/hooks/index.d.ts +1 -1
  49. package/dist/hooks/index.js +88 -86
  50. package/dist/hooks/use-theme.d.ts +9 -0
  51. package/dist/host-compat.css +4 -1
  52. package/dist/i18n/locales/ar.d.ts +29 -0
  53. package/dist/i18n/locales/ar.js +30 -1
  54. package/dist/i18n/locales/de.d.ts +29 -0
  55. package/dist/i18n/locales/de.js +30 -1
  56. package/dist/i18n/locales/el.d.ts +29 -0
  57. package/dist/i18n/locales/el.js +30 -1
  58. package/dist/i18n/locales/en.d.ts +29 -0
  59. package/dist/i18n/locales/en.js +30 -1
  60. package/dist/i18n/locales/es.d.ts +29 -0
  61. package/dist/i18n/locales/es.js +30 -1
  62. package/dist/i18n/locales/fr.d.ts +29 -0
  63. package/dist/i18n/locales/fr.js +30 -1
  64. package/dist/i18n/locales/hi.d.ts +29 -0
  65. package/dist/i18n/locales/hi.js +30 -1
  66. package/dist/i18n/locales/it.d.ts +29 -0
  67. package/dist/i18n/locales/it.js +30 -1
  68. package/dist/i18n/locales/ja.d.ts +29 -0
  69. package/dist/i18n/locales/ja.js +30 -1
  70. package/dist/i18n/locales/nl.d.ts +29 -0
  71. package/dist/i18n/locales/nl.js +30 -1
  72. package/dist/i18n/locales/pl.d.ts +29 -0
  73. package/dist/i18n/locales/pl.js +30 -1
  74. package/dist/i18n/locales/pt.d.ts +29 -0
  75. package/dist/i18n/locales/pt.js +30 -1
  76. package/dist/i18n/locales/ro.d.ts +29 -0
  77. package/dist/i18n/locales/ro.js +30 -1
  78. package/dist/i18n/locales/ru.d.ts +29 -0
  79. package/dist/i18n/locales/ru.js +30 -1
  80. package/dist/i18n/locales/sq.d.ts +29 -0
  81. package/dist/i18n/locales/sq.js +30 -1
  82. package/dist/i18n/locales/sv.d.ts +29 -0
  83. package/dist/i18n/locales/sv.js +30 -1
  84. package/dist/i18n/locales/tr.d.ts +29 -0
  85. package/dist/i18n/locales/tr.js +30 -1
  86. package/dist/i18n/locales/zh.d.ts +29 -0
  87. package/dist/i18n/locales/zh.js +30 -1
  88. package/dist/index.js +1209 -1207
  89. package/dist/locales/ar.json +30 -1
  90. package/dist/locales/de.json +30 -1
  91. package/dist/locales/el.json +30 -1
  92. package/dist/locales/en.json +30 -1
  93. package/dist/locales/es.json +30 -1
  94. package/dist/locales/fr.json +30 -1
  95. package/dist/locales/hi.json +30 -1
  96. package/dist/locales/it.json +30 -1
  97. package/dist/locales/ja.json +30 -1
  98. package/dist/locales/nl.json +30 -1
  99. package/dist/locales/pl.json +30 -1
  100. package/dist/locales/pt.json +30 -1
  101. package/dist/locales/ro.json +30 -1
  102. package/dist/locales/ru.json +30 -1
  103. package/dist/locales/sq.json +30 -1
  104. package/dist/locales/sv.json +30 -1
  105. package/dist/locales/tr.json +30 -1
  106. package/dist/locales/zh.json +30 -1
  107. package/dist/patterns/calendar/index.js +1 -1
  108. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  109. package/dist/patterns/registration-form/index.js +1 -1
  110. package/dist/patterns/signature-request/channel-meta.d.ts +8 -2
  111. package/dist/patterns/signature-request/index.js +1 -1
  112. package/dist/patterns/signature-request/minor-patient.d.ts +41 -0
  113. package/dist/patterns/signature-request/required-documents.d.ts +4 -3
  114. package/dist/patterns/signature-request/signature-request.d.ts +62 -12
  115. package/dist/theme-boot.js +26 -0
  116. package/dist/tokens.css +1 -1
  117. package/package.json +4 -2
  118. package/dist/_chunks/booking-D2r19Lia.js +0 -3901
  119. package/dist/_chunks/signature-request-ldmXj2X6.js +0 -2221
  120. package/dist/_chunks/use-theme-CAuo6EYT.js +0 -159
@@ -1,159 +0,0 @@
1
- import { useSyncExternalStore as D, useEffect as k, useCallback as M } from "react";
2
- const y = "alfadocs-ui.theme", b = "alfadocs-ui.accessibility", n = {
3
- light: "theme-light",
4
- dark: "theme-dark",
5
- accessible: "theme-accessible"
6
- }, _ = "(prefers-color-scheme: dark)", O = "(prefers-contrast: more)";
7
- function m(e) {
8
- if (typeof window > "u") return null;
9
- try {
10
- return window.localStorage.getItem(e);
11
- } catch {
12
- return null;
13
- }
14
- }
15
- function L(e, t) {
16
- if (!(typeof window > "u"))
17
- try {
18
- t === null ? window.localStorage.removeItem(e) : window.localStorage.setItem(e, t);
19
- } catch {
20
- }
21
- }
22
- function E(e) {
23
- return e === "light" || e === "dark" || e === "system";
24
- }
25
- function S(e) {
26
- return e === "default" || e === "accessible" || e === "system";
27
- }
28
- function I() {
29
- const e = m(y), t = m(b), r = typeof window < "u" && typeof window.matchMedia == "function", s = typeof document < "u" ? document.documentElement.classList : null, w = s ? s.contains(n.dark) ? "dark" : s.contains(n.light) ? "light" : null : null, v = s != null && s.contains(n.accessible) ? "accessible" : null;
30
- return {
31
- theme: E(e) ? e : w ?? "system",
32
- accessibility: S(t) ? t : v ?? "system",
33
- prefersDark: r ? window.matchMedia(_).matches : !1,
34
- prefersMoreContrast: r ? window.matchMedia(O).matches : !1
35
- };
36
- }
37
- let i = I();
38
- const g = /* @__PURE__ */ new Set();
39
- function c(e) {
40
- e.theme === i.theme && e.accessibility === i.accessibility && e.prefersDark === i.prefersDark && e.prefersMoreContrast === i.prefersMoreContrast || (i = e, g.forEach((t) => t()));
41
- }
42
- function R(e) {
43
- return g.add(e), () => {
44
- g.delete(e);
45
- };
46
- }
47
- function H() {
48
- return i;
49
- }
50
- function V() {
51
- return {
52
- theme: "system",
53
- accessibility: "system",
54
- prefersDark: !1,
55
- prefersMoreContrast: !1
56
- };
57
- }
58
- let h = 0, d = null, f = null, u = null;
59
- function Y(e) {
60
- c({ ...i, prefersDark: e.matches });
61
- }
62
- function F(e) {
63
- c({ ...i, prefersMoreContrast: e.matches });
64
- }
65
- function G(e) {
66
- if (e.key === y) {
67
- const t = E(e.newValue) ? e.newValue : "system";
68
- c({ ...i, theme: t });
69
- } else if (e.key === b) {
70
- const t = S(e.newValue) ? e.newValue : "system";
71
- c({ ...i, accessibility: t });
72
- }
73
- }
74
- function T() {
75
- if (typeof document > "u") return;
76
- const e = document.documentElement.classList, t = m(y), r = m(b), s = e.contains(n.dark) ? "dark" : e.contains(n.light) ? "light" : null, w = e.contains(
77
- n.accessible
78
- ) ? "accessible" : null;
79
- c({
80
- ...i,
81
- theme: E(t) ? t : s ?? "system",
82
- accessibility: S(r) ? r : w ?? "system"
83
- });
84
- }
85
- function C(e, t) {
86
- return typeof e.addEventListener == "function" ? (e.addEventListener("change", t), () => e.removeEventListener("change", t)) : (e.addListener(t), () => e.removeListener(t));
87
- }
88
- function K() {
89
- return h += 1, h > 1 || typeof window > "u" || (typeof window.matchMedia == "function" && (d = window.matchMedia(_), f = window.matchMedia(O), c({
90
- ...i,
91
- prefersDark: d.matches,
92
- prefersMoreContrast: f.matches
93
- }), a = C(d, Y), l = C(f, F)), u = G, window.addEventListener("storage", u), typeof document < "u" && typeof MutationObserver < "u" && (T(), o = new MutationObserver(T), o.observe(document.documentElement, {
94
- attributes: !0,
95
- attributeFilter: ["class"]
96
- }))), p;
97
- }
98
- let a = null, l = null, o = null;
99
- function p() {
100
- h -= 1, !(h > 0) && (a == null || a(), l == null || l(), a = null, l = null, d = null, f = null, u && typeof window < "u" && window.removeEventListener("storage", u), u = null, o == null || o.disconnect(), o = null);
101
- }
102
- function A(e) {
103
- const t = e.theme === "system" ? e.prefersDark ? "dark" : "light" : e.theme, r = e.accessibility === "system" ? e.prefersMoreContrast : e.accessibility === "accessible";
104
- return t === "dark" && r ? "dark-accessible" : t === "dark" ? "dark" : r ? "light-accessible" : "light";
105
- }
106
- function Q(e) {
107
- switch (e) {
108
- case "light":
109
- return [n.light];
110
- case "dark":
111
- return [n.dark];
112
- case "light-accessible":
113
- return [n.light, n.accessible];
114
- case "dark-accessible":
115
- return [n.dark, n.accessible];
116
- }
117
- }
118
- const U = [
119
- n.light,
120
- n.dark,
121
- n.accessible
122
- ];
123
- function B(e) {
124
- if (typeof document > "u") return;
125
- const t = document.documentElement, r = new Set(Q(e));
126
- U.forEach((s) => {
127
- r.has(s) ? t.classList.add(s) : t.classList.remove(s);
128
- });
129
- }
130
- function W() {
131
- const e = D(R, H, V);
132
- k(() => K(), []), k(() => {
133
- B(A(e));
134
- }, [e]);
135
- const t = M((s) => {
136
- L(y, s === "system" ? null : s), c({ ...i, theme: s });
137
- }, []), r = M((s) => {
138
- L(
139
- b,
140
- s === "system" ? null : s
141
- ), c({ ...i, accessibility: s });
142
- }, []);
143
- return {
144
- theme: e.theme,
145
- accessibility: e.accessibility,
146
- resolvedTheme: A(e),
147
- setTheme: t,
148
- setAccessibility: r
149
- };
150
- }
151
- export {
152
- b as A,
153
- n as T,
154
- y as a,
155
- A as r,
156
- Q as t,
157
- W as u
158
- };
159
- //# sourceMappingURL=use-theme-CAuo6EYT.js.map