@alfadocs/ui-kit 1.44.0 → 1.46.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 (156) hide show
  1. package/dist/_chunks/{actions-cell-renderer-BXBy9c0f.js → actions-cell-renderer-B5m9lwgC.js} +2 -2
  2. package/dist/_chunks/ai-credits-notice-xszqOZTC.js +90 -0
  3. package/dist/_chunks/ai-credits-notice.agent-C9L7orrP.js +17 -0
  4. package/dist/_chunks/{ai-consent-banner-D7I2U-cz.js → ai-permission-notice-D7I2U-cz.js} +1 -1
  5. package/dist/_chunks/ai-sparkle-D23NT8Z_.js +45 -0
  6. package/dist/_chunks/{anamnesis-summary-rows-DQUqwWc1.js → anamnesis-summary-rows-DI-UX5r6.js} +2 -2
  7. package/dist/_chunks/{appointment-card-TgR_2GKS.js → appointment-card-DluZy8Iv.js} +2 -2
  8. package/dist/_chunks/{appointment-peek-abiR0T9e.js → appointment-peek-BsfCpiJs.js} +3 -3
  9. package/dist/_chunks/{appointment-timeline-CCnyUYKz.js → appointment-timeline-Cs5f9viN.js} +3 -3
  10. package/dist/_chunks/{appointment-tray-N0yEI8UF.js → appointment-tray-CLrGGnKR.js} +2 -2
  11. package/dist/_chunks/baby-Dku-Xvg9.js +23 -0
  12. package/dist/_chunks/{balance-badge-cell-o6LldMUA.js → balance-badge-cell-YGrYdrvR.js} +3 -3
  13. package/dist/_chunks/{booking-D43ASl8y.js → booking-B7gA9gFB.js} +279 -296
  14. package/dist/_chunks/button-group-CA1tmu39.js +325 -0
  15. package/dist/_chunks/{calendar-U6N0F99w.js → calendar-OzSeTb4V.js} +2 -2
  16. package/dist/_chunks/{calendar-event-card-DKUnT9Be.js → calendar-event-card-B6N5h1dO.js} +57 -48
  17. package/dist/_chunks/{calendar-workspace-DBYAtdyd.js → calendar-workspace-BB-BZT7W.js} +3002 -2912
  18. package/dist/_chunks/{chart-PF2krCZC.js → chart-D8ucl8hH.js} +2 -2
  19. package/dist/_chunks/{data-table-CcAx_I1w.js → data-table-DnKOmEVw.js} +2 -2
  20. package/dist/_chunks/{editable-currency-cell-renderer-Psb6XKHR.js → editable-currency-cell-renderer-OUkUv7U4.js} +2 -2
  21. package/dist/_chunks/{face-scheme-Bm6pe7R8.js → face-scheme-mIhwrQXt.js} +3 -3
  22. package/dist/_chunks/{file-manager-BfLQxF5t.js → file-manager-DOcJGIx2.js} +4 -4
  23. package/dist/_chunks/{header-settings-CTe45iDy.js → header-settings-BEfx_-TF.js} +2 -2
  24. package/dist/_chunks/{help-me-write-templates-GUeEn3Ff.js → help-me-write-templates-DHIwa4xR.js} +205 -199
  25. package/dist/_chunks/{hover-card-BMJBVqIf.js → hover-card-nUae8NPJ.js} +67 -62
  26. package/dist/_chunks/{icon-button-group-DkkdIygu.js → icon-button-group-DZKC6KGf.js} +181 -168
  27. package/dist/_chunks/kit-extensions-DuoFF1R3.js +94 -0
  28. package/dist/_chunks/{marketplace-app-shell-DdwPj03y.js → marketplace-app-shell-PB89Dkk_.js} +2 -2
  29. package/dist/_chunks/{notes-panel-CY4KmDo-.js → notes-panel-CHbDDMx8.js} +83 -73
  30. package/dist/_chunks/{patient-details-C8ImUrVg.js → patient-details-DUj1htsH.js} +2 -2
  31. package/dist/_chunks/{patient-field-row-BRSOKvme.js → patient-field-row-CO0WR7yA.js} +2 -2
  32. package/dist/_chunks/{patient-summary-card-BhmKB2KR.js → patient-summary-card-DNzdYjxE.js} +59 -45
  33. package/dist/_chunks/rich-text-editor-BwDV2XkZ.js +4153 -0
  34. package/dist/_chunks/{tasks-panel-CpcikOeY.js → tasks-panel-DncuBPIZ.js} +2 -2
  35. package/dist/_chunks/{theme-toggle-bI0pgDDv.js → theme-toggle-BP0XRGMM.js} +2 -2
  36. package/dist/_chunks/use-ai-sparkle-Cf4yVTLB.js +76 -0
  37. package/dist/_chunks/{workflow-status-xeaJTzD3.js → workflow-status-CuJAOuKL.js} +43 -42
  38. package/dist/agent-catalog.json +32 -4
  39. package/dist/agent-i18n/en.json +1 -1
  40. package/dist/components/ai-credits-notice/ai-credits-notice.agent.d.ts +3 -0
  41. package/dist/components/ai-credits-notice/ai-credits-notice.d.ts +48 -0
  42. package/dist/components/ai-credits-notice/index.d.ts +4 -0
  43. package/dist/components/ai-credits-notice/index.js +7 -0
  44. package/dist/components/{ai-consent-banner/ai-consent-banner.agent.d.ts → ai-permission-notice/ai-permission-notice.agent.d.ts} +2 -2
  45. package/dist/components/{ai-consent-banner/ai-consent-banner.d.ts → ai-permission-notice/ai-permission-notice.d.ts} +1 -1
  46. package/dist/components/ai-permission-notice/index.d.ts +4 -0
  47. package/dist/components/{ai-consent-banner → ai-permission-notice}/index.js +1 -1
  48. package/dist/components/ai-sparkle/ai-sparkle.d.ts +24 -0
  49. package/dist/components/ai-sparkle/index.d.ts +3 -0
  50. package/dist/components/ai-sparkle/index.js +5 -0
  51. package/dist/components/appointment-card/index.js +2 -2
  52. package/dist/components/appointment-peek/index.js +1 -1
  53. package/dist/components/appointment-timeline/index.js +1 -1
  54. package/dist/components/booking/index.js +1 -1
  55. package/dist/components/button-group/index.js +1 -1
  56. package/dist/components/calendar/index.js +1 -1
  57. package/dist/components/calendar-event-card/index.js +1 -1
  58. package/dist/components/chart/index.js +1 -1
  59. package/dist/components/data-table/index.js +3 -3
  60. package/dist/components/face-scheme/index.js +1 -1
  61. package/dist/components/file-manager/index.js +1 -1
  62. package/dist/components/header-settings/index.js +1 -1
  63. package/dist/components/hover-card/hover-card.d.ts +4 -0
  64. package/dist/components/hover-card/index.d.ts +1 -1
  65. package/dist/components/hover-card/index.js +3 -2
  66. package/dist/components/icon-button-group/index.js +1 -1
  67. package/dist/components/index.d.ts +5 -3
  68. package/dist/components/notes-panel/index.js +1 -1
  69. package/dist/components/notes-panel/notes-panel.d.ts +10 -0
  70. package/dist/components/patient-details/index.js +1 -1
  71. package/dist/components/patient-summary-card/index.js +1 -1
  72. package/dist/components/patient-table/index.js +1 -1
  73. package/dist/components/rich-text-editor/editor-extensions.d.ts +54 -0
  74. package/dist/components/rich-text-editor/editor-toolbar.d.ts +2 -1
  75. package/dist/components/rich-text-editor/help-me-write-overlay.d.ts +4 -0
  76. package/dist/components/rich-text-editor/index.d.ts +2 -0
  77. package/dist/components/rich-text-editor/index.js +6 -4
  78. package/dist/components/rich-text-editor/kit-extensions.d.ts +4 -0
  79. package/dist/components/rich-text-editor/rich-text-editor.d.ts +18 -2
  80. package/dist/components/tasks-panel/index.js +1 -1
  81. package/dist/components/theme-toggle/index.js +1 -1
  82. package/dist/components/workflow-status/index.js +1 -1
  83. package/dist/hooks/index.d.ts +1 -0
  84. package/dist/hooks/index.js +54 -48
  85. package/dist/hooks/use-ai-sparkle.d.ts +91 -0
  86. package/dist/host-compat.css +2 -2
  87. package/dist/i18n/locales/ar.d.ts +31 -0
  88. package/dist/i18n/locales/ar.js +33 -2
  89. package/dist/i18n/locales/de.d.ts +31 -0
  90. package/dist/i18n/locales/de.js +33 -2
  91. package/dist/i18n/locales/el.d.ts +31 -0
  92. package/dist/i18n/locales/el.js +33 -2
  93. package/dist/i18n/locales/en.d.ts +31 -0
  94. package/dist/i18n/locales/en.js +33 -2
  95. package/dist/i18n/locales/es.d.ts +31 -0
  96. package/dist/i18n/locales/es.js +33 -2
  97. package/dist/i18n/locales/fr.d.ts +31 -0
  98. package/dist/i18n/locales/fr.js +33 -2
  99. package/dist/i18n/locales/hi.d.ts +31 -0
  100. package/dist/i18n/locales/hi.js +33 -2
  101. package/dist/i18n/locales/it.d.ts +31 -0
  102. package/dist/i18n/locales/it.js +33 -2
  103. package/dist/i18n/locales/ja.d.ts +31 -0
  104. package/dist/i18n/locales/ja.js +33 -2
  105. package/dist/i18n/locales/nl.d.ts +31 -0
  106. package/dist/i18n/locales/nl.js +33 -2
  107. package/dist/i18n/locales/pl.d.ts +31 -0
  108. package/dist/i18n/locales/pl.js +33 -2
  109. package/dist/i18n/locales/pt.d.ts +31 -0
  110. package/dist/i18n/locales/pt.js +33 -2
  111. package/dist/i18n/locales/ro.d.ts +31 -0
  112. package/dist/i18n/locales/ro.js +33 -2
  113. package/dist/i18n/locales/ru.d.ts +31 -0
  114. package/dist/i18n/locales/ru.js +33 -2
  115. package/dist/i18n/locales/sq.d.ts +31 -0
  116. package/dist/i18n/locales/sq.js +33 -2
  117. package/dist/i18n/locales/sv.d.ts +31 -0
  118. package/dist/i18n/locales/sv.js +33 -2
  119. package/dist/i18n/locales/tr.d.ts +31 -0
  120. package/dist/i18n/locales/tr.js +33 -2
  121. package/dist/i18n/locales/zh.d.ts +31 -0
  122. package/dist/i18n/locales/zh.js +33 -2
  123. package/dist/index.js +1113 -1102
  124. package/dist/locales/ar.json +33 -2
  125. package/dist/locales/de.json +33 -2
  126. package/dist/locales/el.json +33 -2
  127. package/dist/locales/en.json +33 -2
  128. package/dist/locales/es.json +33 -2
  129. package/dist/locales/fr.json +33 -2
  130. package/dist/locales/hi.json +33 -2
  131. package/dist/locales/it.json +33 -2
  132. package/dist/locales/ja.json +33 -2
  133. package/dist/locales/nl.json +33 -2
  134. package/dist/locales/pl.json +33 -2
  135. package/dist/locales/pt.json +33 -2
  136. package/dist/locales/ro.json +33 -2
  137. package/dist/locales/ru.json +33 -2
  138. package/dist/locales/sq.json +33 -2
  139. package/dist/locales/sv.json +33 -2
  140. package/dist/locales/tr.json +33 -2
  141. package/dist/locales/zh.json +33 -2
  142. package/dist/patterns/anamnesis/index.js +1 -1
  143. package/dist/patterns/calendar/calendar-workspace.d.ts +6 -4
  144. package/dist/patterns/calendar/calendar.data.d.ts +9 -0
  145. package/dist/patterns/calendar/calendar.journey.d.ts +1 -1
  146. package/dist/patterns/calendar/calendar.sheets.d.ts +16 -5
  147. package/dist/patterns/calendar/calendar.types.d.ts +3 -1
  148. package/dist/patterns/calendar/index.js +1 -1
  149. package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts +11 -2
  150. package/dist/patterns/help-me-write-templates/index.js +1 -1
  151. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  152. package/dist/tokens.css +1 -1
  153. package/package.json +14 -4
  154. package/dist/_chunks/button-group-R32U7SyV.js +0 -307
  155. package/dist/_chunks/rich-text-editor-BYE6kK4u.js +0 -3839
  156. package/dist/components/ai-consent-banner/index.d.ts +0 -4
@@ -1,13 +1,16 @@
1
- import { jsx as a, jsxs as T } from "react/jsx-runtime";
2
- import { forwardRef as Se, useState as W, useCallback as H, useRef as F, Children as be, isValidElement as _, useEffect as ve, cloneElement as ye } from "react";
3
- import { c as Be } from "./index-D2ZczOXr.js";
4
- import { useTranslation as Ke } from "react-i18next";
5
- import { I as he } from "./icon-button-CehAeZoP.js";
1
+ import { jsx as l, jsxs as _ } from "react/jsx-runtime";
2
+ import { forwardRef as Ke, useState as H, useCallback as F, useRef as P, Children as ye, isValidElement as G, useEffect as he, cloneElement as we } from "react";
3
+ import { c as Te } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as _e } from "react-i18next";
5
+ import { I as ke } from "./icon-button-CehAeZoP.js";
6
6
  import { D as k } from "./dropdown-menu-DU-Hrf33.js";
7
- import { u as Pe } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
8
- import { u as Te } from "./use-priority-overflow-c9SjxZkZ.js";
9
- import { E as we } from "./ellipsis-dRo9ouSU.js";
10
- const ke = Be(
7
+ import { u as Ge } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
8
+ import { u as Me } from "./use-priority-overflow-c9SjxZkZ.js";
9
+ import { E as Ie } from "./ellipsis-dRo9ouSU.js";
10
+ function Re(s) {
11
+ s && (s.inert = !0);
12
+ }
13
+ const Ce = Te(
11
14
  [
12
15
  "ds:inline-flex ds:isolate",
13
16
  // Hairline border around the group unifies the children into one
@@ -52,16 +55,16 @@ const ke = Be(
52
55
  orientation: "horizontal"
53
56
  }
54
57
  }
55
- ), Ie = "ds:absolute ds:start-0 ds:top-0 ds:invisible ds:pointer-events-none", _e = Se(
56
- (d, y) => {
58
+ ), xe = "ds:absolute ds:start-0 ds:top-0 ds:invisible ds:pointer-events-none", Oe = Ke(
59
+ (s, y) => {
57
60
  const {
58
- size: m,
61
+ size: b,
59
62
  orientation: c = "horizontal",
60
63
  role: i = "group",
61
64
  mode: n = "momentary",
62
65
  disabled: q = !1,
63
66
  intent: S = "outline",
64
- overflow: Ce = "none",
67
+ overflow: Ae = "none",
65
68
  className: J,
66
69
  children: Q,
67
70
  "aria-label": X,
@@ -69,66 +72,66 @@ const ke = Be(
69
72
  // Controlled-value props are consumed via `props as …` below; strip them
70
73
  // here so they never spread onto the root <div> (React would warn that
71
74
  // `onValueChange` is an unknown DOM event handler).
72
- value: Me,
73
- defaultValue: Oe,
74
- onValueChange: $e,
75
+ value: Ee,
76
+ defaultValue: Ue,
77
+ onValueChange: We,
75
78
  ...Z
76
- } = d, { t: Re } = Ke(), h = Ce === "menu" && c !== "vertical", [ee, oe] = W(
77
- () => n === "toggle-single" ? d.defaultValue ?? "" : n === "toggle-multi" ? d.defaultValue ?? [] : ""
79
+ } = s, { t: De } = _e(), h = Ae === "menu" && c !== "vertical", [ee, te] = H(
80
+ () => n === "toggle-single" ? s.defaultValue ?? "" : n === "toggle-multi" ? s.defaultValue ?? [] : ""
78
81
  ), g = (() => {
79
82
  if (n === "toggle-single") {
80
- const e = d;
83
+ const e = s;
81
84
  return e.value !== void 0 ? e.value : ee;
82
85
  }
83
86
  if (n === "toggle-multi") {
84
- const e = d;
87
+ const e = s;
85
88
  return e.value !== void 0 ? e.value : ee;
86
89
  }
87
90
  return "";
88
- })(), I = H(
91
+ })(), I = F(
89
92
  (e) => {
90
- var o, r;
93
+ var t, r;
91
94
  if (n === "toggle-single") {
92
- const t = d;
93
- t.value === void 0 && oe(e), (o = t.onValueChange) == null || o.call(t, e);
95
+ const o = s;
96
+ o.value === void 0 && te(e), (t = o.onValueChange) == null || t.call(o, e);
94
97
  } else if (n === "toggle-multi") {
95
- const t = d;
96
- t.value === void 0 && oe(e), (r = t.onValueChange) == null || r.call(t, e);
98
+ const o = s;
99
+ o.value === void 0 && te(e), (r = o.onValueChange) == null || r.call(o, e);
97
100
  }
98
101
  },
99
- [n, d]
100
- ), b = i === "toolbar" || i === "radiogroup", x = F([]), [v, A] = W(0), te = H(
101
- (e, o) => {
102
- x.current[e] = o;
102
+ [n, s]
103
+ ), m = i === "toolbar" || i === "radiogroup", x = P([]), [v, A] = H(0), oe = F(
104
+ (e, t) => {
105
+ x.current[e] = t;
103
106
  },
104
107
  []
105
- ), re = F(null), [G, xe] = W(!1);
106
- Pe(() => {
108
+ ), re = P(null), [M, Ve] = H(!1);
109
+ Ge(() => {
107
110
  if (typeof window > "u") return;
108
111
  const e = re.current;
109
112
  if (!e) return;
110
- const o = window.getComputedStyle(e).direction;
111
- xe(o === "rtl");
113
+ const t = window.getComputedStyle(e).direction;
114
+ Ve(t === "rtl");
112
115
  }, []);
113
- const M = H(
116
+ const O = F(
114
117
  (e) => {
115
- var P;
116
- if (!b) return;
117
- const o = x.current.filter(Boolean).length;
118
- if (o === 0) return;
119
- const r = c === "vertical" ? "ArrowDown" : G ? "ArrowLeft" : "ArrowRight", t = c === "vertical" ? "ArrowUp" : G ? "ArrowRight" : "ArrowLeft";
120
- let s = null;
121
- if (e.key === r ? s = (v + 1) % o : e.key === t ? s = (v - 1 + o) % o : e.key === "Home" ? s = 0 : e.key === "End" && (s = o - 1), s === null) return;
122
- const N = o;
123
- let R = 0, u = s;
124
- for (; R < N; ) {
118
+ var T;
119
+ if (!m) return;
120
+ const t = x.current.filter(Boolean).length;
121
+ if (t === 0) return;
122
+ const r = c === "vertical" ? "ArrowDown" : M ? "ArrowLeft" : "ArrowRight", o = c === "vertical" ? "ArrowUp" : M ? "ArrowRight" : "ArrowLeft";
123
+ let a = null;
124
+ if (e.key === r ? a = (v + 1) % t : e.key === o ? a = (v - 1 + t) % t : e.key === "Home" ? a = 0 : e.key === "End" && (a = t - 1), a === null) return;
125
+ const N = t;
126
+ let C = 0, u = a;
127
+ for (; C < N; ) {
125
128
  const f = x.current[u];
126
129
  if (f && f.getAttribute("aria-disabled") !== "true" && !f.disabled)
127
130
  break;
128
- u = e.key === t || e.key === "End" ? (u - 1 + o) % o : (u + 1) % o, R += 1;
131
+ u = e.key === o || e.key === "End" ? (u - 1 + t) % t : (u + 1) % t, C += 1;
129
132
  }
130
- if (e.preventDefault(), A(u), (P = x.current[u]) == null || P.focus(), i === "radiogroup" && n === "toggle-single") {
131
- const f = se.current[u];
133
+ if (e.preventDefault(), A(u), (T = x.current[u]) == null || T.focus(), i === "radiogroup" && n === "toggle-single") {
134
+ const f = le.current[u];
132
135
  if (f && typeof f == "object" && "props" in f) {
133
136
  const j = f.props.value;
134
137
  j && j !== g && I(j);
@@ -136,264 +139,274 @@ const ke = Be(
136
139
  }
137
140
  },
138
141
  [
139
- b,
142
+ m,
140
143
  c,
141
- G,
144
+ M,
142
145
  v,
143
146
  i,
144
147
  n,
145
148
  I,
146
149
  g
147
150
  ]
148
- ), D = h ? be.toArray(Q).filter(_) : [], B = (e) => {
149
- const o = e.props["aria-label"];
150
- return typeof o == "string" ? o : typeof e.props.tooltip == "string" ? e.props.tooltip : null;
151
+ ), D = h ? ye.toArray(Q).filter(G) : [], B = (e) => {
152
+ const t = e.props["aria-label"];
153
+ return typeof t == "string" ? t : typeof e.props.tooltip == "string" ? e.props.tooltip : null;
151
154
  };
152
- F(!1);
153
- const Ae = D.map((e) => {
154
- const o = e.props["data-overflow-pin"] !== void 0, r = B(e) !== null;
155
- return o || !r;
156
- }), { containerRef: De, fullRowRef: Ve, triggerProbeRef: Le, visible: ne, overflowing: V } = Te({
155
+ P(!1);
156
+ const Le = D.map((e) => {
157
+ const t = e.props["data-overflow-pin"] !== void 0, r = B(e) !== null;
158
+ return t || !r;
159
+ }), { containerRef: Ne, fullRowRef: ne, triggerProbeRef: ie, visible: se, overflowing: V } = Me({
157
160
  enabled: h,
158
161
  count: D.length,
159
- pinned: Ae
160
- }), ie = F(null), w = h ? D.filter((e, o) => ne[o]) : be.toArray(Q);
162
+ pinned: Le
163
+ }), je = F(
164
+ (e) => {
165
+ Re(e), ne(e);
166
+ },
167
+ [ne]
168
+ ), ze = F(
169
+ (e) => {
170
+ Re(e), ie(e);
171
+ },
172
+ [ie]
173
+ ), ae = P(null), w = h ? D.filter((e, t) => se[t]) : ye.toArray(Q);
161
174
  h && (x.current.length = w.length + (V ? 1 : 0));
162
- const se = F([]);
163
- se.current = w;
164
- const O = i === "radiogroup" && n === "toggle-single" ? w.findIndex(
165
- (e) => _(e) && e.props.value === g
175
+ const le = P([]);
176
+ le.current = w;
177
+ const $ = i === "radiogroup" && n === "toggle-single" ? w.findIndex(
178
+ (e) => G(e) && e.props.value === g
166
179
  ) : -1;
167
- ve(() => {
168
- O >= 0 && A(O);
169
- }, [O]);
170
- const C = w.length;
171
- ve(() => {
172
- var o;
173
- if (!b || !h) return;
174
- const e = C + (V ? 1 : 0);
175
- e > 0 && v >= e && (A(e - 1), document.activeElement === document.body && ((o = ie.current) == null || o.focus()));
180
+ he(() => {
181
+ $ >= 0 && A($);
182
+ }, [$]);
183
+ const R = w.length;
184
+ he(() => {
185
+ var t;
186
+ if (!m || !h) return;
187
+ const e = R + (V ? 1 : 0);
188
+ e > 0 && v >= e && (A(e - 1), document.activeElement === document.body && ((t = ae.current) == null || t.focus()));
176
189
  }, [
177
- b,
190
+ m,
178
191
  h,
179
- C,
192
+ R,
180
193
  V,
181
194
  v
182
195
  ]);
183
- const ae = (e) => {
184
- if (!_(e)) return !1;
185
- const o = e.props;
186
- return o.disabled === !0 || o.loading === !0;
187
- }, le = w.findIndex((e) => !ae(e)), de = ae(w[v]) ? le !== -1 ? le : (
196
+ const de = (e) => {
197
+ if (!G(e)) return !1;
198
+ const t = e.props;
199
+ return t.disabled === !0 || t.loading === !0;
200
+ }, ce = w.findIndex((e) => !de(e)), ue = de(w[v]) ? ce !== -1 ? ce : (
188
201
  /* Every visible child is disabled: the overflow trigger is the
189
202
  only thing left that can hold focus. Without this the group
190
203
  has no tab stop at all and the menu is unreachable. */
191
- V ? C : v
192
- ) : v, ce = w.map((e, o) => {
193
- if (!_(e))
204
+ V ? R : v
205
+ ) : v, fe = w.map((e, t) => {
206
+ if (!G(e))
194
207
  return e;
195
- const r = e, t = r.props.value, { ariaPressed: s, ariaChecked: N } = Ge(
208
+ const r = e, o = r.props.value, { ariaPressed: a, ariaChecked: N } = $e(
196
209
  n,
197
210
  i,
198
- t,
211
+ o,
199
212
  g
200
- ), R = q === !0, u = r.props.disabled === !0, P = (p) => {
201
- var l, z;
202
- if (R) {
213
+ ), C = q === !0, u = r.props.disabled === !0, T = (p) => {
214
+ var d, z;
215
+ if (C) {
203
216
  p.preventDefault(), p.stopPropagation();
204
217
  return;
205
218
  }
206
- if ((z = (l = r.props).onClick) == null || z.call(l, p), !p.defaultPrevented && t) {
219
+ if ((z = (d = r.props).onClick) == null || z.call(d, p), !p.defaultPrevented && o) {
207
220
  if (n === "toggle-single") {
208
- if (g === t) return;
209
- I(t);
221
+ if (g === o) return;
222
+ I(o);
210
223
  } else if (n === "toggle-multi") {
211
- const U = g, ze = U.includes(t) ? U.filter((Fe) => Fe !== t) : [...U, t];
212
- I(ze);
224
+ const W = g, Se = W.includes(o) ? W.filter((Be) => Be !== o) : [...W, o];
225
+ I(Se);
213
226
  }
214
227
  }
215
228
  }, f = (p) => {
216
- te(o, p);
217
- const l = r.ref;
218
- typeof l == "function" ? l(p) : l != null && typeof l == "object" && (l.current = p);
219
- }, j = R && !u ? !0 : void 0, Ne = n !== "momentary" || R, je = {
229
+ oe(t, p);
230
+ const d = r.ref;
231
+ typeof d == "function" ? d(p) : d != null && typeof d == "object" && (d.current = p);
232
+ }, j = C && !u ? !0 : void 0, Fe = n !== "momentary" || C, Pe = {
220
233
  intent: r.props.intent ?? S,
221
- size: r.props.size ?? m,
234
+ size: r.props.size ?? b,
222
235
  disabled: u,
223
236
  "aria-disabled": j,
224
- onClick: Ne ? P : r.props.onClick,
225
- "aria-pressed": s,
237
+ onClick: Fe ? T : r.props.onClick,
238
+ "aria-pressed": a,
226
239
  "aria-checked": N,
227
240
  // When the group is a radiogroup, children must be `role="radio"`
228
241
  // so screen readers announce them as radio buttons and so
229
242
  // `getByRole('radio')` works in tests. The button element is
230
243
  // re-purposed as a radio; `aria-checked` above carries the state.
231
244
  role: i === "radiogroup" ? "radio" : void 0,
232
- tabIndex: b ? o === de ? 0 : -1 : void 0,
245
+ tabIndex: m ? t === ue ? 0 : -1 : void 0,
233
246
  onFocus: (p) => {
234
- var l, z;
235
- b && A(o), (z = (l = r.props).onFocus) == null || z.call(l, p);
247
+ var d, z;
248
+ m && A(t), (z = (d = r.props).onFocus) == null || z.call(d, p);
236
249
  },
237
250
  ref: f
238
251
  };
239
- return ye(r, je);
240
- }), ue = (e) => {
252
+ return we(r, Pe);
253
+ }), pe = (e) => {
241
254
  re.current = e, typeof y == "function" ? y(e) : y && typeof y == "object" && (y.current = e);
242
255
  };
243
256
  if (!h)
244
- return /* @__PURE__ */ a(
257
+ return /* @__PURE__ */ l(
245
258
  "div",
246
259
  {
247
- ref: ue,
260
+ ref: pe,
248
261
  role: i,
249
262
  "aria-label": X,
250
263
  "aria-labelledby": Y,
251
264
  "aria-orientation": i === "toolbar" ? c : void 0,
252
- onKeyDown: M,
253
- className: ke({ orientation: c, className: J }),
265
+ onKeyDown: O,
266
+ className: Ce({ orientation: c, className: J }),
254
267
  "data-component": "icon-button-group",
255
268
  ...Z,
256
- children: ce
269
+ children: fe
257
270
  }
258
271
  );
259
- const fe = Re("buttonGroup.more", "More options"), L = q === !0, $ = D.map((e, o) => ({ childEl: e, i: o })).filter(({ i: e }) => !ne[e]);
272
+ const ge = De("buttonGroup.more", "More options"), L = q === !0, E = D.map((e, t) => ({ childEl: e, i: t })).filter(({ i: e }) => !se[e]);
260
273
  let K = null;
261
- n === "toggle-single" ? K = /* @__PURE__ */ a(
274
+ n === "toggle-single" ? K = /* @__PURE__ */ l(
262
275
  k.RadioGroup,
263
276
  {
264
277
  value: g,
265
278
  onValueChange: (e) => {
266
279
  !L && e !== g && I(e);
267
280
  },
268
- children: $.map(({ childEl: e, i: o }) => /* @__PURE__ */ a(
281
+ children: E.map(({ childEl: e, i: t }) => /* @__PURE__ */ l(
269
282
  k.RadioItem,
270
283
  {
271
284
  value: e.props.value ?? "",
272
285
  disabled: L || e.props.disabled === !0,
273
286
  children: B(e)
274
287
  },
275
- e.key ?? o
288
+ e.key ?? t
276
289
  ))
277
290
  }
278
- ) : n === "toggle-multi" ? K = $.map(({ childEl: e, i: o }) => {
279
- const r = e.props.value, t = g, s = r ? t.includes(r) : !1;
280
- return /* @__PURE__ */ a(
291
+ ) : n === "toggle-multi" ? K = E.map(({ childEl: e, i: t }) => {
292
+ const r = e.props.value, o = g, a = r ? o.includes(r) : !1;
293
+ return /* @__PURE__ */ l(
281
294
  k.CheckboxItem,
282
295
  {
283
- checked: s,
296
+ checked: a,
284
297
  disabled: L || e.props.disabled === !0,
285
298
  onCheckedChange: () => {
286
- L || !r || I(s ? t.filter((N) => N !== r) : [...t, r]);
299
+ L || !r || I(a ? o.filter((N) => N !== r) : [...o, r]);
287
300
  },
288
301
  children: B(e)
289
302
  },
290
- e.key ?? o
303
+ e.key ?? t
291
304
  );
292
- }) : K = $.map(({ childEl: e, i: o }) => /* @__PURE__ */ a(
305
+ }) : K = E.map(({ childEl: e, i: t }) => /* @__PURE__ */ l(
293
306
  k.Item,
294
307
  {
295
308
  startIcon: e.props.icon,
296
309
  disabled: L || e.props.disabled === !0,
297
310
  onSelect: (r) => {
298
- var t, s;
299
- (s = (t = e.props).onClick) == null || s.call(
300
- t,
311
+ var o, a;
312
+ (a = (o = e.props).onClick) == null || a.call(
313
+ o,
301
314
  r
302
315
  );
303
316
  },
304
317
  children: B(e)
305
318
  },
306
- e.key ?? o
319
+ e.key ?? t
307
320
  ));
308
- const pe = V ? /* @__PURE__ */ T(k.Root, { children: [
309
- /* @__PURE__ */ a(k.Trigger, { asChild: !0, children: /* @__PURE__ */ a(
310
- he,
321
+ const be = V ? /* @__PURE__ */ _(k.Root, { children: [
322
+ /* @__PURE__ */ l(k.Trigger, { asChild: !0, children: /* @__PURE__ */ l(
323
+ ke,
311
324
  {
312
- icon: /* @__PURE__ */ a(we, {}),
325
+ icon: /* @__PURE__ */ l(Ie, {}),
313
326
  intent: S,
314
- size: m,
315
- "aria-label": fe,
327
+ size: b,
328
+ "aria-label": ge,
316
329
  ref: (e) => {
317
- ie.current = e, te(C, e);
330
+ ae.current = e, oe(R, e);
318
331
  },
319
- tabIndex: b ? de === C ? 0 : -1 : void 0,
320
- onFocus: b ? () => A(C) : void 0
332
+ tabIndex: m ? ue === R ? 0 : -1 : void 0,
333
+ onFocus: m ? () => A(R) : void 0
321
334
  }
322
335
  ) }),
323
- /* @__PURE__ */ a(k.Content, { align: "end", children: K })
324
- ] }) : null, ge = ke({ orientation: c }), E = i !== "radiogroup", me = /* @__PURE__ */ T(
336
+ /* @__PURE__ */ l(k.Content, { align: "end", children: K })
337
+ ] }) : null, me = Ce({ orientation: c }), U = i !== "radiogroup", ve = /* @__PURE__ */ _(
325
338
  "div",
326
339
  {
327
340
  role: i,
328
341
  "aria-label": X,
329
342
  "aria-labelledby": Y,
330
343
  "aria-orientation": i === "toolbar" ? c : void 0,
331
- onKeyDown: E ? M : void 0,
332
- className: `${ge} ds:max-w-full`,
344
+ onKeyDown: U ? O : void 0,
345
+ className: `${me} ds:max-w-full`,
333
346
  children: [
334
- ce,
335
- E ? pe : null
347
+ fe,
348
+ U ? be : null
336
349
  ]
337
350
  }
338
351
  );
339
- return /* @__PURE__ */ a(
352
+ return /* @__PURE__ */ l(
340
353
  "div",
341
354
  {
342
- ref: ue,
355
+ ref: pe,
343
356
  "data-component": "icon-button-group",
344
357
  className: [
345
358
  "ds:relative ds:block ds:w-full ds:min-w-0 ds:overflow-x-clip",
346
359
  J ?? ""
347
360
  ].join(" ").trim(),
348
361
  ...Z,
349
- children: /* @__PURE__ */ T("div", { ref: De, className: "ds:block ds:w-full ds:min-w-0", children: [
350
- /* @__PURE__ */ a(
362
+ children: /* @__PURE__ */ _("div", { ref: Ne, className: "ds:block ds:w-full ds:min-w-0", children: [
363
+ /* @__PURE__ */ l(
351
364
  "div",
352
365
  {
353
- ref: Ve,
366
+ ref: je,
354
367
  "aria-hidden": "true",
355
368
  inert: !0,
356
- className: `${Ie} ${ge}`,
369
+ className: `${xe} ${me}`,
357
370
  children: D.map(
358
- (e, o) => ye(e, {
359
- key: e.key ?? o,
371
+ (e, t) => we(e, {
372
+ key: e.key ?? t,
360
373
  intent: e.props.intent ?? S,
361
- size: e.props.size ?? m,
374
+ size: e.props.size ?? b,
362
375
  tabIndex: -1,
363
376
  ref: null
364
377
  })
365
378
  )
366
379
  }
367
380
  ),
368
- /* @__PURE__ */ a(
381
+ /* @__PURE__ */ l(
369
382
  "span",
370
383
  {
371
- ref: Le,
384
+ ref: ze,
372
385
  "aria-hidden": "true",
373
386
  inert: !0,
374
- className: Ie,
375
- children: /* @__PURE__ */ a(
376
- he,
387
+ className: xe,
388
+ children: /* @__PURE__ */ l(
389
+ ke,
377
390
  {
378
- icon: /* @__PURE__ */ a(we, {}),
391
+ icon: /* @__PURE__ */ l(Ie, {}),
379
392
  intent: S,
380
- size: m,
381
- "aria-label": fe,
393
+ size: b,
394
+ "aria-label": ge,
382
395
  tabIndex: -1
383
396
  }
384
397
  )
385
398
  }
386
399
  ),
387
- E ? me : (
400
+ U ? ve : (
388
401
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions -- non-focusable wrapper; arrow-key roving bubbles up from the focusable IconButtons in the strip and the overflow trigger
389
- /* @__PURE__ */ T(
402
+ /* @__PURE__ */ _(
390
403
  "div",
391
404
  {
392
405
  className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
393
- onKeyDown: M,
406
+ onKeyDown: O,
394
407
  children: [
395
- me,
396
- pe
408
+ ve,
409
+ be
397
410
  ]
398
411
  }
399
412
  )
@@ -403,13 +416,13 @@ const ke = Be(
403
416
  );
404
417
  }
405
418
  );
406
- _e.displayName = "IconButtonGroup";
407
- function Ge(d, y, m, c) {
408
- if (d === "momentary" || !m) return {};
409
- const i = d === "toggle-multi" ? c.includes(m) : c === m;
419
+ Oe.displayName = "IconButtonGroup";
420
+ function $e(s, y, b, c) {
421
+ if (s === "momentary" || !b) return {};
422
+ const i = s === "toggle-multi" ? c.includes(b) : c === b;
410
423
  return y === "radiogroup" ? { ariaChecked: i } : { ariaPressed: i };
411
424
  }
412
425
  export {
413
- _e as I
426
+ Oe as I
414
427
  };
415
- //# sourceMappingURL=icon-button-group-DkkdIygu.js.map
428
+ //# sourceMappingURL=icon-button-group-DZKC6KGf.js.map
@@ -0,0 +1,94 @@
1
+ import { createElement as e } from "react";
2
+ import { P as i } from "./pregnancy-dating-DcyV9ZRD.js";
3
+ import { P as o } from "./pregnancy-weight-gain-Bfq4Kwt5.js";
4
+ import { G as r } from "./gestational-age-calculator-CwbecTul.js";
5
+ import { C as c } from "./cycle-calculator-BH2StWoT.js";
6
+ import { F as s } from "./fetal-weight-wx4ycKc6.js";
7
+ import { c as a } from "./createLucideIcon-DhHxpK9K.js";
8
+ import { B as n } from "./baby-Dku-Xvg9.js";
9
+ import { H as d } from "./heart--qCA4ffe.js";
10
+ /**
11
+ * @license lucide-react v1.22.0 - ISC
12
+ *
13
+ * This source code is licensed under the ISC license.
14
+ * See the LICENSE file in the root directory of this source tree.
15
+ */
16
+ const l = [
17
+ [
18
+ "path",
19
+ { d: "M12.127 22H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v5.125", key: "vxdnp4" }
20
+ ],
21
+ [
22
+ "path",
23
+ {
24
+ d: "M14.62 18.8A2.25 2.25 0 1 1 18 15.836a2.25 2.25 0 1 1 3.38 2.966l-2.626 2.856a.998.998 0 0 1-1.507 0z",
25
+ key: "15cy7q"
26
+ }
27
+ ],
28
+ ["path", { d: "M16 2v4", key: "4m81vk" }],
29
+ ["path", { d: "M3 10h18", key: "8toen8" }],
30
+ ["path", { d: "M8 2v4", key: "1cmpym" }]
31
+ ], p = a("calendar-heart", l);
32
+ /**
33
+ * @license lucide-react v1.22.0 - ISC
34
+ *
35
+ * This source code is licensed under the ISC license.
36
+ * See the LICENSE file in the root directory of this source tree.
37
+ */
38
+ const k = [
39
+ ["path", { d: "M12 3v18", key: "108xh3" }],
40
+ ["path", { d: "m19 8 3 8a5 5 0 0 1-6 0zV7", key: "zcdpyk" }],
41
+ ["path", { d: "M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1", key: "1yorad" }],
42
+ ["path", { d: "m5 8 3 8a5 5 0 0 1-6 0zV7", key: "eua70x" }],
43
+ ["path", { d: "M7 21h10", key: "1b0cd5" }]
44
+ ], g = a("scale", k), I = [
45
+ {
46
+ id: "pregnancy-dating",
47
+ label: "insert.title.pregnancyDating",
48
+ icon: e(p),
49
+ kind: "panel",
50
+ contexts: ["note", "diagnosis"],
51
+ source: { kind: "kit" },
52
+ render: ({ insert: t }) => e(i, { onInsert: t })
53
+ },
54
+ {
55
+ id: "pregnancy-weight-gain",
56
+ label: "insert.title.weightGain",
57
+ icon: e(n),
58
+ kind: "panel",
59
+ contexts: ["note", "diagnosis"],
60
+ source: { kind: "kit" },
61
+ render: ({ insert: t }) => e(o, { onInsert: t })
62
+ },
63
+ {
64
+ id: "gestational-age-calculator",
65
+ label: "insert.title.gestationalAge",
66
+ icon: e(n),
67
+ kind: "panel",
68
+ contexts: ["note", "diagnosis"],
69
+ source: { kind: "kit" },
70
+ render: ({ insert: t }) => e(r, { onInsert: t })
71
+ },
72
+ {
73
+ id: "cycle-calculator",
74
+ label: "insert.title.cycle",
75
+ icon: e(d),
76
+ kind: "panel",
77
+ contexts: ["note", "diagnosis"],
78
+ source: { kind: "kit" },
79
+ render: ({ insert: t }) => e(c, { onInsert: t })
80
+ },
81
+ {
82
+ id: "fetal-weight",
83
+ label: "insert.title.fetalWeight",
84
+ icon: e(g),
85
+ kind: "panel",
86
+ contexts: ["note", "diagnosis"],
87
+ source: { kind: "kit" },
88
+ render: ({ insert: t }) => e(s, { onInsert: t })
89
+ }
90
+ ];
91
+ export {
92
+ I as k
93
+ };
94
+ //# sourceMappingURL=kit-extensions-DuoFF1R3.js.map