@alfadocs/ui-kit 0.23.0 → 0.25.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 (86) hide show
  1. package/dist/_chunks/{autocomplete-BxfabhZ8.js → autocomplete-C7xq06bP.js} +40 -40
  2. package/dist/_chunks/{card-CWzuTLYE.js → card-C353dU-H.js} +21 -13
  3. package/dist/_chunks/carousel.agent-DnPiqijR.js +1733 -0
  4. package/dist/_chunks/{contact-card-DTQUMetD.js → contact-card-CjG7c-1q.js} +2 -2
  5. package/dist/_chunks/description-list-Bsga4IW8.js +309 -0
  6. package/dist/_chunks/editable-currency-cell-renderer-DJB5MxAI.js +2349 -0
  7. package/dist/_chunks/locale-picker-BxEUUPW7.js +638 -0
  8. package/dist/_chunks/{patient-shell-DavGODt9.js → patient-shell-B164drIa.js} +40 -55
  9. package/dist/_chunks/settings-ca2Yi9R8.js +21 -0
  10. package/dist/_chunks/sun-Eweh5fvi.js +50 -0
  11. package/dist/_chunks/{theme-toggle-BswYl0Yp.js → theme-toggle-FrotC2VI.js} +85 -127
  12. package/dist/_chunks/{timeline-Czeqr3HF.js → timeline-jmd7lfDf.js} +19 -12
  13. package/dist/_chunks/use-locale-BkCIHujH.js +20 -0
  14. package/dist/_chunks/use-scroll-to-first-error-BrK7dKB_.js +55 -0
  15. package/dist/_chunks/{whatsapp-button-CtlLwM3M.js → whatsapp-button-DUjlWGKf.js} +26 -25
  16. package/dist/_chunks/{workflow-map-712GL-8u.js → workflow-map-BR6txfFX.js} +2 -2
  17. package/dist/agent-catalog.json +59 -1
  18. package/dist/components/autocomplete/index.js +1 -1
  19. package/dist/components/card/index.js +1 -1
  20. package/dist/components/carousel/carousel.d.ts +21 -0
  21. package/dist/components/carousel/index.js +1 -1
  22. package/dist/components/contact-card/index.js +1 -1
  23. package/dist/components/data-table/filters/number-filter.d.ts +56 -0
  24. package/dist/components/data-table/filters/text-filter.d.ts +49 -0
  25. package/dist/components/data-table/index.d.ts +4 -0
  26. package/dist/components/data-table/index.js +25 -21
  27. package/dist/components/description-list/description-list.d.ts +40 -0
  28. package/dist/components/description-list/index.d.ts +1 -1
  29. package/dist/components/description-list/index.js +1 -1
  30. package/dist/components/header-settings/index.js +232 -0
  31. package/dist/components/locale-picker/index.js +7 -0
  32. package/dist/components/theme-toggle/index.js +1 -1
  33. package/dist/components/timeline/index.js +1 -1
  34. package/dist/components/whatsapp-button/index.js +1 -1
  35. package/dist/components/whatsapp-button/whatsapp-button.d.ts +14 -1
  36. package/dist/components/workflow/index.js +1 -1
  37. package/dist/fonts/Lexend-VF-latin-ext.woff2 +0 -0
  38. package/dist/fonts/Lexend-VF-latin.woff2 +0 -0
  39. package/dist/fonts/Lexend-VF-vietnamese.woff2 +0 -0
  40. package/dist/fonts/NotoSansArabic-VF-arabic.woff2 +0 -0
  41. package/dist/fonts/NotoSansDevanagari-VF-devanagari.woff2 +0 -0
  42. package/dist/hooks/index.js +29 -28
  43. package/dist/i18n/config.js +2726 -134
  44. package/dist/i18n/locales/ar.d.ts +147 -3
  45. package/dist/i18n/locales/de.d.ts +147 -3
  46. package/dist/i18n/locales/el.d.ts +147 -3
  47. package/dist/i18n/locales/es.d.ts +147 -3
  48. package/dist/i18n/locales/fr.d.ts +147 -3
  49. package/dist/i18n/locales/hi.d.ts +147 -3
  50. package/dist/i18n/locales/ja.d.ts +147 -3
  51. package/dist/i18n/locales/nl.d.ts +147 -3
  52. package/dist/i18n/locales/pl.d.ts +149 -5
  53. package/dist/i18n/locales/pt.d.ts +147 -3
  54. package/dist/i18n/locales/ro.d.ts +147 -3
  55. package/dist/i18n/locales/ru.d.ts +148 -4
  56. package/dist/i18n/locales/sq.d.ts +147 -3
  57. package/dist/i18n/locales/sv.d.ts +147 -3
  58. package/dist/i18n/locales/tr.d.ts +147 -3
  59. package/dist/i18n/locales/zh.d.ts +147 -3
  60. package/dist/i18n/resources.d.ts +294 -6
  61. package/dist/index.js +512 -507
  62. package/dist/locales/ar.json +149 -5
  63. package/dist/locales/de.json +149 -5
  64. package/dist/locales/el.json +149 -5
  65. package/dist/locales/en.json +147 -3
  66. package/dist/locales/es.json +149 -5
  67. package/dist/locales/fr.json +149 -5
  68. package/dist/locales/hi.json +149 -5
  69. package/dist/locales/it.json +147 -3
  70. package/dist/locales/ja.json +149 -5
  71. package/dist/locales/nl.json +149 -5
  72. package/dist/locales/pl.json +151 -7
  73. package/dist/locales/pt.json +149 -5
  74. package/dist/locales/ro.json +149 -5
  75. package/dist/locales/ru.json +150 -6
  76. package/dist/locales/sq.json +149 -5
  77. package/dist/locales/sv.json +149 -5
  78. package/dist/locales/tr.json +149 -5
  79. package/dist/locales/zh.json +149 -5
  80. package/dist/patterns/patient-shell/index.js +1 -1
  81. package/dist/tokens.css +2 -2
  82. package/package.json +10 -1
  83. package/dist/_chunks/carousel.agent-CQPFfppK.js +0 -1696
  84. package/dist/_chunks/description-list-y7Hk51KI.js +0 -191
  85. package/dist/_chunks/editable-currency-cell-renderer-1t42gENX.js +0 -1972
  86. package/dist/_chunks/use-locale-C5rS3Xon.js +0 -71
@@ -0,0 +1,232 @@
1
+ import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
+ import { forwardRef as T, useRef as g, useImperativeHandle as A, useCallback as C, useMemo as I } from "react";
3
+ import { c as N } from "../../_chunks/index-D2ZczOXr.js";
4
+ import { useTranslation as E } from "react-i18next";
5
+ import { I as o } from "../../_chunks/icon-button-C4CGcYuz.js";
6
+ import { I as R } from "../../_chunks/icon-button-group-DeV3FpNY.js";
7
+ import { D as r } from "../../_chunks/dropdown-menu-DZxwF23X.js";
8
+ import { S as x } from "../../_chunks/switch-D916VW86.js";
9
+ import { c as v, a as M, L as _ } from "../../_chunks/locale-picker-BxEUUPW7.js";
10
+ import { u as H } from "../../_chunks/use-locale-BkCIHujH.js";
11
+ import { u as O } from "../../_chunks/use-theme-B1cwAXJR.js";
12
+ import { u as P } from "../../_chunks/registry-C9nwlNyL.js";
13
+ import { S as K } from "../../_chunks/settings-ca2Yi9R8.js";
14
+ import { S as j, M as D, a as V } from "../../_chunks/sun-Eweh5fvi.js";
15
+ const z = {
16
+ id: "header-settings",
17
+ capabilities: ["view_change"],
18
+ state: {},
19
+ actions: {
20
+ set_locale: {
21
+ safety: "write",
22
+ argsType: "{ locale: string }",
23
+ descriptionKey: "ui.agent.headerSettings.actions.setLocale",
24
+ description: "Switch the active locale to the given IETF tag.",
25
+ invoke: (t, i) => {
26
+ t.setLocale(i.locale);
27
+ }
28
+ },
29
+ set_theme: {
30
+ safety: "write",
31
+ argsType: '{ theme: "light" | "dark" | "system" }',
32
+ descriptionKey: "ui.agent.headerSettings.actions.setTheme",
33
+ description: "Switch the theme preference.",
34
+ invoke: (t, i) => {
35
+ t.setTheme(i.theme);
36
+ }
37
+ },
38
+ set_accessibility: {
39
+ safety: "write",
40
+ argsType: '{ accessibility: "default" | "accessible" }',
41
+ descriptionKey: "ui.agent.headerSettings.actions.setAccessibility",
42
+ description: "Switch the accessibility preference.",
43
+ invoke: (t, i) => {
44
+ t.setAccessibility(i.accessibility);
45
+ }
46
+ }
47
+ },
48
+ domHooks: {
49
+ root: {
50
+ attr: "data-component",
51
+ value: "header-settings",
52
+ description: "Marks the HeaderSettings wrapper."
53
+ }
54
+ }
55
+ };
56
+ function B(t, i) {
57
+ if (!(typeof window > "u"))
58
+ try {
59
+ window.localStorage.setItem(t, i);
60
+ } catch {
61
+ }
62
+ }
63
+ function G(t) {
64
+ if (typeof document > "u") return;
65
+ const i = document.documentElement;
66
+ i.lang = t, i.dir = v[t].dir;
67
+ }
68
+ const W = N("ds:inline-flex ds:items-center", {
69
+ variants: {
70
+ align: {
71
+ start: "",
72
+ end: ""
73
+ }
74
+ },
75
+ defaultVariants: { align: "end" }
76
+ }), F = [
77
+ "ds:w-[20rem] ds:p-[var(--spacing-xs)]",
78
+ "ds:rounded-[var(--radius-md)] ds:border ds:border-border",
79
+ "ds:bg-background ds:text-foreground ds:shadow-[var(--shadow-lg)]"
80
+ ].join(" "), U = T(
81
+ (t, i) => {
82
+ const {
83
+ align: p = "end",
84
+ disabled: y = !1,
85
+ className: S,
86
+ id: m,
87
+ ...w
88
+ } = t, { t: s } = E(), n = O(), { setLocale: h } = H(), u = g(null);
89
+ A(i, () => u.current, []);
90
+ const f = C(
91
+ (a) => {
92
+ h(a), G(a), B(_, a);
93
+ },
94
+ [h]
95
+ ), b = g(f);
96
+ b.current = f;
97
+ const c = g(n);
98
+ c.current = n;
99
+ const L = I(
100
+ () => ({
101
+ setLocale: (a) => {
102
+ Object.prototype.hasOwnProperty.call(v, a) && b.current(a);
103
+ },
104
+ setTheme: (a) => c.current.setTheme(a),
105
+ setAccessibility: (a) => c.current.setAccessibility(a)
106
+ }),
107
+ []
108
+ );
109
+ P(z, L, m);
110
+ const k = n.accessibility === "accessible";
111
+ return /* @__PURE__ */ e(
112
+ "div",
113
+ {
114
+ ref: u,
115
+ "data-component": "header-settings",
116
+ "data-component-id": m,
117
+ className: W({ align: p, className: S }),
118
+ ...w,
119
+ children: /* @__PURE__ */ d(r.Root, { children: [
120
+ /* @__PURE__ */ e(r.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
121
+ o,
122
+ {
123
+ disabled: y,
124
+ icon: /* @__PURE__ */ e(K, { "aria-hidden": !0 }),
125
+ "aria-label": s("navigation.headerSettings.trigger")
126
+ }
127
+ ) }),
128
+ /* @__PURE__ */ e(r.Portal, { children: /* @__PURE__ */ d(
129
+ r.Content,
130
+ {
131
+ align: p,
132
+ sideOffset: 8,
133
+ className: F,
134
+ onKeyDownCapture: (a) => {
135
+ const l = a.target;
136
+ (l == null ? void 0 : l.tagName) === "INPUT" && // Always allow Escape so the menu can close.
137
+ a.key !== "Escape" && a.stopPropagation();
138
+ },
139
+ children: [
140
+ /* @__PURE__ */ e(r.Label, { children: s("navigation.headerSettings.language.label") }),
141
+ /* @__PURE__ */ e(
142
+ "div",
143
+ {
144
+ role: "group",
145
+ "aria-label": s("navigation.headerSettings.language.label"),
146
+ className: "ds:py-[var(--spacing-xs)]",
147
+ children: /* @__PURE__ */ e(M.SearchList, {})
148
+ }
149
+ ),
150
+ /* @__PURE__ */ e(r.Separator, {}),
151
+ /* @__PURE__ */ e(r.Label, { children: s("navigation.headerSettings.appearance.label") }),
152
+ /* @__PURE__ */ e(
153
+ "div",
154
+ {
155
+ role: "group",
156
+ "aria-label": s("navigation.headerSettings.appearance.label"),
157
+ className: "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
158
+ children: /* @__PURE__ */ d(
159
+ R,
160
+ {
161
+ role: "radiogroup",
162
+ mode: "toggle-single",
163
+ size: "sm",
164
+ "aria-label": s("navigation.headerSettings.appearance.label"),
165
+ value: n.theme,
166
+ onValueChange: (a) => n.setTheme(a),
167
+ children: [
168
+ /* @__PURE__ */ e(
169
+ o,
170
+ {
171
+ icon: /* @__PURE__ */ e(j, { "aria-hidden": !0 }),
172
+ "aria-label": s("navigation.headerSettings.appearance.light"),
173
+ value: "light"
174
+ }
175
+ ),
176
+ /* @__PURE__ */ e(
177
+ o,
178
+ {
179
+ icon: /* @__PURE__ */ e(D, { "aria-hidden": !0 }),
180
+ "aria-label": s("navigation.headerSettings.appearance.dark"),
181
+ value: "dark"
182
+ }
183
+ ),
184
+ /* @__PURE__ */ e(
185
+ o,
186
+ {
187
+ icon: /* @__PURE__ */ e(V, { "aria-hidden": !0 }),
188
+ "aria-label": s(
189
+ "navigation.headerSettings.appearance.system"
190
+ ),
191
+ value: "system"
192
+ }
193
+ )
194
+ ]
195
+ }
196
+ )
197
+ }
198
+ ),
199
+ /* @__PURE__ */ e(r.Separator, {}),
200
+ /* @__PURE__ */ e(
201
+ "div",
202
+ {
203
+ role: "group",
204
+ "aria-label": s(
205
+ "navigation.headerSettings.appearance.accessible"
206
+ ),
207
+ className: "ds:px-[var(--spacing-sm)] ds:py-[var(--spacing-sm)]",
208
+ children: /* @__PURE__ */ e(
209
+ x,
210
+ {
211
+ label: s("navigation.headerSettings.appearance.accessible"),
212
+ labelSide: "start",
213
+ size: "sm",
214
+ checked: k,
215
+ onCheckedChange: (a) => n.setAccessibility(a ? "accessible" : "default")
216
+ }
217
+ )
218
+ }
219
+ )
220
+ ]
221
+ }
222
+ ) })
223
+ ] })
224
+ }
225
+ );
226
+ }
227
+ );
228
+ U.displayName = "HeaderSettings";
229
+ export {
230
+ U as HeaderSettings
231
+ };
232
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ import { L, a as c, b as r } from "../../_chunks/locale-picker-BxEUUPW7.js";
2
+ export {
3
+ L as LOCALE_STORAGE_KEY,
4
+ c as LocalePicker,
5
+ r as LocalePickerSearchList
6
+ };
7
+ //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { T as o, t } from "../../_chunks/theme-toggle-BswYl0Yp.js";
1
+ import { T as o, t } from "../../_chunks/theme-toggle-FrotC2VI.js";
2
2
  export {
3
3
  o as ThemeToggle,
4
4
  t as themeToggleAgent
@@ -1,4 +1,4 @@
1
- import { T as t, t as m } from "../../_chunks/timeline-Czeqr3HF.js";
1
+ import { T as t, t as m } from "../../_chunks/timeline-jmd7lfDf.js";
2
2
  export {
3
3
  t as Timeline,
4
4
  m as timelineAgent
@@ -1,4 +1,4 @@
1
- import { W as p } from "../../_chunks/whatsapp-button-CtlLwM3M.js";
1
+ import { W as p } from "../../_chunks/whatsapp-button-DUjlWGKf.js";
2
2
  export {
3
3
  p as WhatsAppButton
4
4
  };
@@ -22,10 +22,23 @@ export interface WhatsAppButtonProps extends Omit<AnchorHTMLAttributes<HTMLAncho
22
22
  message?: string;
23
23
  /**
24
24
  * Override the visible / accessible label. Defaults to
25
- * `t('whatsApp.label')` for the pill variant and
25
+ * `t('whatsApp.label')` (or `t('whatsApp.questionPrompt')` when
26
+ * `tone="question"`) for the pill variant, and
26
27
  * `t('whatsApp.fabLabel')` for the FAB.
27
28
  */
28
29
  label?: ReactNode;
30
+ /**
31
+ * Copy tone for the pill variant.
32
+ * - `standard` (default) — brief "Chat on WhatsApp" affordance.
33
+ * - `question` — invitational "Have questions? Chat on WhatsApp"
34
+ * copy. Routes through `t('whatsApp.questionPrompt')`. Use on
35
+ * public-facing surfaces (booking pages, marketing) where the
36
+ * button is the only prompt encouraging engagement.
37
+ *
38
+ * Ignored for `variant="fab"` — the floating action button is
39
+ * glyph-only and its `aria-label` stays concise via `fabLabel`.
40
+ */
41
+ tone?: 'standard' | 'question';
29
42
  }
30
43
  export declare const WhatsAppButton: import("react").ForwardRefExoticComponent<WhatsAppButtonProps & import("react").RefAttributes<HTMLAnchorElement>>;
31
44
  export {};
@@ -1,4 +1,4 @@
1
- import { C as r, W as e, a as s, b as d, c as w, i as t, l as f, m as l, r as i, w as k, d as n, e as A, f as C } from "../../_chunks/workflow-map-712GL-8u.js";
1
+ import { C as r, W as e, a as s, b as d, c as w, i as t, l as f, m as l, r as i, w as k, d as n, e as A, f as C } from "../../_chunks/workflow-map-BR6txfFX.js";
2
2
  export {
3
3
  r as CORE_PATIENT_FIELDS,
4
4
  e as WorkflowCard,
Binary file
@@ -1,15 +1,16 @@
1
1
  import { u as D } from "../_chunks/use-prefers-reduced-motion-BMwIQRjB.js";
2
- import { u as w, a as _, b as k } from "../_chunks/use-locale-C5rS3Xon.js";
3
- import { u as g } from "../_chunks/use-count-up-BLLetaZ8.js";
4
- import { A as M, T as O, a as H, r as R, t as Y, u as q } from "../_chunks/use-theme-B1cwAXJR.js";
5
- import { u as G } from "../_chunks/use-controllable-state-BiY4xTzM.js";
6
- import { u as U } from "../_chunks/use-copy-to-clipboard-Cyfc_dlv.js";
7
- import { u as j } from "../_chunks/use-debounced-callback-BisrB-Fq.js";
8
- import { useState as p, useEffect as l, useRef as T, useLayoutEffect as x } from "react";
9
- import { u as z, a as J } from "../_chunks/use-direction-D6rvvG9G.js";
10
- import { u as W } from "../_chunks/use-persistent-state-i23OWy6G.js";
2
+ import { u as w, a as _ } from "../_chunks/use-scroll-to-first-error-BrK7dKB_.js";
3
+ import { u as I } from "../_chunks/use-count-up-BLLetaZ8.js";
4
+ import { u as K } from "../_chunks/use-locale-BkCIHujH.js";
5
+ import { A as O, T as H, a as R, r as Y, t as q, u as B } from "../_chunks/use-theme-B1cwAXJR.js";
6
+ import { u as P } from "../_chunks/use-controllable-state-BiY4xTzM.js";
7
+ import { u as V } from "../_chunks/use-copy-to-clipboard-Cyfc_dlv.js";
8
+ import { u as Q } from "../_chunks/use-debounced-callback-BisrB-Fq.js";
9
+ import { useState as b, useEffect as l, useRef as T, useLayoutEffect as x } from "react";
10
+ import { u as J, a as N } from "../_chunks/use-direction-D6rvvG9G.js";
11
+ import { u as X } from "../_chunks/use-persistent-state-i23OWy6G.js";
11
12
  function S(e, t) {
12
- const [o, s] = p(e);
13
+ const [o, s] = b(e);
13
14
  return l(() => {
14
15
  if (t <= 0) {
15
16
  s(e);
@@ -62,8 +63,8 @@ function C(e, t = {}) {
62
63
  r.preventDefault();
63
64
  return;
64
65
  }
65
- const m = c[0], b = c[c.length - 1], i = document.activeElement;
66
- r.shiftKey ? (i === m || !n.contains(i)) && (r.preventDefault(), b.focus()) : (i === b || !n.contains(i)) && (r.preventDefault(), m.focus());
66
+ const m = c[0], p = c[c.length - 1], i = document.activeElement;
67
+ r.shiftKey ? (i === m || !n.contains(i)) && (r.preventDefault(), p.focus()) : (i === p || !n.contains(i)) && (r.preventDefault(), m.focus());
67
68
  }
68
69
  return u.addEventListener("keydown", d), () => {
69
70
  if (u.removeEventListener("keydown", d), a && f.current) {
@@ -77,25 +78,25 @@ function C(e, t = {}) {
77
78
  }
78
79
  const L = typeof window < "u" ? x : l;
79
80
  export {
80
- M as ACCESSIBILITY_STORAGE_KEY,
81
- O as THEME_CLASS,
82
- H as THEME_STORAGE_KEY,
83
- R as resolveTheme,
84
- Y as themeClassList,
85
- G as useControllableState,
86
- U as useCopyToClipboard,
87
- g as useCountUp,
88
- j as useDebouncedCallback,
81
+ O as ACCESSIBILITY_STORAGE_KEY,
82
+ H as THEME_CLASS,
83
+ R as THEME_STORAGE_KEY,
84
+ Y as resolveTheme,
85
+ q as themeClassList,
86
+ P as useControllableState,
87
+ V as useCopyToClipboard,
88
+ I as useCountUp,
89
+ Q as useDebouncedCallback,
89
90
  S as useDebouncedValue,
90
- z as useDirection,
91
- J as useDocumentDirection,
91
+ J as useDirection,
92
+ N as useDocumentDirection,
92
93
  C as useFocusTrap,
93
94
  L as useIsomorphicLayoutEffect,
94
- w as useLocale,
95
- _ as useMediaQuery,
96
- W as usePersistentState,
95
+ K as useLocale,
96
+ w as useMediaQuery,
97
+ X as usePersistentState,
97
98
  D as usePrefersReducedMotion,
98
- k as useScrollToFirstError,
99
- q as useTheme
99
+ _ as useScrollToFirstError,
100
+ B as useTheme
100
101
  };
101
102
  //# sourceMappingURL=index.js.map