@alfadocs/ui-kit 1.36.0 → 1.37.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 (127) hide show
  1. package/dist/_chunks/appointment-peek-5S4O1VQP.js +115 -0
  2. package/dist/_chunks/appointment-peek.agent-C539tNFM.js +17 -0
  3. package/dist/_chunks/building-2-D33bLCWL.js +24 -0
  4. package/dist/_chunks/calendar-workspace-BqKBj26r.js +9715 -0
  5. package/dist/_chunks/{control-room-rail-Ds45_g4f.js → control-room-rail-DQoHdE1U.js} +2 -2
  6. package/dist/_chunks/editable-description-BOfAeY3T.js +112 -0
  7. package/dist/_chunks/editable-description.agent-Bm_LBV2j.js +21 -0
  8. package/dist/_chunks/{money.agent-Dw55UxUA.js → money-BY-HmKhZ.js} +33 -47
  9. package/dist/_chunks/money.agent-BjJ6gOkx.js +17 -0
  10. package/dist/_chunks/notes-panel-4y5JioWN.js +556 -0
  11. package/dist/_chunks/panel-subview-BNXN8OEL.js +160 -0
  12. package/dist/_chunks/panel-subview.agent-BIBvE-IW.js +17 -0
  13. package/dist/_chunks/{patient-details-f7SSXkTJ.js → patient-details-2cIaL-Zb.js} +2 -2
  14. package/dist/_chunks/{patient-field-row-BQZoP4m2.js → patient-field-row-IHb2VFc2.js} +193 -172
  15. package/dist/_chunks/{patient-summary-card-Bz7KdUin.js → patient-summary-card-BzmJH9a-.js} +2 -2
  16. package/dist/_chunks/{section-card.agent-W18CHEgX.js → section-card-XR2bW1Ie.js} +20 -34
  17. package/dist/_chunks/section-card.agent-Bz1BhM_j.js +17 -0
  18. package/dist/_chunks/smartphone-DaPcFw-X.js +32 -0
  19. package/dist/_chunks/{task-card-BalrLkSz.js → task-card-qTKD1fIT.js} +39 -57
  20. package/dist/_chunks/{task-tray-wl9eti6J.js → task-tray-CQ8UAR2j.js} +2 -2
  21. package/dist/_chunks/{tasks-panel-BDNB7hsZ.js → tasks-panel-CBGMtQ_f.js} +2 -2
  22. package/dist/_chunks/{tool-rail-Bq5eiFMG.js → tool-rail-BP8sjxCw.js} +310 -231
  23. package/dist/_chunks/treatment-receipt-D4kOLXOk.js +94 -0
  24. package/dist/_chunks/treatment-receipt.agent-bpFm2RPH.js +21 -0
  25. package/dist/_chunks/use-presence-transition-cDwWUXV-.js +58 -0
  26. package/dist/_chunks/{workflow-map-D-LEni11.js → workflow-map-CXdsxvUj.js} +140 -156
  27. package/dist/agent-catalog.json +65 -1
  28. package/dist/components/appointment-peek/appointment-peek.agent.d.ts +3 -0
  29. package/dist/components/appointment-peek/appointment-peek.d.ts +45 -0
  30. package/dist/components/appointment-peek/index.d.ts +4 -0
  31. package/dist/components/appointment-peek/index.js +7 -0
  32. package/dist/components/control-room-rail/index.js +1 -1
  33. package/dist/components/editable-description/editable-description.agent.d.ts +3 -0
  34. package/dist/components/editable-description/editable-description.d.ts +20 -0
  35. package/dist/components/editable-description/index.d.ts +4 -0
  36. package/dist/components/editable-description/index.js +7 -0
  37. package/dist/components/index.d.ts +4 -0
  38. package/dist/components/money/index.js +2 -1
  39. package/dist/components/notes-panel/index.js +1 -1
  40. package/dist/components/notes-panel/notes-panel.d.ts +16 -0
  41. package/dist/components/panel-subview/index.d.ts +4 -0
  42. package/dist/components/panel-subview/index.js +7 -0
  43. package/dist/components/panel-subview/panel-subview.agent.d.ts +3 -0
  44. package/dist/components/panel-subview/panel-subview.d.ts +32 -0
  45. package/dist/components/patient-details/index.js +1 -1
  46. package/dist/components/patient-summary-card/index.js +1 -1
  47. package/dist/components/section-card/index.js +4 -3
  48. package/dist/components/task-card/index.js +1 -1
  49. package/dist/components/task-tray/index.js +1 -1
  50. package/dist/components/tasks-panel/index.js +1 -1
  51. package/dist/components/tool-rail/index.js +1 -1
  52. package/dist/components/treatment-receipt/index.d.ts +4 -0
  53. package/dist/components/treatment-receipt/index.js +7 -0
  54. package/dist/components/treatment-receipt/treatment-receipt.agent.d.ts +3 -0
  55. package/dist/components/treatment-receipt/treatment-receipt.d.ts +30 -0
  56. package/dist/components/workflow/index.js +1 -1
  57. package/dist/hooks/index.d.ts +1 -0
  58. package/dist/hooks/index.js +9 -7
  59. package/dist/hooks/use-presence-transition.d.ts +40 -0
  60. package/dist/host-compat.css +7 -1
  61. package/dist/i18n/locales/ar.d.ts +29 -5
  62. package/dist/i18n/locales/ar.js +29 -5
  63. package/dist/i18n/locales/de.d.ts +29 -5
  64. package/dist/i18n/locales/de.js +29 -5
  65. package/dist/i18n/locales/el.d.ts +29 -5
  66. package/dist/i18n/locales/el.js +29 -5
  67. package/dist/i18n/locales/en.d.ts +29 -5
  68. package/dist/i18n/locales/en.js +29 -5
  69. package/dist/i18n/locales/es.d.ts +29 -5
  70. package/dist/i18n/locales/es.js +29 -5
  71. package/dist/i18n/locales/fr.d.ts +29 -5
  72. package/dist/i18n/locales/fr.js +29 -5
  73. package/dist/i18n/locales/hi.d.ts +29 -5
  74. package/dist/i18n/locales/hi.js +29 -5
  75. package/dist/i18n/locales/it.d.ts +29 -5
  76. package/dist/i18n/locales/it.js +29 -5
  77. package/dist/i18n/locales/ja.d.ts +29 -5
  78. package/dist/i18n/locales/ja.js +29 -5
  79. package/dist/i18n/locales/nl.d.ts +29 -5
  80. package/dist/i18n/locales/nl.js +29 -5
  81. package/dist/i18n/locales/pl.d.ts +29 -5
  82. package/dist/i18n/locales/pl.js +29 -5
  83. package/dist/i18n/locales/pt.d.ts +29 -5
  84. package/dist/i18n/locales/pt.js +29 -5
  85. package/dist/i18n/locales/ro.d.ts +29 -5
  86. package/dist/i18n/locales/ro.js +29 -5
  87. package/dist/i18n/locales/ru.d.ts +29 -5
  88. package/dist/i18n/locales/ru.js +29 -5
  89. package/dist/i18n/locales/sq.d.ts +29 -5
  90. package/dist/i18n/locales/sq.js +29 -5
  91. package/dist/i18n/locales/sv.d.ts +29 -5
  92. package/dist/i18n/locales/sv.js +29 -5
  93. package/dist/i18n/locales/tr.d.ts +29 -5
  94. package/dist/i18n/locales/tr.js +29 -5
  95. package/dist/i18n/locales/zh.d.ts +29 -5
  96. package/dist/i18n/locales/zh.js +29 -5
  97. package/dist/index.js +958 -940
  98. package/dist/locales/ar.json +29 -5
  99. package/dist/locales/de.json +29 -5
  100. package/dist/locales/el.json +29 -5
  101. package/dist/locales/en.json +29 -5
  102. package/dist/locales/es.json +29 -5
  103. package/dist/locales/fr.json +29 -5
  104. package/dist/locales/hi.json +29 -5
  105. package/dist/locales/it.json +29 -5
  106. package/dist/locales/ja.json +29 -5
  107. package/dist/locales/nl.json +29 -5
  108. package/dist/locales/pl.json +29 -5
  109. package/dist/locales/pt.json +29 -5
  110. package/dist/locales/ro.json +29 -5
  111. package/dist/locales/ru.json +29 -5
  112. package/dist/locales/sq.json +29 -5
  113. package/dist/locales/sv.json +29 -5
  114. package/dist/locales/tr.json +29 -5
  115. package/dist/locales/zh.json +29 -5
  116. package/dist/patterns/calendar/calendar-appointment-details.d.ts +15 -6
  117. package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts +23 -23
  118. package/dist/patterns/calendar/calendar-info-hover.d.ts +18 -0
  119. package/dist/patterns/calendar/calendar.journey.d.ts +10 -0
  120. package/dist/patterns/calendar/calendar.sheets.d.ts +2 -2
  121. package/dist/patterns/calendar/index.js +1 -1
  122. package/dist/tokens.css +1 -1
  123. package/package.json +17 -1
  124. package/dist/_chunks/calendar-workspace-Duv_5B4j.js +0 -9471
  125. package/dist/_chunks/hourglass-BEAzW1wE.js +0 -26
  126. package/dist/_chunks/notes-panel-Co8D3uDd.js +0 -469
  127. package/dist/_chunks/smartphone-C0rFF2if.js +0 -15
@@ -3,7 +3,7 @@ import { useState as _, useCallback as g, useMemo as T, useRef as B, useContext
3
3
  import { useTranslation as po } from "react-i18next";
4
4
  import { I as G } from "./icon-button-8xqRnkdG.js";
5
5
  import { a as fo } from "./panel-header-D_mTdhUp.js";
6
- import { T as mo } from "./tool-rail-Bq5eiFMG.js";
6
+ import { T as mo } from "./tool-rail-BP8sjxCw.js";
7
7
  import { u as go } from "./use-persistent-state-nZwZAnE9.js";
8
8
  import { S as Ro } from "./star-Bf9L2Uot.js";
9
9
  import { X as vo } from "./x-B5YnXwCz.js";
@@ -334,4 +334,4 @@ export {
334
334
  Ho as d,
335
335
  Ko as u
336
336
  };
337
- //# sourceMappingURL=control-room-rail-Ds45_g4f.js.map
337
+ //# sourceMappingURL=control-room-rail-DQoHdE1U.js.map
@@ -0,0 +1,112 @@
1
+ import { jsxs as d, jsx as s } from "react/jsx-runtime";
2
+ import { forwardRef as k, useState as D, useMemo as j } from "react";
3
+ import { c as t } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as B } from "react-i18next";
5
+ import { B as V } from "./button-nJaPh_HC.js";
6
+ import { I as z } from "./icon-button-8xqRnkdG.js";
7
+ import { P as E } from "./pencil-B1sKKyuT.js";
8
+ const C = t(
9
+ "ds:flex ds:min-w-0 ds:items-start ds:gap-[var(--spacing-xs)]"
10
+ ), M = t(
11
+ [
12
+ "ds:m-0 ds:flex ds:min-w-0 ds:flex-1 ds:list-none ds:flex-col ds:p-0",
13
+ "ds:gap-[var(--spacing-2xs)]"
14
+ ].join(" ")
15
+ ), I = t(
16
+ "ds:m-0 ds:min-w-0 ds:flex-1 type-body-sm ds:text-[color:var(--muted-foreground)]"
17
+ ), P = t(
18
+ "ds:flex ds:items-start ds:gap-[var(--spacing-xs)] type-body-sm ds:text-[color:var(--foreground)]"
19
+ ), $ = t(
20
+ [
21
+ "ds:mt-[var(--spacing-sm)] ds:size-[var(--spacing-xs)] ds:shrink-0 ds:self-start",
22
+ "ds:rounded-[var(--radius-full)] ds:bg-[color:var(--border)]"
23
+ ].join(" ")
24
+ ), L = k(
25
+ ({
26
+ value: r,
27
+ maxLines: o = 3,
28
+ onEdit: l,
29
+ editButtonRef: p,
30
+ emptyLabel: m,
31
+ editLabel: f,
32
+ seeMoreLabel: h,
33
+ showLessLabel: g,
34
+ className: x,
35
+ ...u
36
+ }, b) => {
37
+ const { t: i } = B(), [n, v] = D(!1), a = j(
38
+ () => (r ?? "").split(/\r?\n/).map((e) => e.trim()).filter(Boolean),
39
+ [r]
40
+ ), N = Math.max(0, a.length - o), w = n ? a : a.slice(0, o), c = f ?? i("editableDescription.edit");
41
+ return /* @__PURE__ */ d(
42
+ "div",
43
+ {
44
+ ...u,
45
+ ref: b,
46
+ "data-component": "editable-description",
47
+ "data-empty": a.length === 0 ? "" : void 0,
48
+ className: [C(), x].filter(Boolean).join(" "),
49
+ children: [
50
+ a.length === 0 ? /* @__PURE__ */ s("p", { "data-editable-description-empty": "", className: I(), children: m ?? i("editableDescription.empty") }) : /* @__PURE__ */ d("ul", { className: M(), children: [
51
+ w.map((e, y) => /* @__PURE__ */ d(
52
+ "li",
53
+ {
54
+ "data-editable-description-line": "",
55
+ className: P(),
56
+ children: [
57
+ /* @__PURE__ */ s("span", { "aria-hidden": "true", className: $() }),
58
+ /* @__PURE__ */ s("span", { className: "ds:min-w-0 ds:[overflow-wrap:anywhere]", children: e })
59
+ ]
60
+ },
61
+ `${y}-${e}`
62
+ )),
63
+ N > 0 ? (
64
+ // An ITEM of the list, aligned with the text rather than the
65
+ // dots, so opening it does not shift the column.
66
+ /* @__PURE__ */ d("li", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-xs)]", children: [
67
+ /* @__PURE__ */ s(
68
+ "span",
69
+ {
70
+ "aria-hidden": "true",
71
+ className: "ds:size-[var(--spacing-xs)] ds:shrink-0"
72
+ }
73
+ ),
74
+ /* @__PURE__ */ s(
75
+ V,
76
+ {
77
+ intent: "link",
78
+ size: "sm",
79
+ "data-editable-description-toggle": "",
80
+ className: "ds:!ps-0 ds:!pe-0",
81
+ "aria-expanded": n,
82
+ onClick: () => v((e) => !e),
83
+ children: n ? g ?? i("editableDescription.showLess") : h ?? i("editableDescription.seeMore")
84
+ }
85
+ )
86
+ ] })
87
+ ) : null
88
+ ] }),
89
+ l ? /* @__PURE__ */ s(
90
+ z,
91
+ {
92
+ ref: p,
93
+ icon: /* @__PURE__ */ s(E, { "aria-hidden": "true" }),
94
+ intent: "ghost",
95
+ size: "sm",
96
+ className: "ds:-mt-[var(--spacing-sm)] ds:shrink-0",
97
+ "aria-label": c,
98
+ tooltip: c,
99
+ "data-editable-description-edit": "",
100
+ onClick: l
101
+ }
102
+ ) : null
103
+ ]
104
+ }
105
+ );
106
+ }
107
+ );
108
+ L.displayName = "EditableDescription";
109
+ export {
110
+ L as E
111
+ };
112
+ //# sourceMappingURL=editable-description-BOfAeY3T.js.map
@@ -0,0 +1,21 @@
1
+ const e = {
2
+ id: "editable-description",
3
+ capabilities: [],
4
+ state: {},
5
+ actions: {},
6
+ domHooks: {
7
+ root: {
8
+ attr: "data-component",
9
+ value: "editable-description",
10
+ description: "Marks the element as a kit EditableDescription."
11
+ },
12
+ item: {
13
+ attr: "data-editable-description-line",
14
+ description: "One visible description line."
15
+ }
16
+ }
17
+ };
18
+ export {
19
+ e
20
+ };
21
+ //# sourceMappingURL=editable-description.agent-Bm_LBV2j.js.map
@@ -2,9 +2,9 @@ import { jsxs as V, jsx as p } from "react/jsx-runtime";
2
2
  import { forwardRef as z, useMemo as N } from "react";
3
3
  import { c as Z } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as $ } from "react-i18next";
5
- import { V as H } from "./visually-hidden-BHxEUGyT.js";
6
- import { f as O, a as R } from "./format-price-BkMEbeW3.js";
7
- const T = Z(
5
+ import { V as O } from "./visually-hidden-BHxEUGyT.js";
6
+ import { f as R, a as T } from "./format-price-BkMEbeW3.js";
7
+ const U = Z(
8
8
  [
9
9
  "ds:inline-flex ds:items-baseline ds:whitespace-nowrap",
10
10
  // Lining, fixed-width figures: without these a column of amounts
@@ -31,86 +31,72 @@ const T = Z(
31
31
  },
32
32
  defaultVariants: { size: "md", tone: "default", strikethrough: !1 }
33
33
  }
34
- ), U = z(
34
+ ), C = z(
35
35
  ({
36
36
  value: o,
37
37
  currency: s = "EUR",
38
- locale: y,
39
- size: v,
38
+ locale: v,
39
+ size: x,
40
40
  tone: l = "default",
41
- decimals: n = "full",
41
+ decimals: a = "full",
42
42
  signDisplay: m = "auto",
43
- strikethrough: x,
43
+ strikethrough: y,
44
44
  className: g,
45
45
  ...h
46
- }, k) => {
47
- const { i18n: M } = $(), r = y ?? M.language, { nodes: b, full: j } = N(() => {
48
- const e = O(
46
+ }, j) => {
47
+ const { i18n: b } = $(), n = v ?? b.language, { nodes: k, full: w } = N(() => {
48
+ const e = R(
49
49
  o,
50
50
  s,
51
- r,
51
+ n,
52
52
  m === "always" ? { signDisplay: "exceptZero" } : {}
53
- ), u = R(o, s, r);
53
+ ), f = T(o, s, n);
54
54
  if (!e)
55
- return { nodes: [{ text: u, muted: !1 }], full: u };
56
- const i = e.map((t) => t.value).join(""), P = e.filter((t) => t.type === "fraction").every((t) => /^0+$/.test(t.value)), f = (t) => t === "decimal" || t === "fraction";
57
- if (n === "hideWhenZero" && P) {
58
- const c = e.filter((d) => !f(d.type)).map((d) => d.value).join("").trim();
55
+ return { nodes: [{ text: f, muted: !1 }], full: f };
56
+ const i = e.map((t) => t.value).join(""), P = e.filter((t) => t.type === "fraction").every((t) => /^0+$/.test(t.value)), u = (t) => t === "decimal" || t === "fraction";
57
+ if (a === "hideWhenZero" && P) {
58
+ const c = e.filter((d) => !u(d.type)).map((d) => d.value).join("").trim();
59
59
  return { nodes: [{ text: c, muted: !1 }], full: c };
60
60
  }
61
- return n === "muted" ? {
61
+ return a === "muted" ? {
62
62
  nodes: e.map((t) => ({
63
63
  text: t.value,
64
- muted: f(t.type)
64
+ muted: u(t.type)
65
65
  })),
66
66
  full: i
67
67
  } : { nodes: [{ text: i, muted: !1 }], full: i };
68
- }, [o, s, r, n, m]), w = l === "auto" ? o < 0 ? "negative" : "default" : l;
68
+ }, [o, s, n, a, m]), M = l === "auto" ? o < 0 ? "negative" : "default" : l;
69
69
  return /* @__PURE__ */ V(
70
70
  "span",
71
71
  {
72
- ref: k,
72
+ ref: j,
73
73
  "data-component": "money",
74
74
  "data-currency": s.toUpperCase(),
75
- className: T({
76
- size: v,
77
- tone: w,
78
- strikethrough: x,
75
+ className: U({
76
+ size: x,
77
+ tone: M,
78
+ strikethrough: y,
79
79
  className: g
80
80
  }),
81
81
  ...h,
82
82
  children: [
83
- b.map((a, e) => /* @__PURE__ */ p(
83
+ k.map((r, e) => /* @__PURE__ */ p(
84
84
  "span",
85
85
  {
86
86
  "aria-hidden": "true",
87
- className: a.muted ? "ds:opacity-70 ds:[font-size:0.85em]" : void 0,
88
- children: a.text
87
+ className: r.muted ? "ds:opacity-70 ds:[font-size:0.85em]" : void 0,
88
+ children: r.text
89
89
  },
90
- `${e}-${a.text}`
90
+ `${e}-${r.text}`
91
91
  )),
92
- /* @__PURE__ */ p(H, { children: j })
92
+ /* @__PURE__ */ p(O, { children: w })
93
93
  ]
94
94
  }
95
95
  );
96
96
  }
97
97
  );
98
- U.displayName = "Money";
99
- const W = {
100
- id: "money",
101
- capabilities: [],
102
- state: {},
103
- actions: {},
104
- domHooks: {
105
- root: {
106
- attr: "data-component",
107
- value: "money",
108
- description: "Marks the element as a kit Money amount."
109
- }
110
- }
111
- };
98
+ C.displayName = "Money";
112
99
  export {
113
- U as M,
114
- W as m
100
+ C as M
115
101
  };
116
- //# sourceMappingURL=money.agent-Dw55UxUA.js.map
102
+ //# sourceMappingURL=money-BY-HmKhZ.js.map
@@ -0,0 +1,17 @@
1
+ const t = {
2
+ id: "money",
3
+ capabilities: [],
4
+ state: {},
5
+ actions: {},
6
+ domHooks: {
7
+ root: {
8
+ attr: "data-component",
9
+ value: "money",
10
+ description: "Marks the element as a kit Money amount."
11
+ }
12
+ }
13
+ };
14
+ export {
15
+ t as m
16
+ };
17
+ //# sourceMappingURL=money.agent-BjJ6gOkx.js.map