@alfadocs/ui-kit 1.147.0 → 1.147.2

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 (86) hide show
  1. package/dist/_chunks/{appointment-details-panel.history-eqPMKmW0.js → appointment-details-panel.history-BxNqcA-r.js} +109 -110
  2. package/dist/_chunks/{calendar-appointment-editor-dialog-sY-k0GGW.js → calendar-appointment-editor-dialog-CoIFwj9g.js} +4 -4
  3. package/dist/_chunks/{calendar-waiting-list-panel-Bm7NAZdk.js → calendar-waiting-list-panel-DuALuqLD.js} +2 -2
  4. package/dist/_chunks/{calendar.sheets-CCvdZF-R.js → calendar.sheets-CueyPkTT.js} +3 -3
  5. package/dist/_chunks/editable-description-BsSjLnSx.js +193 -0
  6. package/dist/_chunks/{editable-description.agent-Bm_LBV2j.js → editable-description.agent-zyyR_hxB.js} +2 -2
  7. package/dist/_chunks/{notes-panel-C9aB1Cma.js → notes-panel-BHMnLbEH.js} +2 -2
  8. package/dist/_chunks/registry-connection-panel-ACOsXu3F.js +529 -0
  9. package/dist/_chunks/{rich-text-editor-CJXc5GgH.js → rich-text-editor-BAcJq1PO.js} +445 -437
  10. package/dist/_chunks/{use-appointment-details-read-Dod21IxM.js → use-appointment-details-read-CC74Y-r5.js} +417 -422
  11. package/dist/agent-catalog.json +5 -5
  12. package/dist/agent-i18n/en.json +2 -2
  13. package/dist/appointment-editor-panel/index.js +1 -1
  14. package/dist/browser-support.js +1 -1
  15. package/dist/components/appointment-details-panel/appointment-details-panel.history.d.ts +4 -6
  16. package/dist/components/appointment-details-panel/index.js +1 -1
  17. package/dist/components/editable-description/editable-description.d.ts +2 -1
  18. package/dist/components/editable-description/index.js +2 -2
  19. package/dist/components/notes-panel/index.js +1 -1
  20. package/dist/components/registry-connection-panel/index.js +1 -1
  21. package/dist/components/registry-connection-panel/registry-connection-panel.d.ts +14 -0
  22. package/dist/components/rich-text-editor/index.js +1 -1
  23. package/dist/core.css +1 -1
  24. package/dist/find-free-slots-panel/index.js +1 -1
  25. package/dist/i18n/locales/ar.d.ts +0 -1
  26. package/dist/i18n/locales/ar.js +1 -2
  27. package/dist/i18n/locales/de.d.ts +0 -1
  28. package/dist/i18n/locales/de.js +1 -2
  29. package/dist/i18n/locales/el.d.ts +0 -1
  30. package/dist/i18n/locales/el.js +1 -2
  31. package/dist/i18n/locales/en.d.ts +0 -1
  32. package/dist/i18n/locales/en.js +1 -2
  33. package/dist/i18n/locales/es.d.ts +0 -1
  34. package/dist/i18n/locales/es.js +1 -2
  35. package/dist/i18n/locales/fr.d.ts +0 -1
  36. package/dist/i18n/locales/fr.js +1 -2
  37. package/dist/i18n/locales/hi.d.ts +0 -1
  38. package/dist/i18n/locales/hi.js +1 -2
  39. package/dist/i18n/locales/it.d.ts +0 -1
  40. package/dist/i18n/locales/it.js +1 -2
  41. package/dist/i18n/locales/ja.d.ts +0 -1
  42. package/dist/i18n/locales/ja.js +1 -2
  43. package/dist/i18n/locales/nl.d.ts +0 -1
  44. package/dist/i18n/locales/nl.js +1 -2
  45. package/dist/i18n/locales/pl.d.ts +0 -1
  46. package/dist/i18n/locales/pl.js +1 -2
  47. package/dist/i18n/locales/pt.d.ts +0 -1
  48. package/dist/i18n/locales/pt.js +1 -2
  49. package/dist/i18n/locales/ro.d.ts +0 -1
  50. package/dist/i18n/locales/ro.js +1 -2
  51. package/dist/i18n/locales/ru.d.ts +0 -1
  52. package/dist/i18n/locales/ru.js +1 -2
  53. package/dist/i18n/locales/sq.d.ts +0 -1
  54. package/dist/i18n/locales/sq.js +1 -2
  55. package/dist/i18n/locales/sv.d.ts +0 -1
  56. package/dist/i18n/locales/sv.js +1 -2
  57. package/dist/i18n/locales/tr.d.ts +0 -1
  58. package/dist/i18n/locales/tr.js +1 -2
  59. package/dist/i18n/locales/zh.d.ts +0 -1
  60. package/dist/i18n/locales/zh.js +1 -2
  61. package/dist/index.js +8 -8
  62. package/dist/locales/ar.json +1 -2
  63. package/dist/locales/de.json +1 -2
  64. package/dist/locales/el.json +1 -2
  65. package/dist/locales/en.json +1 -2
  66. package/dist/locales/es.json +1 -2
  67. package/dist/locales/fr.json +1 -2
  68. package/dist/locales/hi.json +1 -2
  69. package/dist/locales/it.json +1 -2
  70. package/dist/locales/ja.json +1 -2
  71. package/dist/locales/nl.json +1 -2
  72. package/dist/locales/pl.json +1 -2
  73. package/dist/locales/pt.json +1 -2
  74. package/dist/locales/ro.json +1 -2
  75. package/dist/locales/ru.json +1 -2
  76. package/dist/locales/sq.json +1 -2
  77. package/dist/locales/sv.json +1 -2
  78. package/dist/locales/tr.json +1 -2
  79. package/dist/locales/zh.json +1 -2
  80. package/dist/online-bookings-panel/index.js +1 -1
  81. package/dist/patterns/calendar/index.js +2 -2
  82. package/dist/tokens.css +1 -1
  83. package/dist/waiting-list-panel/index.js +2 -2
  84. package/package.json +1 -1
  85. package/dist/_chunks/editable-description-BQauSuCG.js +0 -142
  86. package/dist/_chunks/registry-connection-panel-BEAkwivy.js +0 -503
@@ -0,0 +1,529 @@
1
+ import { jsx as n, jsxs as b } from "react/jsx-runtime";
2
+ import { forwardRef as De, useId as A, useRef as y, useState as h, useEffect as P, useCallback as w, useMemo as ge, useImperativeHandle as Oe } from "react";
3
+ import { useTranslation as Ee } from "react-i18next";
4
+ import { u as Je } from "./registry-DvAUVLHh.js";
5
+ import { u as We } from "./use-controllable-state-BiY4xTzM.js";
6
+ import { f as Ze } from "./intl-locale-FWh-Y5_3.js";
7
+ import { A as L } from "./alert-C4WKViaS.js";
8
+ import { B as $e } from "./badge-BUk4RjTS.js";
9
+ import { B as V } from "./button-Dp4j9ygh.js";
10
+ import { F as fe } from "./form-field-CyHfOVKF.js";
11
+ import { P as Ge } from "./panel-header-CbtlTe85.js";
12
+ import { P as ve } from "./panel-subview-DjBwNV16.js";
13
+ import { P as Qe } from "./password-input-SJGHFdOO.js";
14
+ import { S as Ue } from "./scroll-area-CY5SLYNw.js";
15
+ import { S as Xe } from "./select-Bw5FvGJ7.js";
16
+ import { T as ye } from "./text-input-B6iAgCr3.js";
17
+ import { S as we } from "./settings-d25ju_6L.js";
18
+ import { C as Ye } from "./check-DrFSN__t.js";
19
+ import { C as et } from "./circle-alert-rGDZ73Wh.js";
20
+ import { c as tt } from "./createLucideIcon-DhHxpK9K.js";
21
+ /**
22
+ * @license lucide-react v1.22.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */
27
+ const nt = [
28
+ ["path", { d: "m19 5 3-3", key: "yk6iyv" }],
29
+ ["path", { d: "m2 22 3-3", key: "19mgm9" }],
30
+ [
31
+ "path",
32
+ { d: "M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z", key: "goz73y" }
33
+ ],
34
+ ["path", { d: "M7.5 13.5 10 11", key: "7xgeeb" }],
35
+ ["path", { d: "M10.5 16.5 13 14", key: "10btkg" }],
36
+ [
37
+ "path",
38
+ { d: "m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z", key: "1snsnr" }
39
+ ]
40
+ ], ot = tt("unplug", nt), rt = {
41
+ id: "registry-connection-panel",
42
+ capabilities: ["view_change", "submit"],
43
+ state: {
44
+ status: {
45
+ type: "'connected' | 'disconnected' | 'incomplete'",
46
+ descriptionKey: "ui.agent.registryConnectionPanel.state.status",
47
+ description: "Connection state: connected (a session is open), disconnected (settings saved, no session) or incomplete (settings not saved yet).",
48
+ read: (i) => i.getStatus()
49
+ },
50
+ view: {
51
+ type: "'overview' | 'connect'",
52
+ descriptionKey: "ui.agent.registryConnectionPanel.state.view",
53
+ description: "The open view: the overview (status and settings) or the connect view (the one-time code step).",
54
+ read: (i) => i.getView()
55
+ }
56
+ },
57
+ actions: {
58
+ set_view: {
59
+ safety: "write",
60
+ argsType: "{ view: 'overview' | 'connect' }",
61
+ argsSchema: {
62
+ type: "object",
63
+ properties: {
64
+ view: { type: "string", enum: ["overview", "connect"] }
65
+ },
66
+ required: ["view"]
67
+ },
68
+ idempotent: !0,
69
+ descriptionKey: "ui.agent.registryConnectionPanel.actions.setView",
70
+ description: "Open the overview or the connect view (the code step). Nothing is sent to the registry. Ignored for the connect view while the settings are not saved yet (status incomplete).",
71
+ examples: [{ args: { view: "connect" }, note: "Open the code step." }],
72
+ invoke: (i, o) => i.setView(o.view)
73
+ },
74
+ submit_settings: {
75
+ safety: "write",
76
+ idempotent: !0,
77
+ openWorld: !0,
78
+ errors: [
79
+ "A required field is empty: the panel shows the message and does not call the host.",
80
+ "The host refused the settings. The panel shows the host's message."
81
+ ],
82
+ descriptionKey: "ui.agent.registryConnectionPanel.actions.submitSettings",
83
+ description: "Save the settings as they stand in the panel, through the host. The agent supplies no values and reads none: the fields hold credentials. Required fields are checked first.",
84
+ invoke: (i) => i.saveSettings()
85
+ },
86
+ confirm_code: {
87
+ safety: "write",
88
+ argsType: "{ code: string }",
89
+ argsSchema: {
90
+ type: "object",
91
+ properties: {
92
+ code: {
93
+ type: "string",
94
+ description: "The one-time code the registry sent."
95
+ }
96
+ },
97
+ required: ["code"]
98
+ },
99
+ openWorld: !0,
100
+ errors: [
101
+ "The code is empty: the panel refuses it without calling the host, and shows the message only while the code step is open.",
102
+ "The host refused the code. The panel shows the host's message."
103
+ ],
104
+ descriptionKey: "ui.agent.registryConnectionPanel.actions.confirmCode",
105
+ description: "Confirm the one-time code, through the host, to open a session. Read status afterwards: the host changes it on success and the panel returns to the overview. A refused code keeps the code step open.",
106
+ invoke: (i, o) => i.connect(o.code)
107
+ }
108
+ },
109
+ domHooks: {
110
+ root: {
111
+ attr: "data-component",
112
+ value: "registry-connection-panel",
113
+ description: "Marks the RegistryConnectionPanel region."
114
+ },
115
+ instanceId: {
116
+ attr: "data-component-id",
117
+ sourceProp: "id",
118
+ description: "Sourced from the id prop. Required to address a specific panel from the agent. The root also carries data-status and data-view."
119
+ }
120
+ }
121
+ };
122
+ function Ce(i) {
123
+ return typeof i == "object" && i !== null && typeof i.then == "function";
124
+ }
125
+ function it(i) {
126
+ if (typeof globalThis.reportError == "function") {
127
+ globalThis.reportError(i);
128
+ return;
129
+ }
130
+ setTimeout(() => {
131
+ throw i;
132
+ }, 0);
133
+ }
134
+ const st = {
135
+ connected: "success",
136
+ disconnected: "neutral",
137
+ incomplete: "warning"
138
+ }, be = "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", ct = De(
139
+ ({
140
+ registryName: i,
141
+ status: o,
142
+ connectedUntil: S,
143
+ notice: Q,
144
+ fields: M,
145
+ values: z,
146
+ fieldErrors: k,
147
+ onSaveSettings: U,
148
+ codeExplanation: X,
149
+ onRequestCode: F,
150
+ onConnect: Y,
151
+ view: Pe,
152
+ defaultView: Se = "overview",
153
+ onViewChange: ke,
154
+ error: ee,
155
+ id: te,
156
+ className: Te
157
+ }, xe) => {
158
+ const { t: r, i18n: qe } = Ee("ui"), ne = A(), oe = A(), re = A(), Ne = A(), ie = y(null), R = y(null), [Ie, T] = We({
159
+ value: Pe,
160
+ defaultValue: Se,
161
+ onChange: ke
162
+ }), p = Ie ?? "overview", Ae = JSON.stringify(z), [j, B] = h(() => ({
163
+ ...z
164
+ }));
165
+ P(() => {
166
+ B({ ...z });
167
+ }, [Ae]);
168
+ const [Le, _] = h(() => /* @__PURE__ */ new Set()), Ve = JSON.stringify(k ?? {});
169
+ P(() => {
170
+ _(/* @__PURE__ */ new Set());
171
+ }, [Ve]);
172
+ const [Me, se] = h({}), [x, ce] = h(""), [H, q] = h(), [ze, K] = h(!1), [D, ae] = h(
173
+ () => /* @__PURE__ */ new Set()
174
+ ), g = y(/* @__PURE__ */ new Set()), N = y(!0);
175
+ P(() => (N.current = !0, () => {
176
+ N.current = !1;
177
+ }), []);
178
+ const a = y({
179
+ status: o,
180
+ view: p,
181
+ draft: j,
182
+ fields: M,
183
+ onSaveSettings: U,
184
+ onRequestCode: F,
185
+ onConnect: Y,
186
+ code: x
187
+ });
188
+ a.current = {
189
+ status: o,
190
+ view: p,
191
+ draft: j,
192
+ fields: M,
193
+ onSaveSettings: U,
194
+ onRequestCode: F,
195
+ onConnect: Y,
196
+ code: x
197
+ };
198
+ const f = w(
199
+ (e, s, t) => {
200
+ if (g.current.has(e)) return Promise.resolve();
201
+ let c;
202
+ try {
203
+ c = s();
204
+ } catch (d) {
205
+ return it(d), Promise.resolve();
206
+ }
207
+ if (!Ce(c))
208
+ return t == null || t(!0), Promise.resolve();
209
+ g.current.add(e), ae(new Set(g.current));
210
+ const l = (d) => {
211
+ g.current.delete(e), N.current && (ae(new Set(g.current)), t == null || t(d));
212
+ };
213
+ return Promise.resolve(c).then(
214
+ () => l(!0),
215
+ () => l(!1)
216
+ );
217
+ },
218
+ []
219
+ ), v = w(
220
+ (e) => {
221
+ e !== a.current.view && T(e);
222
+ },
223
+ [T]
224
+ ), de = y(o);
225
+ P(() => {
226
+ const e = de.current;
227
+ de.current = o, e !== "connected" && o === "connected" && a.current.view === "connect" && T("overview");
228
+ }, [o, T]), P(() => {
229
+ p !== "connect" && (ce(""), q(void 0), K(!1));
230
+ }, [p]);
231
+ const le = r("registryConnectionPanel.errors.required"), ue = w(() => {
232
+ const { fields: e, draft: s } = a.current, t = {};
233
+ for (const c of e)
234
+ c.required !== !1 && (c.kind === "secret" && c.stored || (s[c.name] ?? "").trim() === "" && (t[c.name] = le));
235
+ return t;
236
+ }, [le]), O = w(() => {
237
+ var c, l;
238
+ const e = ue();
239
+ se(e);
240
+ const s = Object.keys(e)[0];
241
+ if (s !== void 0) {
242
+ const d = (l = (c = ie.current) == null ? void 0 : c.querySelector(`[data-field-name="${s}"]`)) == null ? void 0 : l.querySelector('input, button, [role="combobox"]');
243
+ return d == null || d.focus(), Promise.resolve();
244
+ }
245
+ _(/* @__PURE__ */ new Set());
246
+ const t = a.current.draft;
247
+ return f(
248
+ "save",
249
+ () => a.current.onSaveSettings(t),
250
+ (d) => {
251
+ d && B((C) => {
252
+ const I = { ...C };
253
+ for (const u of a.current.fields)
254
+ u.kind === "secret" && C[u.name] === t[u.name] && (I[u.name] = "");
255
+ return I;
256
+ });
257
+ }
258
+ );
259
+ }, [ue, f]), E = (e, s) => {
260
+ B((t) => ({ ...t, [e]: s })), _((t) => new Set(t).add(e)), se((t) => {
261
+ if (!(e in t)) return t;
262
+ const { [e]: c, ...l } = t;
263
+ return l;
264
+ });
265
+ }, J = w(
266
+ (e) => {
267
+ var t;
268
+ const s = e.trim();
269
+ return s === "" ? (a.current.view === "connect" && (q(r("registryConnectionPanel.errors.codeRequired")), (t = R.current) == null || t.focus()), Promise.resolve()) : (q(void 0), f(
270
+ "connect",
271
+ () => a.current.onConnect(s),
272
+ (c) => {
273
+ c && a.current.status === "connected" && v("overview");
274
+ }
275
+ ));
276
+ },
277
+ [f, r, v]
278
+ ), Fe = w(
279
+ () => f("requestCode", () => {
280
+ var s, t;
281
+ const e = (t = (s = a.current).onRequestCode) == null ? void 0 : t.call(s);
282
+ if (Ce(e))
283
+ return Promise.resolve(e).then(() => {
284
+ N.current && K(!0);
285
+ });
286
+ K(!0);
287
+ }),
288
+ [f]
289
+ ), W = ge(
290
+ () => ({
291
+ getStatus: () => a.current.status,
292
+ getView: () => a.current.view,
293
+ setView: (e) => {
294
+ e === "connect" && a.current.status === "incomplete" || v(e);
295
+ },
296
+ saveSettings: O,
297
+ connect: (e) => J(e)
298
+ }),
299
+ [v, O, J]
300
+ );
301
+ Oe(xe, () => W, [W]), Je(rt, W, te);
302
+ const me = Ze(qe.language), pe = ge(() => o !== "connected" || !S || Number.isNaN(S.getTime()) ? null : new Intl.DateTimeFormat(me, { timeStyle: "short" }).format(
303
+ S
304
+ ), [o, S, me]), Re = o === "connected" ? pe ? r("registryConnectionPanel.status.connectedUntil", { time: pe }) : r("registryConnectionPanel.status.connected") : r(o === "incomplete" ? "registryConnectionPanel.status.incomplete" : "registryConnectionPanel.status.disconnected"), je = o === "connected" ? /* @__PURE__ */ n(Ye, { "aria-hidden": "true" }) : o === "incomplete" ? /* @__PURE__ */ n(et, { "aria-hidden": "true" }) : /* @__PURE__ */ n(ot, { "aria-hidden": "true" }), Z = o === "incomplete" ? r("registryConnectionPanel.help.incomplete", { registryName: i }) : o === "disconnected" ? r("registryConnectionPanel.help.disconnected", { registryName: i }) : null, he = (e) => ee ? /* @__PURE__ */ n(L, { variant: "error", "data-registry-error": e, children: /* @__PURE__ */ n(L.Description, { children: ee }) }) : null, Be = (e) => {
305
+ e.preventDefault(), O();
306
+ }, _e = (e) => {
307
+ e.preventDefault(), J(x);
308
+ }, He = (e) => {
309
+ const s = e.kind ?? "text", c = (Le.has(e.name) || k == null ? void 0 : k[e.name]) ?? Me[e.name], l = s === "secret" && e.stored === !0, d = [
310
+ e.hint,
311
+ l ? r("registryConnectionPanel.secretStored") : void 0
312
+ ].filter(Boolean).join(" ") || void 0, C = e.required === !1, I = !C && !l, u = j[e.name] ?? "", G = c ? "error" : void 0;
313
+ return /* @__PURE__ */ n(
314
+ fe,
315
+ {
316
+ "data-field-name": e.name,
317
+ label: e.label,
318
+ description: d,
319
+ error: c,
320
+ ...C ? { optional: !0 } : { required: I },
321
+ children: s === "select" ? /* @__PURE__ */ n(
322
+ Xe,
323
+ {
324
+ options: (e.options ?? []).map((m) => ({
325
+ value: m.value,
326
+ label: m.label
327
+ })),
328
+ value: u,
329
+ placeholder: r("registryConnectionPanel.choose"),
330
+ tone: G,
331
+ onValueChange: (m) => E(e.name, m)
332
+ }
333
+ ) : s === "secret" ? /* @__PURE__ */ n(
334
+ Qe,
335
+ {
336
+ value: u,
337
+ maxLength: e.maxLength,
338
+ inputMode: e.inputMode,
339
+ autoCapitalize: e.autoCapitalize,
340
+ autoComplete: "off",
341
+ tone: G,
342
+ onChange: (m) => E(e.name, m.target.value)
343
+ }
344
+ ) : /* @__PURE__ */ n(
345
+ ye,
346
+ {
347
+ value: u,
348
+ maxLength: e.maxLength,
349
+ inputMode: e.inputMode,
350
+ autoCapitalize: e.autoCapitalize,
351
+ autoComplete: "off",
352
+ tone: G,
353
+ onChange: (m) => E(e.name, m.target.value)
354
+ }
355
+ )
356
+ },
357
+ e.name
358
+ );
359
+ }, Ke = r(o === "connected" ? "registryConnectionPanel.connectAgain" : "registryConnectionPanel.connect"), $ = o === "incomplete";
360
+ return /* @__PURE__ */ n(
361
+ "section",
362
+ {
363
+ ref: ie,
364
+ "data-component": "registry-connection-panel",
365
+ "data-component-id": te,
366
+ "data-status": o,
367
+ "data-view": p,
368
+ "aria-labelledby": ne,
369
+ className: ["ds:flex ds:h-full ds:min-h-0 ds:flex-col", Te].filter(Boolean).join(" "),
370
+ children: /* @__PURE__ */ b(ve.Host, { className: "ds:flex-1", children: [
371
+ /* @__PURE__ */ n(
372
+ Ge,
373
+ {
374
+ title: r("registryConnectionPanel.title", { registryName: i }),
375
+ icon: /* @__PURE__ */ n(we, { "aria-hidden": "true" }),
376
+ headingId: ne,
377
+ divider: !0
378
+ }
379
+ ),
380
+ /* @__PURE__ */ n(Ue, { orientation: "vertical", className: "ds:min-h-0 ds:flex-1", children: /* @__PURE__ */ b("div", { className: be, children: [
381
+ Q ? /* @__PURE__ */ n(L, { variant: "info", "data-registry-notice": "", children: /* @__PURE__ */ n(L.Description, { children: Q }) }) : null,
382
+ p === "overview" ? he("overview") : null,
383
+ /* @__PURE__ */ b(
384
+ "div",
385
+ {
386
+ "data-registry-status": "",
387
+ className: "ds:flex ds:flex-col ds:items-start ds:gap-[var(--spacing-sm)]",
388
+ children: [
389
+ /* @__PURE__ */ n(
390
+ $e,
391
+ {
392
+ size: "sm",
393
+ variant: st[o],
394
+ leading: je,
395
+ children: Re
396
+ }
397
+ ),
398
+ Z ? /* @__PURE__ */ n(
399
+ "p",
400
+ {
401
+ id: oe,
402
+ className: "ds:m-0 type-body-sm ds:text-muted-foreground",
403
+ children: Z
404
+ }
405
+ ) : null,
406
+ /* @__PURE__ */ n(
407
+ V,
408
+ {
409
+ type: "button",
410
+ intent: o === "connected" ? "secondary" : "primary",
411
+ "aria-disabled": $ || void 0,
412
+ "aria-describedby": $ && Z ? oe : void 0,
413
+ onClick: () => {
414
+ $ || v("connect");
415
+ },
416
+ "data-action": "connect",
417
+ className: "ds:min-h-[var(--min-target-size)]",
418
+ children: Ke
419
+ }
420
+ )
421
+ ]
422
+ }
423
+ ),
424
+ /* @__PURE__ */ b(
425
+ "form",
426
+ {
427
+ id: Ne,
428
+ noValidate: !0,
429
+ onSubmit: Be,
430
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
431
+ children: [
432
+ /* @__PURE__ */ n("h3", { className: "ds:m-0 type-title-item", children: r("registryConnectionPanel.settings") }),
433
+ M.map(He),
434
+ /* @__PURE__ */ n(
435
+ V,
436
+ {
437
+ type: "submit",
438
+ intent: o === "incomplete" ? "primary" : "secondary",
439
+ loading: D.has("save"),
440
+ "data-action": "save",
441
+ className: "ds:min-h-[var(--min-target-size)] ds:self-start",
442
+ children: r("registryConnectionPanel.save")
443
+ }
444
+ )
445
+ ]
446
+ }
447
+ )
448
+ ] }) }),
449
+ /* @__PURE__ */ n(
450
+ ve,
451
+ {
452
+ open: p === "connect",
453
+ title: r("registryConnectionPanel.connectTitle", { registryName: i }),
454
+ icon: /* @__PURE__ */ n(we, { "aria-hidden": "true" }),
455
+ backLabel: r("registryConnectionPanel.back"),
456
+ headingLevel: 2,
457
+ initialFocusRef: R,
458
+ onBack: () => {
459
+ g.current.has("connect") || v("overview");
460
+ },
461
+ footer: /* @__PURE__ */ n(
462
+ V,
463
+ {
464
+ type: "submit",
465
+ form: re,
466
+ loading: D.has("connect"),
467
+ "data-action": "confirm",
468
+ className: "ds:min-h-[var(--min-target-size)]",
469
+ children: r("common.confirm")
470
+ }
471
+ ),
472
+ children: /* @__PURE__ */ b(
473
+ "form",
474
+ {
475
+ id: re,
476
+ noValidate: !0,
477
+ onSubmit: _e,
478
+ className: `ds:-m-[var(--panel-subview-inset)] ${be}`,
479
+ children: [
480
+ he("connect"),
481
+ X ? /* @__PURE__ */ n("p", { className: "ds:m-0 type-body", children: X }) : null,
482
+ F ? /* @__PURE__ */ n(
483
+ V,
484
+ {
485
+ type: "button",
486
+ intent: "secondary",
487
+ loading: D.has("requestCode"),
488
+ onClick: () => void Fe(),
489
+ "data-action": "request-code",
490
+ className: "ds:min-h-[var(--min-target-size)] ds:self-start",
491
+ children: r(ze ? "registryConnectionPanel.sendCodeAgain" : "registryConnectionPanel.sendCode")
492
+ }
493
+ ) : null,
494
+ /* @__PURE__ */ n(
495
+ fe,
496
+ {
497
+ label: r("registryConnectionPanel.codeLabel"),
498
+ required: !0,
499
+ error: H,
500
+ children: /* @__PURE__ */ n(
501
+ ye,
502
+ {
503
+ ref: R,
504
+ value: x,
505
+ autoComplete: "one-time-code",
506
+ autoCapitalize: "characters",
507
+ tone: H ? "error" : void 0,
508
+ onChange: (e) => {
509
+ ce(e.target.value), H && q(void 0);
510
+ }
511
+ }
512
+ )
513
+ }
514
+ )
515
+ ]
516
+ }
517
+ )
518
+ }
519
+ )
520
+ ] })
521
+ }
522
+ );
523
+ }
524
+ );
525
+ ct.displayName = "RegistryConnectionPanel";
526
+ export {
527
+ ct as R
528
+ };
529
+ //# sourceMappingURL=registry-connection-panel-ACOsXu3F.js.map