@alfadocs/ui-kit 1.142.0 → 1.143.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/{ai-permission-notice-C-xR2_iS.js → ai-permission-notice-CEDEWE2-.js} +19 -11
- package/dist/_chunks/{ai-summary-panel-BhCo2vZF.js → ai-summary-panel-CJVOjr2I.js} +3 -3
- package/dist/_chunks/{alia-sidebar-uxTsUbIt.js → alia-sidebar-AKz42_XE.js} +2 -2
- package/dist/_chunks/{anamnesis-card-sUFT0dpF.js → anamnesis-card-W8ZaDytS.js} +15 -14
- package/dist/_chunks/{anamnesis-summary-rows-C2Ca9_Qj.js → anamnesis-summary-rows-wUl7oXBO.js} +2 -2
- package/dist/_chunks/{appointment-card-C0UFYFLZ.js → appointment-card-HOZrABrQ.js} +2 -2
- package/dist/_chunks/{appointment-details-panel.history-BUXwhill.js → appointment-details-panel.history-B8R8XfGe.js} +36 -29
- package/dist/_chunks/appointment-timeline-CMc_3C74.js +776 -0
- package/dist/_chunks/{appointment-tray-dfgScPcC.js → appointment-tray-D8k5YKLU.js} +2 -2
- package/dist/_chunks/{balance-badge-cell-CXi6moSa.js → balance-badge-cell-10BdaOQ8.js} +4 -4
- package/dist/_chunks/{calendar-appointment-editor-dialog-BDc8Q4Ji.js → calendar-appointment-editor-dialog-9kVppi9f.js} +8 -8
- package/dist/_chunks/{calendar-waiting-list-panel-js-0KEh8.js → calendar-waiting-list-panel-CSFJw5np.js} +2 -2
- package/dist/_chunks/{calendar.sheets-sBWH7Jxn.js → calendar.sheets-DZh3p8HE.js} +4 -4
- package/dist/_chunks/{care-plan-card-TZH6C60K.js → care-plan-card-CkRqA58O.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-CufvXAWa.js → care-plan-entry-card-DurPuYAP.js} +2 -2
- package/dist/_chunks/{care-plan-header-CeFXUDnL.js → care-plan-header-C4i93i8H.js} +2 -2
- package/dist/_chunks/{chat-message-B4TMeZ2m.js → chat-message-IG9uRq6y.js} +2 -2
- package/dist/_chunks/{clinical-note-card-D--IwbZa.js → clinical-note-card-D-9xmRpf.js} +68 -52
- package/dist/_chunks/{communications-panel-EP27FN7e.js → communications-panel-MgAuWYBy.js} +3 -3
- package/dist/_chunks/{control-room-rail-7SidoPJH.js → control-room-rail-DBmNpbDE.js} +2 -2
- package/dist/_chunks/{data-table-Bq1FRBGB.js → data-table-Huk4CNHs.js} +115 -115
- package/dist/_chunks/{entity-summary-CPUHzyil.js → entity-summary-DgZSdp6d.js} +2 -2
- package/dist/_chunks/{file-manager-ChQSjfU8.js → file-manager-kdPsJq_k.js} +2 -2
- package/dist/_chunks/{heatmap-D0OGx-70.js → heatmap-Cb4JSpv_.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-ByOAy2Sb.js → link-cell-renderer-Bt_sl4iP.js} +3 -3
- package/dist/_chunks/{message-card-Bw_q1qKx.js → message-card-DvBjcZgH.js} +10 -9
- package/dist/_chunks/{message-tray-g6dp_AAt.js → message-tray-BHaE254g.js} +2 -2
- package/dist/_chunks/{notes-panel-CtMLUJOe.js → notes-panel-DCKbuZqS.js} +399 -397
- package/dist/_chunks/{notification-card-DRMv2_pW.js → notification-card-CDuzAytQ.js} +11 -10
- package/dist/_chunks/{notification-tray-DqCYs9Bw.js → notification-tray-CnPV8jDA.js} +2 -2
- package/dist/_chunks/{patient-account-settings-e8Wp2g-F.js → patient-account-settings-BQ9bMsJS.js} +2 -2
- package/dist/_chunks/{patient-check-in-resume-_nwf9gpx.js → patient-check-in-resume-v5lYhMsh.js} +4 -4
- package/dist/_chunks/{portal-details-D9oF6FUV.js → portal-details-CwX3VNxh.js} +2 -2
- package/dist/_chunks/{portal-documents-DSiLSave.js → portal-documents-BWdXhWpZ.js} +2 -2
- package/dist/_chunks/{portal-parts-8qrUM-uK.js → portal-parts-DbCMuZVl.js} +2 -2
- package/dist/_chunks/{prescription-history-DFcPXYdF.js → prescription-history-DPjqflwJ.js} +2 -2
- package/dist/_chunks/{product-hub-panel-BPpmVDm5.js → product-hub-panel-DiWjSIR2.js} +2 -2
- package/dist/_chunks/{recaptcha-widget-iglUBIF3.js → recaptcha-widget-D6RwGg8B.js} +35 -35
- package/dist/_chunks/{registration-form-DRGMzq9V.js → registration-form-BEsIjznv.js} +2 -2
- package/dist/_chunks/{rich-text-editor-CQ54ybTB.js → rich-text-editor-DoCaj0qc.js} +2 -2
- package/dist/_chunks/{sync-tray-BTmveFGE.js → sync-tray-BgrO4QjH.js} +55 -53
- package/dist/_chunks/{tasks-panel-Dmp49cBo.js → tasks-panel-CDFHAHrN.js} +137 -137
- package/dist/_chunks/{timeline-DXko0M1t.js → timeline-BzGi_3GQ.js} +2 -2
- package/dist/_chunks/timestamp-UMF1llBs.js +113 -0
- package/dist/_chunks/{tool-rail-CKOuVHUQ.js → tool-rail-mWmYNRCV.js} +56 -56
- package/dist/_chunks/{use-appointment-details-read-DIRHedaM.js → use-appointment-details-read-xj0PyEhI.js} +591 -576
- package/dist/_chunks/use-resolved-theme-B0f1_oyq.js +32 -0
- package/dist/_chunks/{voice-control-panel-CfBUrzhJ.js → voice-control-panel-DqvvZN2A.js} +2 -2
- package/dist/_chunks/{workflow-map-CsfRHhlz.js → workflow-map-CwfLHuiD.js} +2 -2
- package/dist/agent-catalog.json +10 -7
- package/dist/agent-i18n/en.json +3 -3
- package/dist/appointment-editor-panel/index.js +1 -1
- package/dist/browser-support.js +1 -1
- package/dist/components/ai-permission-notice/index.js +1 -1
- package/dist/components/ai-summary-panel/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +3 -0
- package/dist/components/appointment-details-panel/appointment-details-panel.types.d.ts +5 -0
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-timeline/appointment-timeline.d.ts +27 -0
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/care-plan-header/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/clinical-note-card/clinical-note-card.d.ts +2 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/communications-panel/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +5 -4
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/recaptcha-widget/index.js +1 -1
- package/dist/components/recaptcha-widget/recaptcha-widget.d.ts +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/sync-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/timestamp/index.js +1 -1
- package/dist/components/timestamp/timestamp.d.ts +6 -0
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/voice-control-panel/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/find-free-slots-panel/index.js +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +58 -56
- package/dist/hooks/use-resolved-theme.d.ts +20 -0
- package/dist/i18n/locales/ar.d.ts +5 -0
- package/dist/i18n/locales/ar.js +5 -0
- package/dist/i18n/locales/de.d.ts +5 -0
- package/dist/i18n/locales/de.js +5 -0
- package/dist/i18n/locales/el.d.ts +5 -0
- package/dist/i18n/locales/el.js +5 -0
- package/dist/i18n/locales/en.d.ts +5 -0
- package/dist/i18n/locales/en.js +5 -0
- package/dist/i18n/locales/es.d.ts +5 -0
- package/dist/i18n/locales/es.js +5 -0
- package/dist/i18n/locales/fr.d.ts +5 -0
- package/dist/i18n/locales/fr.js +5 -0
- package/dist/i18n/locales/hi.d.ts +5 -0
- package/dist/i18n/locales/hi.js +5 -0
- package/dist/i18n/locales/it.d.ts +5 -0
- package/dist/i18n/locales/it.js +5 -0
- package/dist/i18n/locales/ja.d.ts +5 -0
- package/dist/i18n/locales/ja.js +5 -0
- package/dist/i18n/locales/nl.d.ts +5 -0
- package/dist/i18n/locales/nl.js +5 -0
- package/dist/i18n/locales/pl.d.ts +5 -0
- package/dist/i18n/locales/pl.js +5 -0
- package/dist/i18n/locales/pt.d.ts +5 -0
- package/dist/i18n/locales/pt.js +5 -0
- package/dist/i18n/locales/ro.d.ts +5 -0
- package/dist/i18n/locales/ro.js +5 -0
- package/dist/i18n/locales/ru.d.ts +5 -0
- package/dist/i18n/locales/ru.js +5 -0
- package/dist/i18n/locales/sq.d.ts +5 -0
- package/dist/i18n/locales/sq.js +5 -0
- package/dist/i18n/locales/sv.d.ts +5 -0
- package/dist/i18n/locales/sv.js +5 -0
- package/dist/i18n/locales/tr.d.ts +5 -0
- package/dist/i18n/locales/tr.js +5 -0
- package/dist/i18n/locales/zh.d.ts +5 -0
- package/dist/i18n/locales/zh.js +5 -0
- package/dist/index.js +44 -44
- package/dist/locales/ar.json +5 -0
- package/dist/locales/de.json +5 -0
- package/dist/locales/el.json +5 -0
- package/dist/locales/en.json +5 -0
- package/dist/locales/es.json +5 -0
- package/dist/locales/fr.json +5 -0
- package/dist/locales/hi.json +5 -0
- package/dist/locales/it.json +5 -0
- package/dist/locales/ja.json +5 -0
- package/dist/locales/nl.json +5 -0
- package/dist/locales/pl.json +5 -0
- package/dist/locales/pt.json +5 -0
- package/dist/locales/ro.json +5 -0
- package/dist/locales/ru.json +5 -0
- package/dist/locales/sq.json +5 -0
- package/dist/locales/sv.json +5 -0
- package/dist/locales/tr.json +5 -0
- package/dist/locales/zh.json +5 -0
- package/dist/online-bookings-panel/index.js +1 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +2 -2
- package/dist/patterns/patient-account-settings/index.js +1 -1
- package/dist/patterns/patient-check-in/index.js +1 -1
- package/dist/patterns/patient-portal/index.js +2 -2
- package/dist/patterns/prescription/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/waiting-list-panel/index.js +2 -2
- package/package.json +1 -1
- package/dist/_chunks/appointment-timeline-BK68CCBl.js +0 -689
- package/dist/_chunks/timestamp-DPLDWdxA.js +0 -109
|
@@ -4,7 +4,7 @@ import { c as b } from "./index-D2ZczOXr.js";
|
|
|
4
4
|
import { useTranslation as A } from "react-i18next";
|
|
5
5
|
import { A as P } from "./avatar-Dp5apm1d.js";
|
|
6
6
|
import { C as N } from "./card-n6W6LW-N.js";
|
|
7
|
-
import { T as q } from "./timestamp-
|
|
7
|
+
import { T as q } from "./timestamp-UMF1llBs.js";
|
|
8
8
|
import { u as B } from "./registry-DvAUVLHh.js";
|
|
9
9
|
import { C as H } from "./circle-j7oZoouK.js";
|
|
10
10
|
import { X as D } from "./x-B5YnXwCz.js";
|
|
@@ -293,4 +293,4 @@ export {
|
|
|
293
293
|
le as T,
|
|
294
294
|
K as t
|
|
295
295
|
};
|
|
296
|
-
//# sourceMappingURL=timeline-
|
|
296
|
+
//# sourceMappingURL=timeline-BzGi_3GQ.js.map
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as C, useMemo as R, useState as E, useEffect as j } from "react";
|
|
3
|
+
import { c as A } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as O } from "react-i18next";
|
|
5
|
+
const U = A(
|
|
6
|
+
[
|
|
7
|
+
"ds:inline-flex ds:items-center ds:self-start",
|
|
8
|
+
"ds:rounded-[var(--radius-full)]",
|
|
9
|
+
"type-eyebrow",
|
|
10
|
+
"ds:whitespace-nowrap",
|
|
11
|
+
"ds:bg-muted/20 ds:text-[color:var(--muted-foreground)]"
|
|
12
|
+
].join(" "),
|
|
13
|
+
{
|
|
14
|
+
variants: {
|
|
15
|
+
size: {
|
|
16
|
+
sm: "ds:h-[calc(var(--spacing)*4)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:[--type-eyebrow-size:var(--font-size-2xs)]",
|
|
17
|
+
md: "ds:h-[calc(var(--spacing)*5)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:[--type-eyebrow-size:var(--font-size-2xs)]",
|
|
18
|
+
lg: "ds:h-[calc(var(--spacing)*6)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:[--type-eyebrow-size:var(--font-size-xs)]"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: { size: "sm" }
|
|
22
|
+
}
|
|
23
|
+
), D = 1e3, m = 60 * D, g = 60 * m, u = 24 * g, M = 7 * u, S = 30 * u, T = 365 * u;
|
|
24
|
+
function k(e) {
|
|
25
|
+
const t = Math.abs(e);
|
|
26
|
+
return t < m ? [Math.round(e / D), "second"] : t < g ? [Math.round(e / m), "minute"] : t < u ? [Math.round(e / g), "hour"] : t < M ? [Math.round(e / u), "day"] : t < S ? [Math.round(e / M), "week"] : t < T ? [Math.round(e / S), "month"] : [Math.round(e / T), "year"];
|
|
27
|
+
}
|
|
28
|
+
function H(e, t, s) {
|
|
29
|
+
let n = e.getTime() - Date.now();
|
|
30
|
+
n > 0 && (s || n < m) && (n = 0);
|
|
31
|
+
const [i, a] = k(n);
|
|
32
|
+
return new Intl.RelativeTimeFormat(t, {
|
|
33
|
+
numeric: "auto",
|
|
34
|
+
style: "long"
|
|
35
|
+
}).format(i, a);
|
|
36
|
+
}
|
|
37
|
+
function L(e, t, s) {
|
|
38
|
+
const n = s ?? {
|
|
39
|
+
year: "numeric",
|
|
40
|
+
month: "short",
|
|
41
|
+
day: "numeric",
|
|
42
|
+
hour: "numeric",
|
|
43
|
+
minute: "2-digit"
|
|
44
|
+
};
|
|
45
|
+
return new Intl.DateTimeFormat(t, n).format(e);
|
|
46
|
+
}
|
|
47
|
+
function V(e, t, s, n, i, a) {
|
|
48
|
+
const [v, d] = E({
|
|
49
|
+
label: i,
|
|
50
|
+
isRelative: !1
|
|
51
|
+
});
|
|
52
|
+
return j(() => {
|
|
53
|
+
if (!s) {
|
|
54
|
+
d(
|
|
55
|
+
(r) => r.isRelative || r.label !== i ? { label: i, isRelative: !1 } : r
|
|
56
|
+
);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const f = () => {
|
|
60
|
+
const r = new Date(e), c = n == null || Math.abs(e - Date.now()) < n ? { label: H(r, t, a), isRelative: !0 } : { label: i, isRelative: !1 };
|
|
61
|
+
d(
|
|
62
|
+
(o) => o.label === c.label && o.isRelative === c.isRelative ? o : c
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
f();
|
|
66
|
+
const h = window.setInterval(f, m);
|
|
67
|
+
return () => window.clearInterval(h);
|
|
68
|
+
}, [e, t, s, n, i, a]), v;
|
|
69
|
+
}
|
|
70
|
+
const Y = C(
|
|
71
|
+
({
|
|
72
|
+
value: e,
|
|
73
|
+
format: t = "relative",
|
|
74
|
+
shape: s = "inline",
|
|
75
|
+
size: n = "sm",
|
|
76
|
+
locale: i,
|
|
77
|
+
absoluteFormat: a,
|
|
78
|
+
relativeWindow: v,
|
|
79
|
+
pastOnly: d = !1,
|
|
80
|
+
title: f,
|
|
81
|
+
className: h,
|
|
82
|
+
...r
|
|
83
|
+
}, w) => {
|
|
84
|
+
const { i18n: c } = O("ui"), o = i ?? c.language ?? "en", l = R(() => e instanceof Date ? e.getTime() : typeof e == "number" ? e : new Date(e).getTime(), [e]), p = !Number.isNaN(l), x = p ? new Date(l).toISOString() : void 0, b = R(
|
|
85
|
+
() => p ? L(new Date(l), o, a) : "",
|
|
86
|
+
[l, o, a, p]
|
|
87
|
+
), { label: z, isRelative: N } = V(
|
|
88
|
+
l,
|
|
89
|
+
o,
|
|
90
|
+
p && t === "relative",
|
|
91
|
+
v,
|
|
92
|
+
b,
|
|
93
|
+
d
|
|
94
|
+
), y = f ?? (N ? b : void 0), I = [s === "chip" ? U({ size: n }) : null, s === "inline" ? "type-meta" : null, h].filter(Boolean).join(" ");
|
|
95
|
+
return /* @__PURE__ */ _(
|
|
96
|
+
"time",
|
|
97
|
+
{
|
|
98
|
+
ref: w,
|
|
99
|
+
dateTime: x,
|
|
100
|
+
title: y === "" ? void 0 : y,
|
|
101
|
+
"data-component": "timestamp",
|
|
102
|
+
className: I || void 0,
|
|
103
|
+
...r,
|
|
104
|
+
children: z
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
Y.displayName = "Timestamp";
|
|
110
|
+
export {
|
|
111
|
+
Y as T
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=timestamp-UMF1llBs.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as I, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as kt, useRef as m, useState as R, useMemo as q, useId as Nt, useCallback as B, useEffect as te, useImperativeHandle as zt, Fragment as Lt } from "react";
|
|
3
3
|
import * as K from "@radix-ui/react-dialog";
|
|
4
|
-
import { c as
|
|
4
|
+
import { c as N } from "./index-D2ZczOXr.js";
|
|
5
5
|
import { useTranslation as Ct } from "react-i18next";
|
|
6
6
|
import { u as Dt } from "./app-frame-context-CPszhDDb.js";
|
|
7
7
|
import { I as he } from "./icon-button-S8_weU3g.js";
|
|
@@ -11,11 +11,11 @@ import { S as Ze } from "./scroll-area-CY5SLYNw.js";
|
|
|
11
11
|
import { a as Bt } from "./tooltip-uEBdD1-5.js";
|
|
12
12
|
import { u as jt } from "./use-controllable-state-BiY4xTzM.js";
|
|
13
13
|
import { u as Mt } from "./use-edge-resize-CBtem0j2.js";
|
|
14
|
-
import { u as
|
|
14
|
+
import { u as k } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
15
15
|
import { a as Ft, u as Ge, R as Ot } from "./use-list-reflow-C7O4Uqnl.js";
|
|
16
16
|
import { u as qt } from "./use-prefers-reduced-motion-BMwIQRjB.js";
|
|
17
17
|
import { u as Kt } from "./use-presence-transition-cDwWUXV-.js";
|
|
18
|
-
import { u as Ht } from "./use-theme-
|
|
18
|
+
import { u as Ht } from "./use-resolved-theme-B0f1_oyq.js";
|
|
19
19
|
import { u as $t } from "./registry-DvAUVLHh.js";
|
|
20
20
|
import { X as Ut } from "./x-B5YnXwCz.js";
|
|
21
21
|
const Wt = {
|
|
@@ -100,7 +100,7 @@ const Wt = {
|
|
|
100
100
|
function en(l, a, D) {
|
|
101
101
|
return a === void 0 || !Number.isFinite(a) || a <= 0 ? !1 : l === null || !Number.isFinite(l) ? D : D ? l < a + Qt : l < a;
|
|
102
102
|
}
|
|
103
|
-
const tn =
|
|
103
|
+
const tn = N(
|
|
104
104
|
[
|
|
105
105
|
// `relative`: an overlaid panel is positioned against the rail.
|
|
106
106
|
"ds:relative ds:flex ds:shrink-0 ds:h-full",
|
|
@@ -125,14 +125,14 @@ const tn = k(
|
|
|
125
125
|
},
|
|
126
126
|
defaultVariants: { side: "end" }
|
|
127
127
|
}
|
|
128
|
-
), nn =
|
|
128
|
+
), nn = N(
|
|
129
129
|
[
|
|
130
130
|
"ds:flex ds:shrink-0 ds:flex-col ds:items-center",
|
|
131
131
|
"ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]",
|
|
132
132
|
"ds:gap-[var(--spacing-xs)]",
|
|
133
133
|
Yt
|
|
134
134
|
].join(" ")
|
|
135
|
-
), an =
|
|
135
|
+
), an = N(
|
|
136
136
|
[
|
|
137
137
|
// Positioned by the caller: `relative` docked, absolute when overlaid.
|
|
138
138
|
"ds:flex ds:min-h-0 ds:flex-col ds:h-full",
|
|
@@ -158,7 +158,7 @@ const tn = k(
|
|
|
158
158
|
},
|
|
159
159
|
defaultVariants: { side: "end" }
|
|
160
160
|
}
|
|
161
|
-
), sn =
|
|
161
|
+
), sn = N("", {
|
|
162
162
|
variants: {
|
|
163
163
|
mode: {
|
|
164
164
|
docked: "ds:relative ds:z-[1]",
|
|
@@ -191,7 +191,7 @@ const tn = k(
|
|
|
191
191
|
"ds:flex ds:flex-col",
|
|
192
192
|
"ds:bg-[var(--background)] ds:text-[color:var(--foreground)]",
|
|
193
193
|
"ds:focus-visible:outline-none"
|
|
194
|
-
].join(" "), on = "ds:relative ds:flex ds:min-h-0 ds:flex-1 ds:flex-col ds:overflow-clip", Je =
|
|
194
|
+
].join(" "), on = "ds:relative ds:flex ds:min-h-0 ds:flex-1 ds:flex-col ds:overflow-clip", Je = N(
|
|
195
195
|
[
|
|
196
196
|
"ds:flex ds:min-h-0 ds:flex-col",
|
|
197
197
|
"ds:transition-[opacity,translate] ds:duration-[var(--animation-duration)]",
|
|
@@ -246,7 +246,7 @@ function un(l) {
|
|
|
246
246
|
u.removeAttribute(v);
|
|
247
247
|
}), { nodes: Array.from(a.childNodes), scrolls: $ };
|
|
248
248
|
}
|
|
249
|
-
const fn =
|
|
249
|
+
const fn = N(
|
|
250
250
|
[
|
|
251
251
|
"ds:absolute ds:[inset-block:0] ds:z-[1] ds:select-none ds:touch-none",
|
|
252
252
|
"ds:[inline-size:var(--resizable-handle-size)] ds:cursor-col-resize",
|
|
@@ -270,7 +270,7 @@ const fn = k(
|
|
|
270
270
|
},
|
|
271
271
|
defaultVariants: { edge: "inline-start" }
|
|
272
272
|
}
|
|
273
|
-
), pn =
|
|
273
|
+
), pn = N(
|
|
274
274
|
[
|
|
275
275
|
"ds:absolute ds:-top-[var(--spacing-xs)] ds:-end-[var(--spacing-xs)]",
|
|
276
276
|
"ds:inline-flex ds:items-center ds:justify-center",
|
|
@@ -283,7 +283,7 @@ const fn = k(
|
|
|
283
283
|
"ds:pointer-events-none ds:select-none",
|
|
284
284
|
"ds:forced-colors:outline ds:forced-colors:outline-1 ds:forced-colors:outline-[CanvasText]"
|
|
285
285
|
].join(" ")
|
|
286
|
-
), Qe =
|
|
286
|
+
), Qe = N(
|
|
287
287
|
// `group/rail-tool` lets an affordance overlay (e.g. a pin star) reveal on
|
|
288
288
|
// hover / focus-within of the whole slot.
|
|
289
289
|
["ds:group/rail-tool ds:relative", "ds:rounded-[var(--radius-sm)]"],
|
|
@@ -337,10 +337,10 @@ const gn = kt(
|
|
|
337
337
|
value: D,
|
|
338
338
|
defaultValue: H,
|
|
339
339
|
onChange: $
|
|
340
|
-
}), h = ot ?? null, se = m([]),
|
|
340
|
+
}), h = ot ?? null, se = m([]), z = m(null), [ye, re] = R(0), _ = m(!1), oe = m(!1), L = q(
|
|
341
341
|
() => a.findIndex((e) => e.id === h),
|
|
342
342
|
[a, h]
|
|
343
|
-
), o =
|
|
343
|
+
), o = L >= 0 ? a[L] : null, ie = m(o);
|
|
344
344
|
o && (ie.current = o);
|
|
345
345
|
const it = q(
|
|
346
346
|
() => a.findIndex((e) => !e.disabled),
|
|
@@ -356,25 +356,25 @@ const gn = kt(
|
|
|
356
356
|
let t = e;
|
|
357
357
|
for (; t + 1 < a.length && ((n = a[t + 1]) != null && n.reorderable); ) t += 1;
|
|
358
358
|
return { first: e, last: t };
|
|
359
|
-
}, [a]), we = !!W && b !== null, dt = Nt(), [M, le] = R(null), [Ie, Y] = R(null), {
|
|
359
|
+
}, [a]), we = !!W && b !== null, dt = Nt(), [M, le] = R(null), [Ie, Y] = R(null), T = m(null), { isAccessible: ct } = Ht(T), P = ct || void 0, { containerRef: Re } = Ft({
|
|
360
360
|
key: a.map((e) => e.id).join(),
|
|
361
361
|
reduceMotion: P
|
|
362
362
|
}), de = Ge({ reduceMotion: P }), ce = Kt(
|
|
363
363
|
o !== null,
|
|
364
364
|
{ reduceMotion: P }
|
|
365
|
-
),
|
|
365
|
+
), C = o === null && ce.mounted, w = o ?? (C ? ie.current : null), { ref: Se } = ce, [ut, ft] = R(null), pt = B(
|
|
366
366
|
(e) => {
|
|
367
|
-
|
|
367
|
+
z.current = e, ft(e), Se(e);
|
|
368
368
|
},
|
|
369
369
|
[Se]
|
|
370
370
|
);
|
|
371
|
-
|
|
371
|
+
k(() => {
|
|
372
372
|
var n;
|
|
373
|
-
const e =
|
|
373
|
+
const e = z.current;
|
|
374
374
|
if (!e) return;
|
|
375
375
|
const t = document.activeElement;
|
|
376
|
-
if (
|
|
377
|
-
const s = (n = ie.current) == null ? void 0 : n.id, r =
|
|
376
|
+
if (C && t instanceof HTMLElement && e.contains(t)) {
|
|
377
|
+
const s = (n = ie.current) == null ? void 0 : n.id, r = T.current, d = (s ? r == null ? void 0 : r.querySelector(
|
|
378
378
|
`[data-tool-id="${CSS.escape(s)}"]`
|
|
379
379
|
) : null) ?? /* The tool left the strip with its panel (a host removed it as it
|
|
380
380
|
closed): the strip's tab stop, else its first enabled icon, so
|
|
@@ -387,12 +387,12 @@ const gn = kt(
|
|
|
387
387
|
t.blur(), e.setAttribute("inert", ""), d == null || d.focus();
|
|
388
388
|
return;
|
|
389
389
|
}
|
|
390
|
-
e.toggleAttribute("inert",
|
|
391
|
-
}, [
|
|
390
|
+
e.toggleAttribute("inert", C);
|
|
391
|
+
}, [C]);
|
|
392
392
|
const Ee = qt(), [Z, Te] = R(
|
|
393
393
|
(o == null ? void 0 : o.id) ?? null
|
|
394
394
|
), y = (o == null ? void 0 : o.id) ?? null, G = !P && !Ee && y !== null && Z !== null && Z !== y;
|
|
395
|
-
|
|
395
|
+
k(() => {
|
|
396
396
|
if (Z === y) return;
|
|
397
397
|
if (!G) {
|
|
398
398
|
Te(y);
|
|
@@ -462,11 +462,11 @@ const gn = kt(
|
|
|
462
462
|
},
|
|
463
463
|
[F]
|
|
464
464
|
);
|
|
465
|
-
|
|
465
|
+
k(() => {
|
|
466
466
|
var t, n;
|
|
467
467
|
if (!f.focusLost || !y) return;
|
|
468
468
|
const e = document.activeElement;
|
|
469
|
-
e && e !== document.body || (n = (t =
|
|
469
|
+
e && e !== document.body || (n = (t = T.current) == null ? void 0 : t.querySelector(
|
|
470
470
|
`[data-tool-id="${CSS.escape(y)}"]`
|
|
471
471
|
)) == null || n.focus();
|
|
472
472
|
}, [f.serial]);
|
|
@@ -511,7 +511,7 @@ const gn = kt(
|
|
|
511
511
|
}
|
|
512
512
|
},
|
|
513
513
|
[W, b, a, S, ne]
|
|
514
|
-
), _e = a[ye], O =
|
|
514
|
+
), _e = a[ye], O = L >= 0 ? L : _e && !_e.disabled ? ye : it, wt = B(
|
|
515
515
|
(e, t) => {
|
|
516
516
|
const n = a.find((s) => s.id === e);
|
|
517
517
|
!n || n.disabled || (_.current = t, g(h === e ? null : e));
|
|
@@ -531,10 +531,10 @@ const gn = kt(
|
|
|
531
531
|
(i = a[r]) != null && i.disabled || (e.preventDefault(), re(r), (x = se.current[r]) == null || x.focus());
|
|
532
532
|
},
|
|
533
533
|
[a, O]
|
|
534
|
-
),
|
|
535
|
-
J.current =
|
|
534
|
+
), p = Dt(), E = (p == null ? void 0 : p.phone) ?? !1, fe = (p == null ? void 0 : p.sharedWidth) ?? null, X = p == null ? void 0 : p.minMainWidth, [A, Pe] = R(!1), J = m(!1);
|
|
535
|
+
J.current = A;
|
|
536
536
|
const [Q, Ve] = R(null), Be = m(void 0), je = m(null);
|
|
537
|
-
|
|
537
|
+
k(() => {
|
|
538
538
|
var n;
|
|
539
539
|
const e = Be.current;
|
|
540
540
|
if (Be.current = h, !E || h === null) {
|
|
@@ -546,37 +546,37 @@ const gn = kt(
|
|
|
546
546
|
je.current = document.activeElement instanceof HTMLElement ? document.activeElement : null, Ve(h);
|
|
547
547
|
return;
|
|
548
548
|
}
|
|
549
|
-
const t = (n =
|
|
549
|
+
const t = (n = T.current) == null ? void 0 : n.contains(document.activeElement);
|
|
550
550
|
g(null), t && (p == null || p.focusMain());
|
|
551
551
|
}, [E, h, Q, g, p]);
|
|
552
552
|
const pe = E && o !== null && Q === o.id;
|
|
553
553
|
te(() => {
|
|
554
|
-
const e =
|
|
554
|
+
const e = T.current;
|
|
555
555
|
if (!e) return;
|
|
556
556
|
const t = (n) => {
|
|
557
|
-
if (n.key !== "Escape" ||
|
|
557
|
+
if (n.key !== "Escape" || L < 0 || n.target instanceof Element && n.target.closest(`[${Pt}]`))
|
|
558
558
|
return;
|
|
559
559
|
n.preventDefault();
|
|
560
|
-
const s =
|
|
560
|
+
const s = L;
|
|
561
561
|
g(null), re(s), requestAnimationFrame(() => {
|
|
562
562
|
var r;
|
|
563
563
|
(r = se.current[s]) == null || r.focus();
|
|
564
564
|
});
|
|
565
565
|
};
|
|
566
566
|
return e.addEventListener("keydown", t), () => e.removeEventListener("keydown", t);
|
|
567
|
-
}, [
|
|
568
|
-
if (!
|
|
567
|
+
}, [L, g]), te(() => {
|
|
568
|
+
if (!A || !o || E) return;
|
|
569
569
|
const e = (t) => {
|
|
570
570
|
t.key !== "Escape" || t.defaultPrevented || (t.preventDefault(), g(null));
|
|
571
571
|
};
|
|
572
572
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
573
|
-
}, [
|
|
573
|
+
}, [A, o, E, g]), k(() => {
|
|
574
574
|
var e;
|
|
575
|
-
o && _.current && ((e =
|
|
575
|
+
o && _.current && ((e = z.current) == null || e.focus()), _.current = !1;
|
|
576
576
|
}, [o]);
|
|
577
|
-
const Me = u === "end" ||
|
|
577
|
+
const Me = u === "end" || A ? "inline-start" : "inline-end", { separatorProps: Fe, isResizing: ee, isResized: Oe } = Mt({
|
|
578
578
|
edge: Me,
|
|
579
|
-
targetRef:
|
|
579
|
+
targetRef: z,
|
|
580
580
|
cssProperty: Xe,
|
|
581
581
|
minSize: Gt,
|
|
582
582
|
maxSize: Xt,
|
|
@@ -587,30 +587,30 @@ const gn = kt(
|
|
|
587
587
|
size: v ? U : void 0,
|
|
588
588
|
onResize: tt
|
|
589
589
|
}), ve = Fe["aria-valuenow"];
|
|
590
|
-
|
|
590
|
+
k(() => {
|
|
591
591
|
var e;
|
|
592
|
-
!v || !Oe || !o || (e =
|
|
592
|
+
!v || !Oe || !o || (e = z.current) == null || e.style.setProperty(
|
|
593
593
|
Xe,
|
|
594
594
|
`${ve}px`
|
|
595
595
|
);
|
|
596
596
|
}, [o, v, Oe, ve]);
|
|
597
597
|
const [Rt, St] = R(null), qe = !!p && !E && X !== void 0;
|
|
598
|
-
|
|
599
|
-
const e =
|
|
598
|
+
k(() => {
|
|
599
|
+
const e = z.current;
|
|
600
600
|
if (!e || !o || !qe || typeof ResizeObserver > "u") return;
|
|
601
601
|
const t = new ResizeObserver(() => {
|
|
602
602
|
const n = e.offsetWidth;
|
|
603
603
|
St((s) => s === n ? s : n);
|
|
604
604
|
});
|
|
605
605
|
return t.observe(e), () => t.disconnect();
|
|
606
|
-
}, [o, qe]),
|
|
606
|
+
}, [o, qe]), k(() => {
|
|
607
607
|
var r;
|
|
608
608
|
if (!p || E || X === void 0) {
|
|
609
609
|
J.current && Pe(!1);
|
|
610
610
|
return;
|
|
611
611
|
}
|
|
612
612
|
if (ee) return;
|
|
613
|
-
const e =
|
|
613
|
+
const e = z.current;
|
|
614
614
|
if (!o || !e) return;
|
|
615
615
|
const t = ((r = Re.current) == null ? void 0 : r.getBoundingClientRect().width) ?? 0, n = fe === null ? null : fe - t - e.offsetWidth, s = en(
|
|
616
616
|
n,
|
|
@@ -631,7 +631,7 @@ const gn = kt(
|
|
|
631
631
|
const me = m(h);
|
|
632
632
|
me.current = h;
|
|
633
633
|
const Ke = m("docked");
|
|
634
|
-
Ke.current = pe ? "full-screen" :
|
|
634
|
+
Ke.current = pe ? "full-screen" : A ? "overlay" : "docked";
|
|
635
635
|
const ge = q(
|
|
636
636
|
() => ({
|
|
637
637
|
getActiveToolId: () => me.current,
|
|
@@ -647,7 +647,7 @@ const gn = kt(
|
|
|
647
647
|
const e = me.current;
|
|
648
648
|
_.current = !1, g(null), e != null && requestAnimationFrame(() => {
|
|
649
649
|
var t, n;
|
|
650
|
-
(n = (t =
|
|
650
|
+
(n = (t = T.current) == null ? void 0 : t.querySelector(
|
|
651
651
|
`[data-tool-id="${CSS.escape(e)}"]`
|
|
652
652
|
)) == null || n.focus();
|
|
653
653
|
});
|
|
@@ -662,12 +662,12 @@ const gn = kt(
|
|
|
662
662
|
return /* @__PURE__ */ I(
|
|
663
663
|
"aside",
|
|
664
664
|
{
|
|
665
|
-
ref:
|
|
665
|
+
ref: T,
|
|
666
666
|
"aria-label": He,
|
|
667
667
|
"data-component": nt,
|
|
668
668
|
"data-component-id": l,
|
|
669
669
|
"data-side": u,
|
|
670
|
-
"data-panel-mode": pe ? "full-screen" :
|
|
670
|
+
"data-panel-mode": pe ? "full-screen" : A ? "overlay" : "docked",
|
|
671
671
|
className: [tn({ side: u }), st].filter(Boolean).join(" "),
|
|
672
672
|
children: [
|
|
673
673
|
we ? /* @__PURE__ */ c("span", { role: "status", "aria-live": "polite", className: "ds:sr-only", children: yt }) : null,
|
|
@@ -680,23 +680,23 @@ const gn = kt(
|
|
|
680
680
|
tool: w.label,
|
|
681
681
|
defaultValue: "{{tool}} panel"
|
|
682
682
|
}),
|
|
683
|
-
"aria-hidden":
|
|
684
|
-
"data-tool-rail-state":
|
|
683
|
+
"aria-hidden": C || void 0,
|
|
684
|
+
"data-tool-rail-state": C ? "collapsing" : "expanded",
|
|
685
685
|
"data-presence": ce.phase,
|
|
686
686
|
"data-active-tool": w.id,
|
|
687
687
|
"data-resizing": ee ? "" : void 0,
|
|
688
688
|
className: [
|
|
689
689
|
// Overlaid, it slides in from the strip on its inline end.
|
|
690
|
-
an({ side:
|
|
690
|
+
an({ side: A ? "end" : u }),
|
|
691
691
|
sn({
|
|
692
|
-
mode:
|
|
692
|
+
mode: A ? "overlay" : "docked",
|
|
693
693
|
side: u
|
|
694
694
|
}),
|
|
695
695
|
"ds:focus-visible:outline-none"
|
|
696
696
|
].filter(Boolean).join(" "),
|
|
697
697
|
children: [
|
|
698
698
|
/* @__PURE__ */ I(_t, { container: ut, children: [
|
|
699
|
-
be ? be(w, { isActive: !
|
|
699
|
+
be ? be(w, { isActive: !C }) : null,
|
|
700
700
|
/* @__PURE__ */ I("div", { ref: Ae, className: on, children: [
|
|
701
701
|
mt.map((e) => /* @__PURE__ */ c(
|
|
702
702
|
"div",
|
|
@@ -903,7 +903,7 @@ const gn = kt(
|
|
|
903
903
|
), At = e.id;
|
|
904
904
|
De(t, Tt), requestAnimationFrame(() => {
|
|
905
905
|
var We, Ye;
|
|
906
|
-
(Ye = (We =
|
|
906
|
+
(Ye = (We = T.current) == null ? void 0 : We.querySelector(
|
|
907
907
|
`[data-tool-id="${CSS.escape(At)}"]`
|
|
908
908
|
)) == null || Ye.focus();
|
|
909
909
|
});
|
|
@@ -974,4 +974,4 @@ export {
|
|
|
974
974
|
gn as T,
|
|
975
975
|
Wt as t
|
|
976
976
|
};
|
|
977
|
-
//# sourceMappingURL=tool-rail-
|
|
977
|
+
//# sourceMappingURL=tool-rail-mWmYNRCV.js.map
|