@alfadocs/ui-kit 1.147.1 → 1.148.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 (108) hide show
  1. package/dist/_chunks/{appointment-details-panel.history-eqPMKmW0.js → appointment-details-panel.history-BxNqcA-r.js} +109 -110
  2. package/dist/_chunks/{appointment-timeline-D5qbZ7in.js → appointment-timeline-CuZW-CGT.js} +2 -2
  3. package/dist/_chunks/{bill-line-table-DnkFqMnM.js → bill-line-table-B8Cc2pTH.js} +2 -2
  4. package/dist/_chunks/button-group-CHQD8GJ0.js +449 -0
  5. package/dist/_chunks/{calendar-appointment-editor-dialog-sY-k0GGW.js → calendar-appointment-editor-dialog-Cz8F2H4M.js} +6 -6
  6. package/dist/_chunks/{calendar-waiting-list-panel-Bm7NAZdk.js → calendar-waiting-list-panel-C4T85b4q.js} +3 -3
  7. package/dist/_chunks/{calendar.sheets-CCvdZF-R.js → calendar.sheets-DsgPdycU.js} +4 -4
  8. package/dist/_chunks/{data-grid-CujX-2tF.js → data-grid-CkzbCZSo.js} +486 -476
  9. package/dist/_chunks/{default-tabs-CqP1uWdx.js → default-tabs-C45FVzsG.js} +3 -3
  10. package/dist/_chunks/editable-description-BsSjLnSx.js +193 -0
  11. package/dist/_chunks/{editable-description.agent-Bm_LBV2j.js → editable-description.agent-zyyR_hxB.js} +2 -2
  12. package/dist/_chunks/{face-scheme-ByYeboH9.js → face-scheme-BC2whb1S.js} +2 -2
  13. package/dist/_chunks/{invoice-upload-list-srvWy5_d.js → invoice-upload-list-BReimsvV.js} +3 -3
  14. package/dist/_chunks/{notes-panel-C9aB1Cma.js → notes-panel-BHMnLbEH.js} +2 -2
  15. package/dist/_chunks/prescription-history-CQuJmd4H.js +1846 -0
  16. package/dist/_chunks/{rich-text-editor-CJXc5GgH.js → rich-text-editor-BAcJq1PO.js} +445 -437
  17. package/dist/_chunks/{tasks-panel-DsjfS_k5.js → tasks-panel-DufAoAxG.js} +2 -2
  18. package/dist/_chunks/{toolbar-z_6tE7zG.js → toolbar-B9oh9XY9.js} +2 -2
  19. package/dist/_chunks/{use-appointment-details-read-Dod21IxM.js → use-appointment-details-read-kYp-gfhb.js} +417 -422
  20. package/dist/agent-catalog.json +2 -2
  21. package/dist/appointment-editor-panel/index.js +1 -1
  22. package/dist/browser-support.js +1 -1
  23. package/dist/calendar-action-buttons/index.js +1 -1
  24. package/dist/components/appointment-details-panel/appointment-details-panel.history.d.ts +4 -6
  25. package/dist/components/appointment-details-panel/index.js +1 -1
  26. package/dist/components/appointment-timeline/index.js +1 -1
  27. package/dist/components/bill-line-table/index.js +1 -1
  28. package/dist/components/bill-table/index.js +1 -1
  29. package/dist/components/button-group/button-group.d.ts +2 -1
  30. package/dist/components/button-group/index.js +1 -1
  31. package/dist/components/data-grid/data-grid.variants.d.ts +7 -1
  32. package/dist/components/data-grid/index.js +2 -2
  33. package/dist/components/editable-description/editable-description.d.ts +2 -1
  34. package/dist/components/editable-description/index.js +2 -2
  35. package/dist/components/face-scheme/index.js +1 -1
  36. package/dist/components/invoice-upload-list/index.js +1 -1
  37. package/dist/components/notes-panel/index.js +1 -1
  38. package/dist/components/rich-text-editor/index.js +1 -1
  39. package/dist/components/tasks-panel/index.js +1 -1
  40. package/dist/core.css +1 -1
  41. package/dist/find-free-slots-panel/index.js +1 -1
  42. package/dist/host-compat.css +7 -1
  43. package/dist/i18n/locales/ar.d.ts +0 -1
  44. package/dist/i18n/locales/ar.js +1 -2
  45. package/dist/i18n/locales/de.d.ts +0 -1
  46. package/dist/i18n/locales/de.js +1 -2
  47. package/dist/i18n/locales/el.d.ts +0 -1
  48. package/dist/i18n/locales/el.js +1 -2
  49. package/dist/i18n/locales/en.d.ts +0 -1
  50. package/dist/i18n/locales/en.js +1 -2
  51. package/dist/i18n/locales/es.d.ts +0 -1
  52. package/dist/i18n/locales/es.js +1 -2
  53. package/dist/i18n/locales/fr.d.ts +0 -1
  54. package/dist/i18n/locales/fr.js +1 -2
  55. package/dist/i18n/locales/hi.d.ts +0 -1
  56. package/dist/i18n/locales/hi.js +1 -2
  57. package/dist/i18n/locales/it.d.ts +0 -1
  58. package/dist/i18n/locales/it.js +1 -2
  59. package/dist/i18n/locales/ja.d.ts +0 -1
  60. package/dist/i18n/locales/ja.js +1 -2
  61. package/dist/i18n/locales/nl.d.ts +0 -1
  62. package/dist/i18n/locales/nl.js +1 -2
  63. package/dist/i18n/locales/pl.d.ts +0 -1
  64. package/dist/i18n/locales/pl.js +1 -2
  65. package/dist/i18n/locales/pt.d.ts +0 -1
  66. package/dist/i18n/locales/pt.js +1 -2
  67. package/dist/i18n/locales/ro.d.ts +0 -1
  68. package/dist/i18n/locales/ro.js +1 -2
  69. package/dist/i18n/locales/ru.d.ts +0 -1
  70. package/dist/i18n/locales/ru.js +1 -2
  71. package/dist/i18n/locales/sq.d.ts +0 -1
  72. package/dist/i18n/locales/sq.js +1 -2
  73. package/dist/i18n/locales/sv.d.ts +0 -1
  74. package/dist/i18n/locales/sv.js +1 -2
  75. package/dist/i18n/locales/tr.d.ts +0 -1
  76. package/dist/i18n/locales/tr.js +1 -2
  77. package/dist/i18n/locales/zh.d.ts +0 -1
  78. package/dist/i18n/locales/zh.js +1 -2
  79. package/dist/index.js +17 -17
  80. package/dist/locales/ar.json +1 -2
  81. package/dist/locales/de.json +1 -2
  82. package/dist/locales/el.json +1 -2
  83. package/dist/locales/en.json +1 -2
  84. package/dist/locales/es.json +1 -2
  85. package/dist/locales/fr.json +1 -2
  86. package/dist/locales/hi.json +1 -2
  87. package/dist/locales/it.json +1 -2
  88. package/dist/locales/ja.json +1 -2
  89. package/dist/locales/nl.json +1 -2
  90. package/dist/locales/pl.json +1 -2
  91. package/dist/locales/pt.json +1 -2
  92. package/dist/locales/ro.json +1 -2
  93. package/dist/locales/ru.json +1 -2
  94. package/dist/locales/sq.json +1 -2
  95. package/dist/locales/sv.json +1 -2
  96. package/dist/locales/tr.json +1 -2
  97. package/dist/locales/zh.json +1 -2
  98. package/dist/online-bookings-panel/index.js +1 -1
  99. package/dist/patterns/calendar/index.js +2 -2
  100. package/dist/patterns/prescription/index.d.ts +1 -1
  101. package/dist/patterns/prescription/index.js +1 -1
  102. package/dist/patterns/prescription/prescription-history.d.ts +28 -0
  103. package/dist/tokens.css +1 -1
  104. package/dist/waiting-list-panel/index.js +2 -2
  105. package/package.json +1 -1
  106. package/dist/_chunks/button-group-N60L3HMa.js +0 -408
  107. package/dist/_chunks/editable-description-BQauSuCG.js +0 -142
  108. package/dist/_chunks/prescription-history-CFs3JMIE.js +0 -1773
@@ -2,8 +2,8 @@ import { jsxs as T, jsx as l, Fragment as ne } from "react/jsx-runtime";
2
2
  import { useId as Pe, useMemo as M, createElement as mt, forwardRef as ft, useRef as K, useState as yt, useImperativeHandle as ht, useCallback as gt } from "react";
3
3
  import { useTranslation as v } from "react-i18next";
4
4
  import { u as Tt } from "./registry-DvAUVLHh.js";
5
- import { D as St, e as vt } from "./data-grid-CujX-2tF.js";
6
- import { D as N } from "./toolbar-z_6tE7zG.js";
5
+ import { D as St, e as vt } from "./data-grid-CkzbCZSo.js";
6
+ import { D as N } from "./toolbar-B9oh9XY9.js";
7
7
  import { I as wt } from "./icon-button-group-DEAx9M5v.js";
8
8
  import { c as w } from "./index-D2ZczOXr.js";
9
9
  import { b as It, a as kt } from "./accessible-target-D3j6F-AG.js";
@@ -2211,4 +2211,4 @@ export {
2211
2211
  ii as m,
2212
2212
  Ka as u
2213
2213
  };
2214
- //# sourceMappingURL=default-tabs-CqP1uWdx.js.map
2214
+ //# sourceMappingURL=default-tabs-C45FVzsG.js.map
@@ -0,0 +1,193 @@
1
+ import { jsx as s, jsxs as o } from "react/jsx-runtime";
2
+ import { forwardRef as H, useState as A, useRef as B, useMemo as q, useCallback as F, useLayoutEffect as G } from "react";
3
+ import { c as l } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as J } from "react-i18next";
5
+ import { B as K } from "./button-Dp4j9ygh.js";
6
+ import { I as Q } from "./icon-button-u9VMQn3x.js";
7
+ import { C as U, S as X } from "./skeleton-tTWJpvAq.js";
8
+ import { P as Y } from "./pencil-B1sKKyuT.js";
9
+ const D = l(
10
+ "ds:flex ds:min-w-0 ds:items-start ds:gap-[var(--spacing-xs)]"
11
+ ), j = l(
12
+ [
13
+ "ds:m-0 ds:flex ds:min-w-0 ds:flex-1 ds:list-none ds:flex-col ds:p-0",
14
+ "ds:gap-[var(--spacing-2xs)]"
15
+ ].join(" ")
16
+ ), Z = ["80%", "60%", "66%"], ee = l(
17
+ "ds:m-0 ds:min-w-0 ds:flex-1 type-body-sm ds:text-[color:var(--muted-foreground)]"
18
+ ), z = l(
19
+ "ds:flex ds:items-start ds:gap-[var(--spacing-xs)] type-body-sm ds:text-[color:var(--foreground)]"
20
+ ), R = l(
21
+ [
22
+ "ds:mt-[var(--spacing-sm)] ds:size-[var(--spacing-xs)] ds:shrink-0 ds:self-start",
23
+ "ds:rounded-[var(--radius-full)] ds:bg-[color:var(--border)]"
24
+ ].join(" ")
25
+ ), te = [
26
+ "ds:min-w-0 ds:[overflow-wrap:anywhere]",
27
+ "ds:data-[clamp]:overflow-hidden ds:data-[clamp]:[display:-webkit-box]",
28
+ "ds:data-[clamp]:[-webkit-box-orient:vertical]",
29
+ "ds:data-[clamp]:[-webkit-line-clamp:var(--editable-description-rows)]"
30
+ ].join(" "), se = H(
31
+ ({
32
+ value: g,
33
+ maxLines: v = 3,
34
+ loading: u = !1,
35
+ onEdit: x,
36
+ editButtonRef: L,
37
+ emptyLabel: M,
38
+ editLabel: I,
39
+ seeMoreLabel: O,
40
+ showLessLabel: T,
41
+ className: y,
42
+ ...w
43
+ }, N) => {
44
+ const { t: c } = J("ui"), [n, V] = A(!1), k = B(!1);
45
+ u && (k.current = !0);
46
+ const $ = k.current ? U : "", r = q(
47
+ () => (g ?? "").split(/\r?\n/).map((e) => e.trim()).filter(Boolean),
48
+ [g]
49
+ ), h = Math.max(1, v), b = B(null), [P, W] = A(r.length > h), m = F(() => {
50
+ const e = b.current;
51
+ if (!e) return;
52
+ const a = Array.from(
53
+ e.querySelectorAll("[data-editable-description-line]")
54
+ ), d = a.map((t) => t.lastElementChild);
55
+ for (const t of a) t.removeAttribute("data-hidden");
56
+ for (const t of d)
57
+ t.removeAttribute("data-clamp"), t.style.removeProperty("--editable-description-rows");
58
+ let i = h, p = !1;
59
+ a.forEach((t, _) => {
60
+ const f = d[_], E = parseFloat(getComputedStyle(f).lineHeight), S = E > 0 ? Math.max(
61
+ 1,
62
+ Math.round(f.getBoundingClientRect().height / E)
63
+ ) : 1;
64
+ if (i <= 0) {
65
+ p = !0, n || t.setAttribute("data-hidden", "");
66
+ return;
67
+ }
68
+ if (S > i) {
69
+ p = !0, n || (f.setAttribute("data-clamp", ""), f.style.setProperty(
70
+ "--editable-description-rows",
71
+ String(i)
72
+ )), i = 0;
73
+ return;
74
+ }
75
+ i -= S;
76
+ }), W((t) => t === p ? t : p);
77
+ }, [n, h]);
78
+ G(() => {
79
+ var i;
80
+ const e = b.current;
81
+ if (!e || (m(), typeof ResizeObserver > "u")) return;
82
+ let a = e.clientWidth;
83
+ const d = new ResizeObserver(() => {
84
+ e.clientWidth !== a && (a = e.clientWidth, m());
85
+ });
86
+ return d.observe(e), (i = document.fonts) == null || i.ready.then(m), () => d.disconnect();
87
+ }, [m, r]);
88
+ const C = I ?? c("editableDescription.edit");
89
+ return u && r.length === 0 ? /* @__PURE__ */ s(
90
+ "div",
91
+ {
92
+ ...w,
93
+ ref: N,
94
+ "data-component": "editable-description",
95
+ "data-loading": "",
96
+ "aria-busy": "true",
97
+ className: [D(), y].filter(Boolean).join(" "),
98
+ children: /* @__PURE__ */ s("ul", { "aria-hidden": "true", className: j(), children: Z.slice(0, Math.max(1, v)).map(
99
+ (e, a) => /* @__PURE__ */ o("li", { className: z(), children: [
100
+ /* @__PURE__ */ s("span", { className: R() }),
101
+ /* @__PURE__ */ s(
102
+ X,
103
+ {
104
+ variant: "text",
105
+ size: "sm",
106
+ stagger: a,
107
+ width: e,
108
+ className: "ds:mt-[var(--spacing-xs)]"
109
+ }
110
+ )
111
+ ] }, e)
112
+ ) })
113
+ }
114
+ ) : /* @__PURE__ */ o(
115
+ "div",
116
+ {
117
+ ...w,
118
+ ref: N,
119
+ "data-component": "editable-description",
120
+ "data-empty": r.length === 0 ? "" : void 0,
121
+ "aria-busy": u || void 0,
122
+ className: [D(), y].filter(Boolean).join(" "),
123
+ children: [
124
+ r.length === 0 ? /* @__PURE__ */ s("p", { "data-editable-description-empty": "", className: ee(), children: M ?? c("editableDescription.empty") }) : /* @__PURE__ */ o(
125
+ "ul",
126
+ {
127
+ ref: b,
128
+ className: `${j()} ${$}`.trim(),
129
+ children: [
130
+ r.map((e, a) => /* @__PURE__ */ o(
131
+ "li",
132
+ {
133
+ "data-editable-description-line": "",
134
+ className: `${z()} ds:data-[hidden]:hidden`,
135
+ children: [
136
+ /* @__PURE__ */ s("span", { "aria-hidden": "true", className: R() }),
137
+ /* @__PURE__ */ s("span", { className: te, children: e })
138
+ ]
139
+ },
140
+ `${a}-${e}`
141
+ )),
142
+ P ? (
143
+ // An ITEM of the list, aligned with the text rather than the
144
+ // dots, so opening it does not shift the column.
145
+ /* @__PURE__ */ o("li", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-xs)]", children: [
146
+ /* @__PURE__ */ s(
147
+ "span",
148
+ {
149
+ "aria-hidden": "true",
150
+ className: "ds:size-[var(--spacing-xs)] ds:shrink-0"
151
+ }
152
+ ),
153
+ /* @__PURE__ */ s(
154
+ K,
155
+ {
156
+ intent: "link",
157
+ size: "sm",
158
+ "data-editable-description-toggle": "",
159
+ className: "ds:!ps-0 ds:!pe-0",
160
+ "aria-expanded": n,
161
+ onClick: () => V((e) => !e),
162
+ children: n ? T ?? c("editableDescription.showLess") : O ?? c("editableDescription.seeMore")
163
+ }
164
+ )
165
+ ] })
166
+ ) : null
167
+ ]
168
+ }
169
+ ),
170
+ x ? /* @__PURE__ */ s(
171
+ Q,
172
+ {
173
+ ref: L,
174
+ icon: /* @__PURE__ */ s(Y, { "aria-hidden": "true" }),
175
+ intent: "ghost",
176
+ size: "sm",
177
+ className: "ds:-mt-[var(--spacing-sm)] ds:shrink-0",
178
+ "aria-label": C,
179
+ tooltip: C,
180
+ "data-editable-description-edit": "",
181
+ onClick: x
182
+ }
183
+ ) : null
184
+ ]
185
+ }
186
+ );
187
+ }
188
+ );
189
+ se.displayName = "EditableDescription";
190
+ export {
191
+ se as E
192
+ };
193
+ //# sourceMappingURL=editable-description-BsSjLnSx.js.map
@@ -11,11 +11,11 @@ const e = {
11
11
  },
12
12
  item: {
13
13
  attr: "data-editable-description-line",
14
- description: "One visible description line."
14
+ description: "One description line. While collapsed, a line past the row limit is hidden and carries `data-hidden`."
15
15
  }
16
16
  }
17
17
  };
18
18
  export {
19
19
  e
20
20
  };
21
- //# sourceMappingURL=editable-description.agent-Bm_LBV2j.js.map
21
+ //# sourceMappingURL=editable-description.agent-zyyR_hxB.js.map
@@ -7,7 +7,7 @@ import { u as Ji } from "./registry-DvAUVLHh.js";
7
7
  import { m as tt, M as Qi, A as es } from "./annotation-marker-D-M7y4R1.js";
8
8
  import { B as P } from "./button-Dp4j9ygh.js";
9
9
  import { I as Ke } from "./icon-button-u9VMQn3x.js";
10
- import { B as ts } from "./button-group-N60L3HMa.js";
10
+ import { B as ts } from "./button-group-CHQD8GJ0.js";
11
11
  import { C as ns } from "./combobox-BYl6mY4c.js";
12
12
  import { I as vn } from "./icon-button-group-DEAx9M5v.js";
13
13
  import { S as Ar } from "./state-backed-text-input-DVETOhSS.js";
@@ -3132,4 +3132,4 @@ export {
3132
3132
  Nn as t,
3133
3133
  Kr as u
3134
3134
  };
3135
- //# sourceMappingURL=face-scheme-ByYeboH9.js.map
3135
+ //# sourceMappingURL=face-scheme-BC2whb1S.js.map
@@ -4,8 +4,8 @@ import { useTranslation as L } from "react-i18next";
4
4
  import { u as Ve } from "./registry-DvAUVLHh.js";
5
5
  import { B as Be } from "./button-Dp4j9ygh.js";
6
6
  import { V as x } from "./visually-hidden-BHxEUGyT.js";
7
- import { e as Me } from "./data-grid-CujX-2tF.js";
8
- import { D as g } from "./toolbar-z_6tE7zG.js";
7
+ import { e as Me } from "./data-grid-CkzbCZSo.js";
8
+ import { D as g } from "./toolbar-B9oh9XY9.js";
9
9
  import { a as se } from "./format-number-DdzqwMs1.js";
10
10
  import { c as v } from "./index-D2ZczOXr.js";
11
11
  import { R as Fe } from "./row-actions-CA938TAd.js";
@@ -951,4 +951,4 @@ export {
951
951
  kt as d,
952
952
  et as i
953
953
  };
954
- //# sourceMappingURL=invoice-upload-list-srvWy5_d.js.map
954
+ //# sourceMappingURL=invoice-upload-list-BReimsvV.js.map
@@ -6,7 +6,7 @@ import { g as vt } from "./get-error-message-DbFUzuja.js";
6
6
  import { h as Nt } from "./handled-rejection-C-6Dq0As.js";
7
7
  import { u as Hn } from "./registry-DvAUVLHh.js";
8
8
  import { C as Mn } from "./clinical-note-card-D-9xmRpf.js";
9
- import { R as Wn } from "./rich-text-editor-CJXc5GgH.js";
9
+ import { R as Wn } from "./rich-text-editor-BAcJq1PO.js";
10
10
  import { T as $n } from "./text-area-COMVJ1yE.js";
11
11
  import { A as L } from "./alert-C4WKViaS.js";
12
12
  import { B as ne } from "./button-Dp4j9ygh.js";
@@ -1113,4 +1113,4 @@ const qr = _n(
1113
1113
  export {
1114
1114
  qr as N
1115
1115
  };
1116
- //# sourceMappingURL=notes-panel-C9aB1Cma.js.map
1116
+ //# sourceMappingURL=notes-panel-BHMnLbEH.js.map