@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.
- package/dist/_chunks/{actions-cell-renderer-BXBy9c0f.js → actions-cell-renderer-B5m9lwgC.js} +2 -2
- package/dist/_chunks/ai-credits-notice-xszqOZTC.js +90 -0
- package/dist/_chunks/ai-credits-notice.agent-C9L7orrP.js +17 -0
- package/dist/_chunks/{ai-consent-banner-D7I2U-cz.js → ai-permission-notice-D7I2U-cz.js} +1 -1
- package/dist/_chunks/ai-sparkle-D23NT8Z_.js +45 -0
- package/dist/_chunks/{anamnesis-summary-rows-DQUqwWc1.js → anamnesis-summary-rows-DI-UX5r6.js} +2 -2
- package/dist/_chunks/{appointment-card-TgR_2GKS.js → appointment-card-DluZy8Iv.js} +2 -2
- package/dist/_chunks/{appointment-peek-abiR0T9e.js → appointment-peek-BsfCpiJs.js} +3 -3
- package/dist/_chunks/{appointment-timeline-CCnyUYKz.js → appointment-timeline-Cs5f9viN.js} +3 -3
- package/dist/_chunks/{appointment-tray-N0yEI8UF.js → appointment-tray-CLrGGnKR.js} +2 -2
- package/dist/_chunks/baby-Dku-Xvg9.js +23 -0
- package/dist/_chunks/{balance-badge-cell-o6LldMUA.js → balance-badge-cell-YGrYdrvR.js} +3 -3
- package/dist/_chunks/{booking-D43ASl8y.js → booking-B7gA9gFB.js} +279 -296
- package/dist/_chunks/button-group-CA1tmu39.js +325 -0
- package/dist/_chunks/{calendar-U6N0F99w.js → calendar-OzSeTb4V.js} +2 -2
- package/dist/_chunks/{calendar-event-card-DKUnT9Be.js → calendar-event-card-B6N5h1dO.js} +57 -48
- package/dist/_chunks/{calendar-workspace-DBYAtdyd.js → calendar-workspace-BB-BZT7W.js} +3002 -2912
- package/dist/_chunks/{chart-PF2krCZC.js → chart-D8ucl8hH.js} +2 -2
- package/dist/_chunks/{data-table-CcAx_I1w.js → data-table-DnKOmEVw.js} +2 -2
- package/dist/_chunks/{editable-currency-cell-renderer-Psb6XKHR.js → editable-currency-cell-renderer-OUkUv7U4.js} +2 -2
- package/dist/_chunks/{face-scheme-Bm6pe7R8.js → face-scheme-mIhwrQXt.js} +3 -3
- package/dist/_chunks/{file-manager-BfLQxF5t.js → file-manager-DOcJGIx2.js} +4 -4
- package/dist/_chunks/{header-settings-CTe45iDy.js → header-settings-BEfx_-TF.js} +2 -2
- package/dist/_chunks/{help-me-write-templates-GUeEn3Ff.js → help-me-write-templates-DHIwa4xR.js} +205 -199
- package/dist/_chunks/{hover-card-BMJBVqIf.js → hover-card-nUae8NPJ.js} +67 -62
- package/dist/_chunks/{icon-button-group-DkkdIygu.js → icon-button-group-DZKC6KGf.js} +181 -168
- package/dist/_chunks/kit-extensions-DuoFF1R3.js +94 -0
- package/dist/_chunks/{marketplace-app-shell-DdwPj03y.js → marketplace-app-shell-PB89Dkk_.js} +2 -2
- package/dist/_chunks/{notes-panel-CY4KmDo-.js → notes-panel-CHbDDMx8.js} +83 -73
- package/dist/_chunks/{patient-details-C8ImUrVg.js → patient-details-DUj1htsH.js} +2 -2
- package/dist/_chunks/{patient-field-row-BRSOKvme.js → patient-field-row-CO0WR7yA.js} +2 -2
- package/dist/_chunks/{patient-summary-card-BhmKB2KR.js → patient-summary-card-DNzdYjxE.js} +59 -45
- package/dist/_chunks/rich-text-editor-BwDV2XkZ.js +4153 -0
- package/dist/_chunks/{tasks-panel-CpcikOeY.js → tasks-panel-DncuBPIZ.js} +2 -2
- package/dist/_chunks/{theme-toggle-bI0pgDDv.js → theme-toggle-BP0XRGMM.js} +2 -2
- package/dist/_chunks/use-ai-sparkle-Cf4yVTLB.js +76 -0
- package/dist/_chunks/{workflow-status-xeaJTzD3.js → workflow-status-CuJAOuKL.js} +43 -42
- package/dist/agent-catalog.json +32 -4
- package/dist/agent-i18n/en.json +1 -1
- package/dist/components/ai-credits-notice/ai-credits-notice.agent.d.ts +3 -0
- package/dist/components/ai-credits-notice/ai-credits-notice.d.ts +48 -0
- package/dist/components/ai-credits-notice/index.d.ts +4 -0
- package/dist/components/ai-credits-notice/index.js +7 -0
- package/dist/components/{ai-consent-banner/ai-consent-banner.agent.d.ts → ai-permission-notice/ai-permission-notice.agent.d.ts} +2 -2
- package/dist/components/{ai-consent-banner/ai-consent-banner.d.ts → ai-permission-notice/ai-permission-notice.d.ts} +1 -1
- package/dist/components/ai-permission-notice/index.d.ts +4 -0
- package/dist/components/{ai-consent-banner → ai-permission-notice}/index.js +1 -1
- package/dist/components/ai-sparkle/ai-sparkle.d.ts +24 -0
- package/dist/components/ai-sparkle/index.d.ts +3 -0
- package/dist/components/ai-sparkle/index.js +5 -0
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/calendar-event-card/index.js +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/data-table/index.js +3 -3
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/hover-card/hover-card.d.ts +4 -0
- package/dist/components/hover-card/index.d.ts +1 -1
- package/dist/components/hover-card/index.js +3 -2
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/index.d.ts +5 -3
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +10 -0
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/rich-text-editor/editor-extensions.d.ts +54 -0
- package/dist/components/rich-text-editor/editor-toolbar.d.ts +2 -1
- package/dist/components/rich-text-editor/help-me-write-overlay.d.ts +4 -0
- package/dist/components/rich-text-editor/index.d.ts +2 -0
- package/dist/components/rich-text-editor/index.js +6 -4
- package/dist/components/rich-text-editor/kit-extensions.d.ts +4 -0
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +18 -2
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/workflow-status/index.js +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +54 -48
- package/dist/hooks/use-ai-sparkle.d.ts +91 -0
- package/dist/host-compat.css +2 -2
- package/dist/i18n/locales/ar.d.ts +31 -0
- package/dist/i18n/locales/ar.js +33 -2
- package/dist/i18n/locales/de.d.ts +31 -0
- package/dist/i18n/locales/de.js +33 -2
- package/dist/i18n/locales/el.d.ts +31 -0
- package/dist/i18n/locales/el.js +33 -2
- package/dist/i18n/locales/en.d.ts +31 -0
- package/dist/i18n/locales/en.js +33 -2
- package/dist/i18n/locales/es.d.ts +31 -0
- package/dist/i18n/locales/es.js +33 -2
- package/dist/i18n/locales/fr.d.ts +31 -0
- package/dist/i18n/locales/fr.js +33 -2
- package/dist/i18n/locales/hi.d.ts +31 -0
- package/dist/i18n/locales/hi.js +33 -2
- package/dist/i18n/locales/it.d.ts +31 -0
- package/dist/i18n/locales/it.js +33 -2
- package/dist/i18n/locales/ja.d.ts +31 -0
- package/dist/i18n/locales/ja.js +33 -2
- package/dist/i18n/locales/nl.d.ts +31 -0
- package/dist/i18n/locales/nl.js +33 -2
- package/dist/i18n/locales/pl.d.ts +31 -0
- package/dist/i18n/locales/pl.js +33 -2
- package/dist/i18n/locales/pt.d.ts +31 -0
- package/dist/i18n/locales/pt.js +33 -2
- package/dist/i18n/locales/ro.d.ts +31 -0
- package/dist/i18n/locales/ro.js +33 -2
- package/dist/i18n/locales/ru.d.ts +31 -0
- package/dist/i18n/locales/ru.js +33 -2
- package/dist/i18n/locales/sq.d.ts +31 -0
- package/dist/i18n/locales/sq.js +33 -2
- package/dist/i18n/locales/sv.d.ts +31 -0
- package/dist/i18n/locales/sv.js +33 -2
- package/dist/i18n/locales/tr.d.ts +31 -0
- package/dist/i18n/locales/tr.js +33 -2
- package/dist/i18n/locales/zh.d.ts +31 -0
- package/dist/i18n/locales/zh.js +33 -2
- package/dist/index.js +1113 -1102
- package/dist/locales/ar.json +33 -2
- package/dist/locales/de.json +33 -2
- package/dist/locales/el.json +33 -2
- package/dist/locales/en.json +33 -2
- package/dist/locales/es.json +33 -2
- package/dist/locales/fr.json +33 -2
- package/dist/locales/hi.json +33 -2
- package/dist/locales/it.json +33 -2
- package/dist/locales/ja.json +33 -2
- package/dist/locales/nl.json +33 -2
- package/dist/locales/pl.json +33 -2
- package/dist/locales/pt.json +33 -2
- package/dist/locales/ro.json +33 -2
- package/dist/locales/ru.json +33 -2
- package/dist/locales/sq.json +33 -2
- package/dist/locales/sv.json +33 -2
- package/dist/locales/tr.json +33 -2
- package/dist/locales/zh.json +33 -2
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/calendar-workspace.d.ts +6 -4
- package/dist/patterns/calendar/calendar.data.d.ts +9 -0
- package/dist/patterns/calendar/calendar.journey.d.ts +1 -1
- package/dist/patterns/calendar/calendar.sheets.d.ts +16 -5
- package/dist/patterns/calendar/calendar.types.d.ts +3 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts +11 -2
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +14 -4
- package/dist/_chunks/button-group-R32U7SyV.js +0 -307
- package/dist/_chunks/rich-text-editor-BYE6kK4u.js +0 -3839
- package/dist/components/ai-consent-banner/index.d.ts +0 -4
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { I as
|
|
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
|
|
8
|
-
import { u as
|
|
9
|
-
import { E as
|
|
10
|
-
|
|
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
|
-
),
|
|
56
|
-
(
|
|
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:
|
|
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:
|
|
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:
|
|
73
|
-
defaultValue:
|
|
74
|
-
onValueChange:
|
|
75
|
+
value: Ee,
|
|
76
|
+
defaultValue: Ue,
|
|
77
|
+
onValueChange: We,
|
|
75
78
|
...Z
|
|
76
|
-
} =
|
|
77
|
-
() => n === "toggle-single" ?
|
|
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 =
|
|
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 =
|
|
87
|
+
const e = s;
|
|
85
88
|
return e.value !== void 0 ? e.value : ee;
|
|
86
89
|
}
|
|
87
90
|
return "";
|
|
88
|
-
})(), I =
|
|
91
|
+
})(), I = F(
|
|
89
92
|
(e) => {
|
|
90
|
-
var
|
|
93
|
+
var t, r;
|
|
91
94
|
if (n === "toggle-single") {
|
|
92
|
-
const
|
|
93
|
-
|
|
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
|
|
96
|
-
|
|
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,
|
|
100
|
-
),
|
|
101
|
-
(e,
|
|
102
|
-
x.current[e] =
|
|
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 =
|
|
106
|
-
|
|
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
|
|
111
|
-
|
|
113
|
+
const t = window.getComputedStyle(e).direction;
|
|
114
|
+
Ve(t === "rtl");
|
|
112
115
|
}, []);
|
|
113
|
-
const
|
|
116
|
+
const O = F(
|
|
114
117
|
(e) => {
|
|
115
|
-
var
|
|
116
|
-
if (!
|
|
117
|
-
const
|
|
118
|
-
if (
|
|
119
|
-
const r = c === "vertical" ? "ArrowDown" :
|
|
120
|
-
let
|
|
121
|
-
if (e.key === r ?
|
|
122
|
-
const N =
|
|
123
|
-
let
|
|
124
|
-
for (;
|
|
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 ===
|
|
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), (
|
|
131
|
-
const f =
|
|
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
|
-
|
|
142
|
+
m,
|
|
140
143
|
c,
|
|
141
|
-
|
|
144
|
+
M,
|
|
142
145
|
v,
|
|
143
146
|
i,
|
|
144
147
|
n,
|
|
145
148
|
I,
|
|
146
149
|
g
|
|
147
150
|
]
|
|
148
|
-
), D = h ?
|
|
149
|
-
const
|
|
150
|
-
return typeof
|
|
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
|
-
|
|
153
|
-
const
|
|
154
|
-
const
|
|
155
|
-
return
|
|
156
|
-
}), { containerRef:
|
|
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:
|
|
160
|
-
}),
|
|
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
|
|
163
|
-
|
|
164
|
-
const
|
|
165
|
-
(e) =>
|
|
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
|
-
|
|
168
|
-
|
|
169
|
-
}, [
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
var
|
|
173
|
-
if (!
|
|
174
|
-
const e =
|
|
175
|
-
e > 0 && v >= e && (A(e - 1), document.activeElement === document.body && ((
|
|
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
|
-
|
|
190
|
+
m,
|
|
178
191
|
h,
|
|
179
|
-
|
|
192
|
+
R,
|
|
180
193
|
V,
|
|
181
194
|
v
|
|
182
195
|
]);
|
|
183
|
-
const
|
|
184
|
-
if (!
|
|
185
|
-
const
|
|
186
|
-
return
|
|
187
|
-
},
|
|
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 ?
|
|
192
|
-
) : v,
|
|
193
|
-
if (!
|
|
204
|
+
V ? R : v
|
|
205
|
+
) : v, fe = w.map((e, t) => {
|
|
206
|
+
if (!G(e))
|
|
194
207
|
return e;
|
|
195
|
-
const r = e,
|
|
208
|
+
const r = e, o = r.props.value, { ariaPressed: a, ariaChecked: N } = $e(
|
|
196
209
|
n,
|
|
197
210
|
i,
|
|
198
|
-
|
|
211
|
+
o,
|
|
199
212
|
g
|
|
200
|
-
),
|
|
201
|
-
var
|
|
202
|
-
if (
|
|
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 = (
|
|
219
|
+
if ((z = (d = r.props).onClick) == null || z.call(d, p), !p.defaultPrevented && o) {
|
|
207
220
|
if (n === "toggle-single") {
|
|
208
|
-
if (g ===
|
|
209
|
-
I(
|
|
221
|
+
if (g === o) return;
|
|
222
|
+
I(o);
|
|
210
223
|
} else if (n === "toggle-multi") {
|
|
211
|
-
const
|
|
212
|
-
I(
|
|
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
|
-
|
|
217
|
-
const
|
|
218
|
-
typeof
|
|
219
|
-
}, j =
|
|
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 ??
|
|
234
|
+
size: r.props.size ?? b,
|
|
222
235
|
disabled: u,
|
|
223
236
|
"aria-disabled": j,
|
|
224
|
-
onClick:
|
|
225
|
-
"aria-pressed":
|
|
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:
|
|
245
|
+
tabIndex: m ? t === ue ? 0 : -1 : void 0,
|
|
233
246
|
onFocus: (p) => {
|
|
234
|
-
var
|
|
235
|
-
|
|
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
|
|
240
|
-
}),
|
|
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__ */
|
|
257
|
+
return /* @__PURE__ */ l(
|
|
245
258
|
"div",
|
|
246
259
|
{
|
|
247
|
-
ref:
|
|
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:
|
|
253
|
-
className:
|
|
265
|
+
onKeyDown: O,
|
|
266
|
+
className: Ce({ orientation: c, className: J }),
|
|
254
267
|
"data-component": "icon-button-group",
|
|
255
268
|
...Z,
|
|
256
|
-
children:
|
|
269
|
+
children: fe
|
|
257
270
|
}
|
|
258
271
|
);
|
|
259
|
-
const
|
|
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__ */
|
|
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:
|
|
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 ??
|
|
288
|
+
e.key ?? t
|
|
276
289
|
))
|
|
277
290
|
}
|
|
278
|
-
) : n === "toggle-multi" ? K =
|
|
279
|
-
const r = e.props.value,
|
|
280
|
-
return /* @__PURE__ */
|
|
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:
|
|
296
|
+
checked: a,
|
|
284
297
|
disabled: L || e.props.disabled === !0,
|
|
285
298
|
onCheckedChange: () => {
|
|
286
|
-
L || !r || I(
|
|
299
|
+
L || !r || I(a ? o.filter((N) => N !== r) : [...o, r]);
|
|
287
300
|
},
|
|
288
301
|
children: B(e)
|
|
289
302
|
},
|
|
290
|
-
e.key ??
|
|
303
|
+
e.key ?? t
|
|
291
304
|
);
|
|
292
|
-
}) : K =
|
|
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
|
|
299
|
-
(
|
|
300
|
-
|
|
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 ??
|
|
319
|
+
e.key ?? t
|
|
307
320
|
));
|
|
308
|
-
const
|
|
309
|
-
/* @__PURE__ */
|
|
310
|
-
|
|
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__ */
|
|
325
|
+
icon: /* @__PURE__ */ l(Ie, {}),
|
|
313
326
|
intent: S,
|
|
314
|
-
size:
|
|
315
|
-
"aria-label":
|
|
327
|
+
size: b,
|
|
328
|
+
"aria-label": ge,
|
|
316
329
|
ref: (e) => {
|
|
317
|
-
|
|
330
|
+
ae.current = e, oe(R, e);
|
|
318
331
|
},
|
|
319
|
-
tabIndex:
|
|
320
|
-
onFocus:
|
|
332
|
+
tabIndex: m ? ue === R ? 0 : -1 : void 0,
|
|
333
|
+
onFocus: m ? () => A(R) : void 0
|
|
321
334
|
}
|
|
322
335
|
) }),
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
-
] }) : null,
|
|
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:
|
|
332
|
-
className: `${
|
|
344
|
+
onKeyDown: U ? O : void 0,
|
|
345
|
+
className: `${me} ds:max-w-full`,
|
|
333
346
|
children: [
|
|
334
|
-
|
|
335
|
-
|
|
347
|
+
fe,
|
|
348
|
+
U ? be : null
|
|
336
349
|
]
|
|
337
350
|
}
|
|
338
351
|
);
|
|
339
|
-
return /* @__PURE__ */
|
|
352
|
+
return /* @__PURE__ */ l(
|
|
340
353
|
"div",
|
|
341
354
|
{
|
|
342
|
-
ref:
|
|
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__ */
|
|
350
|
-
/* @__PURE__ */
|
|
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:
|
|
366
|
+
ref: je,
|
|
354
367
|
"aria-hidden": "true",
|
|
355
368
|
inert: !0,
|
|
356
|
-
className: `${
|
|
369
|
+
className: `${xe} ${me}`,
|
|
357
370
|
children: D.map(
|
|
358
|
-
(e,
|
|
359
|
-
key: e.key ??
|
|
371
|
+
(e, t) => we(e, {
|
|
372
|
+
key: e.key ?? t,
|
|
360
373
|
intent: e.props.intent ?? S,
|
|
361
|
-
size: e.props.size ??
|
|
374
|
+
size: e.props.size ?? b,
|
|
362
375
|
tabIndex: -1,
|
|
363
376
|
ref: null
|
|
364
377
|
})
|
|
365
378
|
)
|
|
366
379
|
}
|
|
367
380
|
),
|
|
368
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ l(
|
|
369
382
|
"span",
|
|
370
383
|
{
|
|
371
|
-
ref:
|
|
384
|
+
ref: ze,
|
|
372
385
|
"aria-hidden": "true",
|
|
373
386
|
inert: !0,
|
|
374
|
-
className:
|
|
375
|
-
children: /* @__PURE__ */
|
|
376
|
-
|
|
387
|
+
className: xe,
|
|
388
|
+
children: /* @__PURE__ */ l(
|
|
389
|
+
ke,
|
|
377
390
|
{
|
|
378
|
-
icon: /* @__PURE__ */
|
|
391
|
+
icon: /* @__PURE__ */ l(Ie, {}),
|
|
379
392
|
intent: S,
|
|
380
|
-
size:
|
|
381
|
-
"aria-label":
|
|
393
|
+
size: b,
|
|
394
|
+
"aria-label": ge,
|
|
382
395
|
tabIndex: -1
|
|
383
396
|
}
|
|
384
397
|
)
|
|
385
398
|
}
|
|
386
399
|
),
|
|
387
|
-
|
|
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__ */
|
|
402
|
+
/* @__PURE__ */ _(
|
|
390
403
|
"div",
|
|
391
404
|
{
|
|
392
405
|
className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
393
|
-
onKeyDown:
|
|
406
|
+
onKeyDown: O,
|
|
394
407
|
children: [
|
|
395
|
-
|
|
396
|
-
|
|
408
|
+
ve,
|
|
409
|
+
be
|
|
397
410
|
]
|
|
398
411
|
}
|
|
399
412
|
)
|
|
@@ -403,13 +416,13 @@ const ke = Be(
|
|
|
403
416
|
);
|
|
404
417
|
}
|
|
405
418
|
);
|
|
406
|
-
|
|
407
|
-
function
|
|
408
|
-
if (
|
|
409
|
-
const i =
|
|
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
|
-
|
|
426
|
+
Oe as I
|
|
414
427
|
};
|
|
415
|
-
//# sourceMappingURL=icon-button-group-
|
|
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
|