@alfadocs/ui-kit 0.8.0 → 0.9.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/{agenda-card-CalZqycc.js → agenda-card-DU13wUTA.js} +4 -4
- package/dist/_chunks/{agenda-tray-3ffFDQZC.js → agenda-tray-gQUXklO4.js} +9 -9
- package/dist/_chunks/{ai-prompt-input-DLgY8lrW.js → ai-prompt-input-bAJwYu84.js} +45 -45
- package/dist/_chunks/{alert-CVMq99Cq.js → alert-pgdXrEO5.js} +2 -2
- package/dist/_chunks/{app-frame-CDJOgPXe.js → app-frame-BYx1gcV7.js} +2 -2
- package/dist/_chunks/{audio-recorder-cOl_Z_Pk.js → audio-recorder-BHBonrFf.js} +54 -54
- package/dist/_chunks/{audio-visualiser-ByDEFLNm.js → audio-visualiser-I-T4Z7EU.js} +2 -2
- package/dist/_chunks/{autocomplete-D4oUZbsP.js → autocomplete-C34hbfKh.js} +6 -6
- package/dist/_chunks/{avatar-Dcr6XuDQ.js → avatar-I10iCDs8.js} +2 -2
- package/dist/_chunks/{badge-DKFbntoa.js → badge-cLYVGlMh.js} +2 -2
- package/dist/_chunks/{balance-cell-renderer-BuExGe6u.js → balance-cell-renderer-DWWtX-VM.js} +5 -5
- package/dist/_chunks/{breadcrumb-D1snXjPb.js → breadcrumb--YI7lcHA.js} +4 -4
- package/dist/_chunks/{button-group-CONver7M.js → button-group-Bh2g_Ng-.js} +2 -2
- package/dist/_chunks/{chat-container-ClzsWXp2.js → chat-container-izziXViv.js} +4 -4
- package/dist/_chunks/{chat-message-DoAhgUTj.js → chat-message-g3lxpXM_.js} +2 -2
- package/dist/_chunks/{checkbox-group-CarPLDIC.js → checkbox-group-Qkm3Rg1S.js} +6 -6
- package/dist/_chunks/{color-picker-CTIcHlDF.js → color-picker-BPfcByHH.js} +13 -13
- package/dist/_chunks/{combobox-BLWruOxK.js → combobox-DUpWoPPk.js} +6 -6
- package/dist/_chunks/{contact-card-DNyATxKv.js → contact-card-VJIUqKB2.js} +13 -13
- package/dist/_chunks/{date-picker-B1PO1ZQP.js → date-picker-BD5FYW08.js} +3 -3
- package/dist/_chunks/{date-range-picker-mix2nEVC.js → date-range-picker-BZLVgcXE.js} +27 -27
- package/dist/_chunks/{date-time-picker-Dnong_BY.js → date-time-picker-CCoRWX7R.js} +5 -5
- package/dist/_chunks/{description-list-BYA77Yud.js → description-list-y7Hk51KI.js} +16 -16
- package/dist/_chunks/{dialog-W8uDfXD8.js → dialog-DRp6Dejy.js} +2 -2
- package/dist/_chunks/{file-upload-C947ACDK.js → file-upload-BVbfiANR.js} +81 -81
- package/dist/_chunks/{floating-action-button-C8OYj8mE.js → floating-action-button-pojvb9gG.js} +6 -6
- package/dist/_chunks/{form-field-Bmkeh7WY.js → form-field-BOm9hK35.js} +2 -2
- package/dist/_chunks/{freemium-paywall-B9kIDtm1.js → freemium-paywall-BTEiVkes.js} +29 -29
- package/dist/_chunks/{key-value-pair-CgWvAIGb.js → key-value-pair-AbrRwesr.js} +14 -14
- package/dist/_chunks/{leo-sidebar-BWECDYpu.js → leo-sidebar-B054wsZm.js} +8 -8
- package/dist/_chunks/{link-BcYW1eNM.js → link-BGpwaFik.js} +2 -2
- package/dist/_chunks/{list-qP6p0NTw.js → list-DcjV0m5B.js} +2 -2
- package/dist/_chunks/{message-card-DjvsB_3U.js → message-card-c6R0-qXq.js} +6 -6
- package/dist/_chunks/{message-tray-BbnAzlLH.js → message-tray-Fsend-du.js} +21 -21
- package/dist/_chunks/{multi-select-wqqrgjUQ.js → multi-select-Bh-xR8kP.js} +10 -10
- package/dist/_chunks/{navigation-menu-ClbHeawy.js → navigation-menu-Bav1d_wA.js} +2 -2
- package/dist/_chunks/{notification-card-uTPEvAQS.js → notification-card-CRIE2Cuk.js} +3 -3
- package/dist/_chunks/{notification-tray-PGtMqXbP.js → notification-tray-CfXNYrxv.js} +21 -21
- package/dist/_chunks/{number-input-Q7wkHnvQ.js → number-input-mpSLk-ld.js} +3 -3
- package/dist/_chunks/{otp-input-C9gUByF0.js → otp-input-CI-Zv5q6.js} +2 -2
- package/dist/_chunks/{pagination-3AC4zTsi.js → pagination-OQBlnb1H.js} +7 -7
- package/dist/_chunks/{patient-shell-IhMULVrt.js → patient-shell-BS2V6V1b.js} +3 -3
- package/dist/_chunks/{payment-form-C3HMAsGG.js → payment-form-CI77oIx1.js} +3 -3
- package/dist/_chunks/{pdf-viewer-DO95bm2o.js → pdf-viewer-CNETPubN.js} +3 -3
- package/dist/_chunks/{phone-input-CSHJOJ13.js → phone-input-DtBVs5fz.js} +7 -7
- package/dist/_chunks/{popover-DekUKNBk.js → popover--derJ_wq.js} +2 -2
- package/dist/_chunks/{progress-C11tqhoI.js → progress-B-PSO5OS.js} +4 -4
- package/dist/_chunks/{recaptcha-widget-NyfOfLII.js → recaptcha-widget-Kp1XntuE.js} +3 -3
- package/dist/_chunks/{resizable-mpXXyIsN.js → resizable-COV-cnth.js} +3 -3
- package/dist/_chunks/{search-bar-BTDfgYtg.js → search-bar-DmZZ9UvV.js} +2 -2
- package/dist/_chunks/{search-input-CdJIEjFo.js → search-input-BBtSRH-Q.js} +4 -4
- package/dist/_chunks/{select-BOU_Osnf.js → select-i9MwQeQy.js} +20 -20
- package/dist/_chunks/{sheet-BAg7GY9j.js → sheet-BT0izeoI.js} +9 -9
- package/dist/_chunks/{sidebar-Bx3wCDyy.js → sidebar-CoLHtVrP.js} +83 -83
- package/dist/_chunks/{sign-in-with-alfadocs-button-B9UrqOqH.js → sign-in-with-alfadocs-button-4zZC-I6y.js} +3 -3
- package/dist/_chunks/{skip-link-DmZ3c6cb.js → skip-link-BaSMtPwB.js} +2 -2
- package/dist/_chunks/{slider-BT2bZWsy.js → slider-CkR6CLun.js} +3 -3
- package/dist/_chunks/{sparkline-_gy8aJDG.js → sparkline-D4Np8ikf.js} +15 -15
- package/dist/_chunks/{spinner-DLaYfLPl.js → spinner-DirtWZNG.js} +2 -2
- package/dist/_chunks/{stat-B9PHSPbN.js → stat-CDQ_a0vk.js} +4 -4
- package/dist/_chunks/{switch-C0psfIQF.js → switch-D916VW86.js} +2 -2
- package/dist/_chunks/{tabs-BZQy_Rmb.js → tabs-Cg794H0Q.js} +3 -3
- package/dist/_chunks/{tag-DuLMjRbF.js → tag-CQmHRM4Y.js} +3 -3
- package/dist/_chunks/{task-card-Dw_ZJDL8.js → task-card-BUVMh6HN.js} +2 -2
- package/dist/_chunks/{task-tray-XlIW9ueh.js → task-tray-B3A2fRGR.js} +13 -13
- package/dist/_chunks/{text-area-CO9Dz0qX.js → text-area-DHtcpcLv.js} +13 -13
- package/dist/_chunks/{text-input-DZwt9L8H.js → text-input-1oqFRbVI.js} +2 -2
- package/dist/_chunks/{theme-toggle-B3UR6ouK.js → theme-toggle-B3meAb3y.js} +14 -14
- package/dist/_chunks/{time-picker-DvPUmHH-.js → time-picker-DeVZkIY2.js} +2 -2
- package/dist/_chunks/{timeline-BvmnQadS.js → timeline-BaSULpSJ.js} +2 -2
- package/dist/_chunks/{toast.agent-DihA6MON.js → toast.agent-32WNQ-_x.js} +2 -2
- package/dist/_chunks/{transaction-chip-DE6DITun.js → transaction-chip-eVbolm0B.js} +2 -2
- package/dist/_chunks/{transcript-panel-Bx5ANMsv.js → transcript-panel-BpJqPr7I.js} +8 -8
- package/dist/_chunks/{typing-indicator-BZ5jXZPn.js → typing-indicator-DHeVN4ob.js} +9 -9
- package/dist/_chunks/{use-password-requirements-DgEYdN4H.js → use-password-requirements-B1M8lE2t.js} +29 -32
- package/dist/_chunks/{warning-stack-CdLIe534.js → warning-stack-CeRihME9.js} +15 -15
- package/dist/_chunks/{workflow-map-CESZNNZe.js → workflow-map-D3MvrsZV.js} +4 -4
- package/dist/agent-catalog.json +1 -1
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/alert/index.js +1 -1
- package/dist/components/app-frame/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/audio-visualiser/index.js +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/badge/index.js +1 -1
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/button-group/index.js +1 -1
- package/dist/components/chat-container/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/contact-card/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/file-upload/index.js +1 -1
- package/dist/components/floating-action-button/index.js +1 -1
- package/dist/components/form-field/index.js +1 -1
- package/dist/components/freemium-paywall/freemium-paywall.d.ts +2 -2
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/link/index.js +1 -1
- package/dist/components/list/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/multi-select/index.js +1 -1
- package/dist/components/navigation-menu/index.js +2 -2
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/number-input/index.js +1 -1
- package/dist/components/otp-input/index.js +1 -1
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/password-input/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/progress/index.js +1 -1
- package/dist/components/recaptcha-widget/index.js +1 -1
- package/dist/components/resizable/index.js +1 -1
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-input/index.js +1 -1
- package/dist/components/select/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sidebar/sidebar.d.ts +1 -1
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/skip-link/index.js +1 -1
- package/dist/components/skip-link/skip-link.d.ts +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/spinner/index.js +1 -1
- package/dist/components/stat/index.js +1 -1
- package/dist/components/switch/index.js +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tag/index.js +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/text-area/index.js +1 -1
- package/dist/components/text-input/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/time-picker/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/typing-indicator/index.js +1 -1
- package/dist/components/typing-indicator/typing-indicator.d.ts +1 -1
- package/dist/components/warning-stack/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/config.d.ts +2 -1
- package/dist/i18n/config.js +49 -31
- package/dist/i18n/registerUiBundle.d.ts +15 -0
- package/dist/index.js +77 -77
- package/dist/patterns/leo-assistant/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +4 -3
|
@@ -2,8 +2,8 @@ import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as v } from "react";
|
|
3
3
|
import { c as h } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as b } from "react-i18next";
|
|
5
|
-
import { A as x } from "./avatar-
|
|
6
|
-
import { B as y } from "./badge-
|
|
5
|
+
import { A as x } from "./avatar-I10iCDs8.js";
|
|
6
|
+
import { B as y } from "./badge-cLYVGlMh.js";
|
|
7
7
|
import { C as N } from "./chevron-right-BrpYejk0.js";
|
|
8
8
|
const C = h(
|
|
9
9
|
[
|
|
@@ -49,7 +49,7 @@ const k = {
|
|
|
49
49
|
cancelled: "error"
|
|
50
50
|
}, T = v(
|
|
51
51
|
({ item: s, size: o = "sm", onActivate: a, className: f, ...m }, p) => {
|
|
52
|
-
const { t: i } = b(), r = !!a, g = !!s.url && w(s.url), l = i("
|
|
52
|
+
const { t: i } = b(), r = !!a, g = !!s.url && w(s.url), l = i("agendaCard.itemLabel", {
|
|
53
53
|
time: s.time,
|
|
54
54
|
patient: s.patient.name,
|
|
55
55
|
treatment: s.treatment ?? "",
|
|
@@ -138,4 +138,4 @@ export {
|
|
|
138
138
|
T as A,
|
|
139
139
|
w as i
|
|
140
140
|
};
|
|
141
|
-
//# sourceMappingURL=agenda-card-
|
|
141
|
+
//# sourceMappingURL=agenda-card-DU13wUTA.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as a, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as R, useRef as
|
|
2
|
+
import { forwardRef as R, useRef as f, useImperativeHandle as z, useMemo as C } from "react";
|
|
3
3
|
import { c as S } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as j } from "react-i18next";
|
|
5
5
|
import { I as _ } from "./icon-button-C4CGcYuz.js";
|
|
6
6
|
import { S as E } from "./skeleton-CZbwyJAA.js";
|
|
7
7
|
import { E as P } from "./empty-state-3CLJIXSj.js";
|
|
8
|
-
import { A as H } from "./agenda-card-
|
|
8
|
+
import { A as H } from "./agenda-card-DU13wUTA.js";
|
|
9
9
|
import { u as K } from "./registry-C9nwlNyL.js";
|
|
10
10
|
import { c as L } from "./createLucideIcon-CrFbzy84.js";
|
|
11
11
|
import { P as V } from "./plus-CYKNmfuA.js";
|
|
@@ -86,7 +86,7 @@ const q = [
|
|
|
86
86
|
({
|
|
87
87
|
id: t,
|
|
88
88
|
items: s,
|
|
89
|
-
title:
|
|
89
|
+
title: u,
|
|
90
90
|
caption: c,
|
|
91
91
|
size: l = "sm",
|
|
92
92
|
onOpenAppointment: d,
|
|
@@ -98,16 +98,16 @@ const q = [
|
|
|
98
98
|
className: T,
|
|
99
99
|
...w
|
|
100
100
|
}, N) => {
|
|
101
|
-
const { t: r } = j(), y =
|
|
101
|
+
const { t: r } = j(), y = u ?? r("agendaTray.title", "Today's appointments"), b = v ?? r("agendaTray.add", "Add appointment"), I = !p && s.length === 0;
|
|
102
102
|
let i;
|
|
103
103
|
p ? i = /* @__PURE__ */ a("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)]", children: [0, 1, 2].map((e) => /* @__PURE__ */ a(E, { variant: "rectangular", height: "2.5rem" }, e)) }) : I ? i = /* @__PURE__ */ a("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ a(
|
|
104
104
|
P,
|
|
105
105
|
{
|
|
106
106
|
variant: "first-use",
|
|
107
107
|
size: "sm",
|
|
108
|
-
title: x ?? r("
|
|
108
|
+
title: x ?? r("agendaTray.empty.title", "No appointments"),
|
|
109
109
|
description: k ?? r(
|
|
110
|
-
"
|
|
110
|
+
"agendaTray.empty.description",
|
|
111
111
|
"New appointments will appear here."
|
|
112
112
|
)
|
|
113
113
|
}
|
|
@@ -121,9 +121,9 @@ const q = [
|
|
|
121
121
|
},
|
|
122
122
|
e.id
|
|
123
123
|
)) });
|
|
124
|
-
const o =
|
|
124
|
+
const o = f(s);
|
|
125
125
|
o.current = s;
|
|
126
|
-
const g =
|
|
126
|
+
const g = f(null);
|
|
127
127
|
z(N, () => g.current, []);
|
|
128
128
|
const M = C(
|
|
129
129
|
() => ({
|
|
@@ -178,4 +178,4 @@ export {
|
|
|
178
178
|
G as A,
|
|
179
179
|
D as a
|
|
180
180
|
};
|
|
181
|
-
//# sourceMappingURL=agenda-tray-
|
|
181
|
+
//# sourceMappingURL=agenda-tray-gQUXklO4.js.map
|
|
@@ -5,8 +5,8 @@ import { useTranslation as re } from "react-i18next";
|
|
|
5
5
|
import { u as Ae } from "./registry-C9nwlNyL.js";
|
|
6
6
|
import { _ as b } from "./index-4xgbg-sn.js";
|
|
7
7
|
import { u as Ce } from "./index-CeY1nNvd.js";
|
|
8
|
-
import { I as
|
|
9
|
-
import { S as Le } from "./select-
|
|
8
|
+
import { I as ne } from "./icon-button-C4CGcYuz.js";
|
|
9
|
+
import { S as Le } from "./select-i9MwQeQy.js";
|
|
10
10
|
import { S as Re } from "./send-CySZIRPJ.js";
|
|
11
11
|
import { X as Ue } from "./x-CCcI3eJp.js";
|
|
12
12
|
const We = {
|
|
@@ -105,7 +105,7 @@ const We = {
|
|
|
105
105
|
modelId: U,
|
|
106
106
|
onModelChange: F,
|
|
107
107
|
maxSize: x,
|
|
108
|
-
accept:
|
|
108
|
+
accept: ie,
|
|
109
109
|
context: B,
|
|
110
110
|
onContextDismiss: y,
|
|
111
111
|
onSubmit: I,
|
|
@@ -132,19 +132,19 @@ const We = {
|
|
|
132
132
|
w.current = e;
|
|
133
133
|
}, []), c = Z !== void 0, [ve, f] = h(
|
|
134
134
|
String(Q ?? "")
|
|
135
|
-
),
|
|
135
|
+
), i = c ? String(Z) : ve, [u, z] = h([]), [v, P] = h(!1), [ge, M] = h(""), [he, be] = h(
|
|
136
136
|
E ?? ((se = d == null ? void 0 : d[0]) == null ? void 0 : se.id) ?? ""
|
|
137
137
|
), X = U !== void 0, L = X ? U : he, Y = g(() => {
|
|
138
138
|
const e = w.current;
|
|
139
139
|
if (!e) return;
|
|
140
|
-
const t = window.getComputedStyle(e),
|
|
140
|
+
const t = window.getComputedStyle(e), n = parseFloat(t.lineHeight) || 24, r = parseFloat(t.paddingTop) || 0, p = parseFloat(t.paddingBottom) || 0, l = parseFloat(t.borderTopWidth) || 0, R = parseFloat(t.borderBottomWidth) || 0, K = r + p + l + R, Ee = n * $ + K, ae = n * W + K;
|
|
141
141
|
e.style.height = "auto";
|
|
142
142
|
const Fe = Math.max(Ee, Math.min(e.scrollHeight, ae));
|
|
143
143
|
e.style.height = `${Fe}px`, e.style.overflowY = e.scrollHeight > ae ? "auto" : "hidden";
|
|
144
144
|
}, [$, W]);
|
|
145
145
|
Oe(() => {
|
|
146
146
|
Y();
|
|
147
|
-
}, [Y,
|
|
147
|
+
}, [Y, i]);
|
|
148
148
|
const xe = g((e, t) => {
|
|
149
149
|
const r = e.slice(0, t).lastIndexOf(`
|
|
150
150
|
`) + 1, p = e.slice(r, t);
|
|
@@ -166,21 +166,21 @@ const We = {
|
|
|
166
166
|
}, ke = (e) => {
|
|
167
167
|
S.current = !1, _ == null || _(e);
|
|
168
168
|
}, Ne = (e) => e.nativeEvent.isComposing || e.keyCode === 229 || S.current, V = g(() => {
|
|
169
|
-
if (!
|
|
170
|
-
let t,
|
|
171
|
-
const r =
|
|
172
|
-
r && (t = r[1],
|
|
173
|
-
text:
|
|
169
|
+
if (!i.trim() && u.length === 0) return;
|
|
170
|
+
let t, n = i;
|
|
171
|
+
const r = i.match(/^\/(\S+)\s?/);
|
|
172
|
+
r && (t = r[1], n = i.slice(r[0].length)), I == null || I({
|
|
173
|
+
text: n,
|
|
174
174
|
command: t,
|
|
175
175
|
attachments: u,
|
|
176
176
|
modelId: L || void 0
|
|
177
177
|
}), c || f(""), z([]);
|
|
178
|
-
}, [
|
|
178
|
+
}, [i, u, I, L, c]), G = T(null);
|
|
179
179
|
je(pe, () => G.current, []);
|
|
180
180
|
const we = De(
|
|
181
181
|
() => ({
|
|
182
|
-
getValue: () =>
|
|
183
|
-
isEmpty: () => !
|
|
182
|
+
getValue: () => i,
|
|
183
|
+
isEmpty: () => !i.trim() && u.length === 0,
|
|
184
184
|
isSubmitting: () => !1,
|
|
185
185
|
setValue: (e) => {
|
|
186
186
|
c || f(e);
|
|
@@ -196,7 +196,7 @@ const We = {
|
|
|
196
196
|
(e = w.current) == null || e.focus();
|
|
197
197
|
}
|
|
198
198
|
}),
|
|
199
|
-
[
|
|
199
|
+
[i, u, c, V]
|
|
200
200
|
);
|
|
201
201
|
Ae(We, we, C);
|
|
202
202
|
const Se = (e) => {
|
|
@@ -210,39 +210,39 @@ const We = {
|
|
|
210
210
|
}, ze = (e) => {
|
|
211
211
|
const t = w.current;
|
|
212
212
|
if (!t) return;
|
|
213
|
-
const
|
|
213
|
+
const n = t.selectionStart ?? i.length, p = i.slice(0, n).lastIndexOf(`
|
|
214
214
|
`) + 1;
|
|
215
|
-
let l =
|
|
216
|
-
for (; l <
|
|
215
|
+
let l = n;
|
|
216
|
+
for (; l < i.length && !/\s/.test(i[l]); )
|
|
217
217
|
l += 1;
|
|
218
|
-
const R =
|
|
218
|
+
const R = i.slice(l), K = i.slice(0, p) + `/${e.id} ` + R;
|
|
219
219
|
c || f(K), P(!1), M(""), queueMicrotask(() => t.focus());
|
|
220
220
|
}, Pe = (e) => {
|
|
221
221
|
if (A == null || A(e), e.defaultPrevented) return;
|
|
222
222
|
const { clipboardData: t } = e;
|
|
223
223
|
if (!t) return;
|
|
224
|
-
const
|
|
224
|
+
const n = [];
|
|
225
225
|
for (let r = 0; r < t.items.length; r += 1) {
|
|
226
226
|
const p = t.items[r];
|
|
227
227
|
if (p.kind === "file") {
|
|
228
228
|
const l = p.getAsFile();
|
|
229
|
-
l &&
|
|
229
|
+
l && n.push(l);
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
|
-
|
|
232
|
+
n.length > 0 && (e.preventDefault(), J(n));
|
|
233
233
|
}, J = g(
|
|
234
234
|
(e) => {
|
|
235
|
-
var
|
|
235
|
+
var n;
|
|
236
236
|
const t = [];
|
|
237
237
|
for (const r of e) {
|
|
238
238
|
if (typeof x == "number" && r.size > x) {
|
|
239
239
|
N == null || N(
|
|
240
|
-
o("
|
|
240
|
+
o("chat.attachment.rejected", { reason: "size" })
|
|
241
241
|
);
|
|
242
242
|
continue;
|
|
243
243
|
}
|
|
244
244
|
t.push({
|
|
245
|
-
id: ((
|
|
245
|
+
id: ((n = crypto.randomUUID) == null ? void 0 : n.call(crypto)) ?? `att-${Math.random()}`,
|
|
246
246
|
file: r
|
|
247
247
|
});
|
|
248
248
|
}
|
|
@@ -252,11 +252,11 @@ const We = {
|
|
|
252
252
|
), { getRootProps: Me, getInputProps: Ve, isDragActive: He } = Ce({
|
|
253
253
|
onDrop: J,
|
|
254
254
|
maxSize: x,
|
|
255
|
-
accept:
|
|
255
|
+
accept: ie,
|
|
256
256
|
noClick: !0,
|
|
257
257
|
noKeyboard: !0
|
|
258
258
|
}), Ke = (e) => {
|
|
259
|
-
z((t) => t.filter((
|
|
259
|
+
z((t) => t.filter((n) => n.id !== e));
|
|
260
260
|
}, H = C ?? ue, ee = `${H}-label`, te = `${H}-slash-list`, Te = (d == null ? void 0 : d.map((e) => ({ value: e.id, label: e.label }))) ?? [];
|
|
261
261
|
return /* @__PURE__ */ m(
|
|
262
262
|
"div",
|
|
@@ -268,16 +268,16 @@ const We = {
|
|
|
268
268
|
He ? "ds:outline ds:outline-dashed ds:outline-[color:var(--primary)] ds:outline-offset-2 ds:bg-[color:var(--primary)]/5" : ""
|
|
269
269
|
].join(" ")
|
|
270
270
|
}),
|
|
271
|
-
"aria-label": o("
|
|
271
|
+
"aria-label": o("chat.attachmentZone"),
|
|
272
272
|
"data-component": "ai-prompt-input",
|
|
273
273
|
"data-component-id": C,
|
|
274
274
|
children: [
|
|
275
|
-
/* @__PURE__ */ a("input", { "aria-label": o("
|
|
275
|
+
/* @__PURE__ */ a("input", { "aria-label": o("chat.attachmentZone"), ...Ve() }),
|
|
276
276
|
B ? /* @__PURE__ */ a("div", { className: "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)]", children: /* @__PURE__ */ a(
|
|
277
277
|
"button",
|
|
278
278
|
{
|
|
279
279
|
type: "button",
|
|
280
|
-
"aria-label": o("
|
|
280
|
+
"aria-label": o("chat.contextActive", { name: B }),
|
|
281
281
|
onClick: y,
|
|
282
282
|
onKeyDown: (e) => {
|
|
283
283
|
(e.key === "Backspace" || e.key === "Delete") && (e.preventDefault(), y == null || y());
|
|
@@ -292,10 +292,10 @@ const We = {
|
|
|
292
292
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)]",
|
|
293
293
|
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
294
294
|
].join(" "),
|
|
295
|
-
children: o("
|
|
295
|
+
children: o("chat.contextActive", { name: B })
|
|
296
296
|
}
|
|
297
297
|
) }) : null,
|
|
298
|
-
/* @__PURE__ */ a("label", { id: ee, htmlFor: H, className: "ds:sr-only", children: o("
|
|
298
|
+
/* @__PURE__ */ a("label", { id: ee, htmlFor: H, className: "ds:sr-only", children: o("chat.prompt") }),
|
|
299
299
|
/* @__PURE__ */ m("div", { className: "ds:relative", children: [
|
|
300
300
|
/* @__PURE__ */ a(
|
|
301
301
|
"textarea",
|
|
@@ -303,10 +303,10 @@ const We = {
|
|
|
303
303
|
ref: fe,
|
|
304
304
|
id: H,
|
|
305
305
|
rows: $,
|
|
306
|
-
value: c ?
|
|
306
|
+
value: c ? i : void 0,
|
|
307
307
|
defaultValue: c ? void 0 : Q,
|
|
308
308
|
disabled: q,
|
|
309
|
-
placeholder: le ?? o("
|
|
309
|
+
placeholder: le ?? o("chat.input.placeholder"),
|
|
310
310
|
"aria-labelledby": ee,
|
|
311
311
|
role: v ? "combobox" : void 0,
|
|
312
312
|
"aria-controls": v ? te : void 0,
|
|
@@ -343,7 +343,7 @@ const We = {
|
|
|
343
343
|
"ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]"
|
|
344
344
|
].join(" "),
|
|
345
345
|
id: te,
|
|
346
|
-
children: /* @__PURE__ */ m(b, { label: o("
|
|
346
|
+
children: /* @__PURE__ */ m(b, { label: o("chat.slashMenu.label"), loop: !0, children: [
|
|
347
347
|
/* @__PURE__ */ a(
|
|
348
348
|
b.Input,
|
|
349
349
|
{
|
|
@@ -353,7 +353,7 @@ const We = {
|
|
|
353
353
|
}
|
|
354
354
|
),
|
|
355
355
|
/* @__PURE__ */ m(b.List, { className: "ds:max-h-60 ds:overflow-y-auto ds:pt-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]", children: [
|
|
356
|
-
/* @__PURE__ */ a(b.Empty, { className: "type-body-sm ds:text-[color:var(--muted-foreground)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]", children: o("
|
|
356
|
+
/* @__PURE__ */ a(b.Empty, { className: "type-body-sm ds:text-[color:var(--muted-foreground)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]", children: o("chat.slashMenu.empty") }),
|
|
357
357
|
s.map((e) => /* @__PURE__ */ m(
|
|
358
358
|
b.Item,
|
|
359
359
|
{
|
|
@@ -386,7 +386,7 @@ const We = {
|
|
|
386
386
|
"div",
|
|
387
387
|
{
|
|
388
388
|
role: "group",
|
|
389
|
-
"aria-label": o("
|
|
389
|
+
"aria-label": o("chat.attachmentZone"),
|
|
390
390
|
className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
|
|
391
391
|
children: u.map((e) => /* @__PURE__ */ a(
|
|
392
392
|
Xe,
|
|
@@ -402,7 +402,7 @@ const We = {
|
|
|
402
402
|
d && d.length > 0 ? /* @__PURE__ */ a("div", { className: "ds:me-auto ds:min-w-[140px]", children: /* @__PURE__ */ a(
|
|
403
403
|
Le,
|
|
404
404
|
{
|
|
405
|
-
"aria-label": o("
|
|
405
|
+
"aria-label": o("chat.model.select"),
|
|
406
406
|
options: Te,
|
|
407
407
|
value: L || "",
|
|
408
408
|
onValueChange: (e) => {
|
|
@@ -411,15 +411,15 @@ const We = {
|
|
|
411
411
|
size: "sm"
|
|
412
412
|
}
|
|
413
413
|
) }) : /* @__PURE__ */ a("div", { className: "ds:me-auto" }),
|
|
414
|
-
/* @__PURE__ */ a("span", { className: "ds:sr-only", children: o("
|
|
414
|
+
/* @__PURE__ */ a("span", { className: "ds:sr-only", children: o("chat.input.sendHint") }),
|
|
415
415
|
/* @__PURE__ */ a(
|
|
416
|
-
|
|
416
|
+
ne,
|
|
417
417
|
{
|
|
418
418
|
icon: /* @__PURE__ */ a(Re, {}),
|
|
419
|
-
"aria-label": o("
|
|
419
|
+
"aria-label": o("chat.send"),
|
|
420
420
|
intent: "primary",
|
|
421
421
|
size: "sm",
|
|
422
|
-
disabled: q || !
|
|
422
|
+
disabled: q || !i.trim() && u.length === 0,
|
|
423
423
|
onClick: V,
|
|
424
424
|
"aria-keyshortcuts": "Meta+Enter Control+Enter"
|
|
425
425
|
}
|
|
@@ -456,10 +456,10 @@ function Xe({
|
|
|
456
456
|
/* @__PURE__ */ a("span", { className: "ds:truncate ds:max-w-[16ch]", children: s.name }),
|
|
457
457
|
/* @__PURE__ */ a("span", { className: "ds:text-[color:var(--muted-foreground)] ds:tabular-nums", children: qe(s.size) }),
|
|
458
458
|
/* @__PURE__ */ a(
|
|
459
|
-
|
|
459
|
+
ne,
|
|
460
460
|
{
|
|
461
461
|
icon: /* @__PURE__ */ a(Ue, {}),
|
|
462
|
-
"aria-label": E("
|
|
462
|
+
"aria-label": E("chat.attachment.remove", { name: s.name }),
|
|
463
463
|
intent: "ghost",
|
|
464
464
|
size: "sm",
|
|
465
465
|
onClick: d
|
|
@@ -473,4 +473,4 @@ export {
|
|
|
473
473
|
Qe as A,
|
|
474
474
|
We as a
|
|
475
475
|
};
|
|
476
|
-
//# sourceMappingURL=ai-prompt-input-
|
|
476
|
+
//# sourceMappingURL=ai-prompt-input-bAJwYu84.js.map
|
|
@@ -188,7 +188,7 @@ const N = i(
|
|
|
188
188
|
"button",
|
|
189
189
|
{
|
|
190
190
|
type: "button",
|
|
191
|
-
"aria-label": I("
|
|
191
|
+
"aria-label": I("common.close", "Close"),
|
|
192
192
|
onClick: B,
|
|
193
193
|
className: q,
|
|
194
194
|
children: /* @__PURE__ */ t(X, { "aria-hidden": "true", className: "ds:size-4" })
|
|
@@ -208,4 +208,4 @@ const at = Object.assign(N, {
|
|
|
208
208
|
export {
|
|
209
209
|
at as A
|
|
210
210
|
};
|
|
211
|
-
//# sourceMappingURL=alert-
|
|
211
|
+
//# sourceMappingURL=alert-pgdXrEO5.js.map
|
|
@@ -72,7 +72,7 @@ const T = a(
|
|
|
72
72
|
mainClassName: b,
|
|
73
73
|
...u
|
|
74
74
|
}, h) => {
|
|
75
|
-
const { t: v } = _(), x = m ?? v("
|
|
75
|
+
const { t: v } = _(), x = m ?? v("navigation.main.label", "Main content"), [w, g] = S(!1), j = V((k) => {
|
|
76
76
|
const e = k.currentTarget.scrollTop > 0;
|
|
77
77
|
g((o) => o === e ? o : e);
|
|
78
78
|
}, []);
|
|
@@ -118,4 +118,4 @@ I.displayName = "AppFrame";
|
|
|
118
118
|
export {
|
|
119
119
|
I as A
|
|
120
120
|
};
|
|
121
|
-
//# sourceMappingURL=app-frame-
|
|
121
|
+
//# sourceMappingURL=app-frame-BYx1gcV7.js.map
|