@burdenoff/fe-libs 2026.1118.13 → 2026.1119.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 (41) hide show
  1. package/dist/chrome/globalSearch/AdvancedFiltersPanel.js +128 -127
  2. package/dist/chrome/notificationCenter/NotificationFilters.js +45 -44
  3. package/dist/connections/CredentialStorageSelector.js +135 -134
  4. package/dist/connections/SharePanels.js +70 -69
  5. package/dist/credentials/AuthMethodSelector.js +33 -32
  6. package/dist/credentials/SchemaForm.js +96 -95
  7. package/dist/shared/assistant/avatar/live/LiveAvatarSettingsFields.js +74 -73
  8. package/dist/shared/assistant/ui/AssistantLanguageMenu.d.ts +2 -0
  9. package/dist/shared/assistant/ui/AssistantLanguageMenu.js +41 -40
  10. package/dist/shared/assistant/ui/AssistantReplyLanguageSelector.d.ts +3 -1
  11. package/dist/shared/assistant/ui/AssistantReplyLanguageSelector.js +26 -25
  12. package/dist/shared/assistant/ui/composer/AssistantLanguageSelector.d.ts +3 -1
  13. package/dist/shared/assistant/ui/composer/AssistantLanguageSelector.js +22 -21
  14. package/dist/shared/assistant/ui/composer/AssistantVoiceGraceSelector.d.ts +2 -1
  15. package/dist/shared/assistant/ui/composer/AssistantVoiceGraceSelector.js +17 -16
  16. package/dist/shared/assistant/ui/composer/AssistantVoiceSelector.d.ts +3 -1
  17. package/dist/shared/assistant/ui/composer/AssistantVoiceSelector.js +22 -21
  18. package/dist/shared/pages/searchPage/FiltersPanel.js +129 -128
  19. package/dist/shared/pages/searchPage/SearchToolbar.js +24 -23
  20. package/dist/shared/providers/AppShellProvider.d.ts +8 -0
  21. package/dist/shared/providers/AppShellProvider.js +199 -193
  22. package/dist/shared/providers/shell/ThemeProvider.d.ts +6 -1
  23. package/dist/shared/providers/shell/ThemeProvider.js +65 -62
  24. package/dist/shared/providers/shell/themedNativeControls.d.ts +25 -0
  25. package/dist/shared/providers/shell/themedNativeControls.js +13 -0
  26. package/dist/sharing/ShareDialog.js +33 -32
  27. package/dist/storage/StorageFolderPicker.js +50 -49
  28. package/dist/ui/index.d.ts +2 -0
  29. package/dist/ui/themed-select-context.d.ts +9 -0
  30. package/dist/ui/themed-select-context.js +15 -0
  31. package/dist/ui/themed-select-menu.d.ts +10 -0
  32. package/dist/ui/themed-select-menu.js +70 -0
  33. package/dist/ui/themed-select-options.d.ts +42 -0
  34. package/dist/ui/themed-select-options.js +88 -0
  35. package/dist/ui/themed-select-state.d.ts +43 -0
  36. package/dist/ui/themed-select-state.js +73 -0
  37. package/dist/ui/themed-select.d.ts +7 -0
  38. package/dist/ui/themed-select.js +176 -0
  39. package/dist/ui.js +31 -29
  40. package/package.json +1 -1
  41. package/src/shared/tokens/tokens.css +100 -0
@@ -1,62 +1,63 @@
1
1
  import { INPUT_CLASS as e } from "./frame.js";
2
2
  import { principalKey as t } from "./resourceSharing.js";
3
- import { useState as n } from "react";
4
- import { Folder as r, Trash2 as i, User as a, Users as o } from "lucide-react";
5
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
3
+ import { ThemedSelect as n } from "../ui/themed-select.js";
4
+ import { useState as r } from "react";
5
+ import { Folder as i, Trash2 as a, User as o, Users as s } from "lucide-react";
6
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
7
  // src/connections/SharePanels.tsx
7
- var l = 8, u = {
8
- USER: a,
9
- GROUP: o,
10
- PROJECT: r
11
- }, d = ({ id: t, ownerId: n, onChange: r, changeable: i, members: a, ownerLabel: o, copy: l, testIdPrefix: u }) => /* @__PURE__ */ c("div", {
8
+ var u = 8, d = {
9
+ USER: o,
10
+ GROUP: s,
11
+ PROJECT: i
12
+ }, f = ({ id: t, ownerId: r, onChange: i, changeable: a, members: o, ownerLabel: s, copy: u, testIdPrefix: d }) => /* @__PURE__ */ l("div", {
12
13
  className: "space-y-1",
13
- children: [/* @__PURE__ */ s("label", {
14
+ children: [/* @__PURE__ */ c("label", {
14
15
  htmlFor: t,
15
16
  className: "block text-sm font-medium text-text-primary",
16
- children: l.owner
17
- }), i ? /* @__PURE__ */ c("select", {
17
+ children: u.owner
18
+ }), a ? /* @__PURE__ */ l(n, {
18
19
  id: t,
19
- value: n,
20
- onChange: (e) => r(e.target.value),
20
+ value: r,
21
+ onChange: (e) => i(e.target.value),
21
22
  className: e,
22
- "data-testid": `${u}-owner`,
23
- children: [!a.some((e) => e.principalId === n) && /* @__PURE__ */ s("option", {
24
- value: n,
25
- children: o
26
- }), a.map((e) => /* @__PURE__ */ s("option", {
23
+ "data-testid": `${d}-owner`,
24
+ children: [!o.some((e) => e.principalId === r) && /* @__PURE__ */ c("option", {
25
+ value: r,
26
+ children: s
27
+ }), o.map((e) => /* @__PURE__ */ c("option", {
27
28
  value: e.principalId,
28
29
  children: e.label
29
30
  }, e.principalId))]
30
- }) : /* @__PURE__ */ s("p", {
31
+ }) : /* @__PURE__ */ c("p", {
31
32
  id: t,
32
33
  className: "text-sm text-text-secondary",
33
- children: o
34
+ children: s
34
35
  })]
35
- }), f = ({ id: r, principals: i, excluded: a, onAdd: o, disabled: d, copy: f, testIdPrefix: p }) => {
36
- let [m, h] = n(""), g = m.trim().toLowerCase(), _ = g ? i.filter((e) => !a.has(t(e.principalType, e.principalId)) && `${e.label} ${e.detail ?? ""}`.toLowerCase().includes(g)).slice(0, l) : [];
37
- return /* @__PURE__ */ c("div", {
36
+ }), p = ({ id: n, principals: i, excluded: a, onAdd: o, disabled: s, copy: f, testIdPrefix: p }) => {
37
+ let [m, h] = r(""), g = m.trim().toLowerCase(), _ = g ? i.filter((e) => !a.has(t(e.principalType, e.principalId)) && `${e.label} ${e.detail ?? ""}`.toLowerCase().includes(g)).slice(0, u) : [];
38
+ return /* @__PURE__ */ l("div", {
38
39
  className: "space-y-2",
39
40
  children: [
40
- /* @__PURE__ */ s("label", {
41
- htmlFor: r,
41
+ /* @__PURE__ */ c("label", {
42
+ htmlFor: n,
42
43
  className: "block text-sm font-medium text-text-primary",
43
44
  children: f.add
44
45
  }),
45
- /* @__PURE__ */ s("input", {
46
- id: r,
46
+ /* @__PURE__ */ c("input", {
47
+ id: n,
47
48
  type: "search",
48
49
  value: m,
49
50
  onChange: (e) => h(e.target.value),
50
51
  placeholder: f.addPlaceholder,
51
52
  className: e,
52
- disabled: d,
53
+ disabled: s,
53
54
  "data-testid": `${p}-search`
54
55
  }),
55
- _.length > 0 && /* @__PURE__ */ s("ul", {
56
+ _.length > 0 && /* @__PURE__ */ c("ul", {
56
57
  className: "divide-y divide-border-subtle rounded-md border border-border-subtle",
57
58
  children: _.map((e) => {
58
- let n = u[e.principalType];
59
- return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ c("button", {
59
+ let n = d[e.principalType];
60
+ return /* @__PURE__ */ c("li", { children: /* @__PURE__ */ l("button", {
60
61
  type: "button",
61
62
  onClick: () => {
62
63
  o(e), h("");
@@ -64,16 +65,16 @@ var l = 8, u = {
64
65
  className: "flex w-full items-center gap-2 px-3 py-2 text-start text-sm hover:bg-accent",
65
66
  "data-testid": `${p}-match`,
66
67
  children: [
67
- /* @__PURE__ */ s(n, {
68
+ /* @__PURE__ */ c(n, {
68
69
  size: 14,
69
70
  className: "shrink-0 text-text-secondary",
70
71
  "aria-hidden": !0
71
72
  }),
72
- /* @__PURE__ */ s("span", {
73
+ /* @__PURE__ */ c("span", {
73
74
  className: "flex-1 truncate text-text-primary",
74
75
  children: e.label
75
76
  }),
76
- /* @__PURE__ */ s("span", {
77
+ /* @__PURE__ */ c("span", {
77
78
  className: "text-xs text-text-secondary",
78
79
  children: e.detail ?? f.principalType[e.principalType]
79
80
  })
@@ -84,70 +85,70 @@ var l = 8, u = {
84
85
  ]
85
86
  });
86
87
  };
87
- function p({ idPrefix: e, grants: n, visibility: r, labelOf: a, roles: o, onRole: l, onRemove: d, disabled: f, copy: p, testIdPrefix: m }) {
88
- let h = (e) => o.find((t) => t.value === e)?.value;
89
- return /* @__PURE__ */ c("div", {
88
+ function m({ idPrefix: e, grants: r, visibility: i, labelOf: o, roles: s, onRole: u, onRemove: f, disabled: p, copy: m, testIdPrefix: h }) {
89
+ let g = (e) => s.find((t) => t.value === e)?.value;
90
+ return /* @__PURE__ */ l("div", {
90
91
  className: "space-y-2",
91
- children: [/* @__PURE__ */ s("h3", {
92
+ children: [/* @__PURE__ */ c("h3", {
92
93
  className: "text-sm font-medium text-text-primary",
93
- children: p.sharedWith
94
- }), n.length === 0 ? /* @__PURE__ */ s("p", {
94
+ children: m.sharedWith
95
+ }), r.length === 0 ? /* @__PURE__ */ c("p", {
95
96
  className: "text-xs text-text-secondary",
96
- children: r === "RESTRICTED" ? p.onlyOwner : p.none
97
- }) : /* @__PURE__ */ s("ul", {
97
+ children: i === "RESTRICTED" ? m.onlyOwner : m.none
98
+ }) : /* @__PURE__ */ c("ul", {
98
99
  className: "divide-y divide-border-subtle rounded-md border border-border-subtle",
99
- children: n.map((n, r) => {
100
- let g = u[n.principalType], _ = `${e}-role-${r}`, v = a(n.principalType, n.principalId);
101
- return /* @__PURE__ */ c("li", {
100
+ children: r.map((r, i) => {
101
+ let _ = d[r.principalType], v = `${e}-role-${i}`, y = o(r.principalType, r.principalId);
102
+ return /* @__PURE__ */ l("li", {
102
103
  className: "flex items-center gap-2 px-3 py-2",
103
- "data-testid": `${m}-grant`,
104
+ "data-testid": `${h}-grant`,
104
105
  children: [
105
- /* @__PURE__ */ s(g, {
106
+ /* @__PURE__ */ c(_, {
106
107
  size: 14,
107
108
  className: "shrink-0 text-text-secondary",
108
109
  "aria-hidden": !0
109
110
  }),
110
- /* @__PURE__ */ c("span", {
111
+ /* @__PURE__ */ l("span", {
111
112
  className: "min-w-0 flex-1",
112
- children: [/* @__PURE__ */ s("span", {
113
+ children: [/* @__PURE__ */ c("span", {
113
114
  className: "block truncate text-sm text-text-primary",
114
- children: v
115
- }), /* @__PURE__ */ s("span", {
115
+ children: y
116
+ }), /* @__PURE__ */ c("span", {
116
117
  className: "block text-xs text-text-secondary",
117
- children: p.principalType[n.principalType]
118
+ children: m.principalType[r.principalType]
118
119
  })]
119
120
  }),
120
- /* @__PURE__ */ s("label", {
121
- htmlFor: _,
121
+ /* @__PURE__ */ c("label", {
122
+ htmlFor: v,
122
123
  className: "sr-only",
123
- children: p.roleFor(v)
124
+ children: m.roleFor(y)
124
125
  }),
125
- /* @__PURE__ */ s("select", {
126
- id: _,
127
- value: n.role,
126
+ /* @__PURE__ */ c(n, {
127
+ id: v,
128
+ value: r.role,
128
129
  onChange: (e) => {
129
- let t = h(e.target.value);
130
- t && l(r, t);
130
+ let t = g(e.target.value);
131
+ t && u(i, t);
131
132
  },
132
- disabled: f,
133
+ disabled: p,
133
134
  className: "rounded-md border border-border-subtle bg-bg-surface px-2 py-1 text-xs",
134
- children: o.map((e) => /* @__PURE__ */ s("option", {
135
+ children: s.map((e) => /* @__PURE__ */ c("option", {
135
136
  value: e.value,
136
137
  children: e.label
137
138
  }, e.value))
138
139
  }),
139
- /* @__PURE__ */ s("button", {
140
+ /* @__PURE__ */ c("button", {
140
141
  type: "button",
141
- onClick: () => d(r),
142
- disabled: f,
142
+ onClick: () => f(i),
143
+ disabled: p,
143
144
  className: "rounded-md p-1 text-text-secondary hover:bg-accent disabled:opacity-50",
144
- "aria-label": p.remove(v),
145
- children: /* @__PURE__ */ s(i, { size: 14 })
145
+ "aria-label": m.remove(y),
146
+ children: /* @__PURE__ */ c(a, { size: 14 })
146
147
  })
147
148
  ]
148
- }, t(n.principalType, n.principalId));
149
+ }, t(r.principalType, r.principalId));
149
150
  })
150
151
  })]
151
152
  });
152
153
  }
153
- export { p as GrantList, d as OwnerField, f as PrincipalSearch };
154
+ export { m as GrantList, f as OwnerField, p as PrincipalSearch };
@@ -1,61 +1,62 @@
1
1
  import { resolveSelectedMethod as e } from "./methods.js";
2
2
  import { englishTranslator as t } from "./translate.js";
3
- import { AlertCircle as n } from "lucide-react";
4
- import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
3
+ import { ThemedSelect as n } from "../ui/themed-select.js";
4
+ import { AlertCircle as r } from "lucide-react";
5
+ import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
5
6
  // src/credentials/AuthMethodSelector.tsx
6
- var o = ({ method: e, translate: o = t }) => e ? /* @__PURE__ */ a(r, { children: [e.description && /* @__PURE__ */ i("p", {
7
+ var s = ({ method: e, translate: n = t }) => e ? /* @__PURE__ */ o(i, { children: [e.description && /* @__PURE__ */ a("p", {
7
8
  className: "text-xs text-text-secondary",
8
9
  children: e.description
9
- }), !e.isConfigured && /* @__PURE__ */ a("div", {
10
+ }), !e.isConfigured && /* @__PURE__ */ o("div", {
10
11
  className: "flex items-start gap-2 px-3 py-2 rounded-md bg-status-warning-bg-subtle border border-border-default",
11
- children: [/* @__PURE__ */ i(n, {
12
+ children: [/* @__PURE__ */ a(r, {
12
13
  size: 14,
13
14
  className: "text-status-warning-text flex-shrink-0 mt-0.5"
14
- }), /* @__PURE__ */ i("span", {
15
+ }), /* @__PURE__ */ a("span", {
15
16
  className: "text-xs text-status-warning-text",
16
- children: o("integrations.addConnection.authentication.methodNotConfigured", "This authentication method is not configured in this environment. Ask an administrator to add its credentials, or pick another method.")
17
+ children: n("integrations.addConnection.authentication.methodNotConfigured", "This authentication method is not configured in this environment. Ask an administrator to add its credentials, or pick another method.")
17
18
  })]
18
- })] }) : null, s = ({ methods: n, selectedKey: r, onSelect: s, disabled: c, idPrefix: l = "auth-method", compact: u = !1, translate: d = t }) => {
19
- let f = n.filter((e) => e.isEnabled);
20
- if (f.length <= 1) return null;
21
- let p = e(f, r), m = d("integrations.addConnection.fields.authMethod", "Authentication Method"), h = /* @__PURE__ */ a("select", {
22
- id: l,
23
- "aria-label": m,
24
- value: p ? p.key : "",
25
- onChange: (e) => s(e.target.value),
26
- disabled: c,
27
- className: u ? "max-w-[16rem] truncate rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-xs focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary" : "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
28
- children: [!p && /* @__PURE__ */ i("option", {
19
+ })] }) : null, c = ({ methods: r, selectedKey: i, onSelect: c, disabled: l, idPrefix: u = "auth-method", compact: d = !1, translate: f = t }) => {
20
+ let p = r.filter((e) => e.isEnabled);
21
+ if (p.length <= 1) return null;
22
+ let m = e(p, i), h = f("integrations.addConnection.fields.authMethod", "Authentication Method"), g = /* @__PURE__ */ o(n, {
23
+ id: u,
24
+ "aria-label": h,
25
+ value: m ? m.key : "",
26
+ onChange: (e) => c(e.target.value),
27
+ disabled: l,
28
+ className: d ? "max-w-[16rem] truncate rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-xs focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary" : "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
29
+ children: [!m && /* @__PURE__ */ a("option", {
29
30
  value: "",
30
31
  disabled: !0,
31
- children: d("integrations.addConnection.fields.authMethodPlaceholder", "Select an authentication method")
32
- }), f.map((e) => /* @__PURE__ */ a("option", {
32
+ children: f("integrations.addConnection.fields.authMethodPlaceholder", "Select an authentication method")
33
+ }), p.map((e) => /* @__PURE__ */ o("option", {
33
34
  value: e.key,
34
35
  disabled: !e.isConfigured,
35
- children: [e.displayName, e.isConfigured ? "" : ` — ${d("integrations.providerEditor.authMethods.notConfigured", "not configured")}`]
36
+ children: [e.displayName, e.isConfigured ? "" : ` — ${f("integrations.providerEditor.authMethods.notConfigured", "not configured")}`]
36
37
  }, e.key))]
37
38
  });
38
- return u ? h : /* @__PURE__ */ a("div", { children: [
39
- /* @__PURE__ */ a("label", {
40
- htmlFor: l,
39
+ return d ? g : /* @__PURE__ */ o("div", { children: [
40
+ /* @__PURE__ */ o("label", {
41
+ htmlFor: u,
41
42
  className: "block text-sm font-medium text-text-primary mb-1.5",
42
43
  children: [
43
- m,
44
+ h,
44
45
  " ",
45
- /* @__PURE__ */ i("span", {
46
+ /* @__PURE__ */ a("span", {
46
47
  className: "text-status-error-text",
47
48
  children: "*"
48
49
  })
49
50
  ]
50
51
  }),
51
- h,
52
- /* @__PURE__ */ i("div", {
52
+ g,
53
+ /* @__PURE__ */ a("div", {
53
54
  className: "mt-1 space-y-2",
54
- children: /* @__PURE__ */ i(o, {
55
- method: p,
56
- translate: d
55
+ children: /* @__PURE__ */ a(s, {
56
+ method: m,
57
+ translate: f
57
58
  })
58
59
  })
59
60
  ] });
60
61
  };
61
- export { o as AuthMethodNotice, s as AuthMethodSelector };
62
+ export { s as AuthMethodNotice, c as AuthMethodSelector };
@@ -1,187 +1,188 @@
1
1
  import { isInFormPart as e, isVisible as t, normalizeOptions as n } from "./schema.js";
2
2
  import { englishTranslator as r } from "./translate.js";
3
- import { useState as i } from "react";
4
- import { Eye as a, EyeOff as o, Info as s } from "lucide-react";
5
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
3
+ import { ThemedSelect as i } from "../ui/themed-select.js";
4
+ import { useState as a } from "react";
5
+ import { Eye as o, EyeOff as s, Info as c } from "lucide-react";
6
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
6
7
  // src/credentials/SchemaForm.tsx
7
- var u = typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("-webkit-text-security", "disc"), d = ({ schema: n, values: i, onChange: a, disabled: o, idPrefix: s = "schema", translate: l = r, part: u = "all" }) => {
8
+ var d = typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("-webkit-text-security", "disc"), f = ({ schema: n, values: i, onChange: a, disabled: o, idPrefix: s = "schema", translate: c = r, part: u = "all" }) => {
8
9
  let d = new Set(n.required);
9
- return /* @__PURE__ */ c("div", {
10
+ return /* @__PURE__ */ l("div", {
10
11
  className: "space-y-3",
11
- children: Object.entries(n.properties).filter(([r, a]) => e(r, a, n, u) && t(a, i, n)).map(([e, t]) => /* @__PURE__ */ c(f, {
12
+ children: Object.entries(n.properties).filter(([r, a]) => e(r, a, n, u) && t(a, i, n)).map(([e, t]) => /* @__PURE__ */ l(p, {
12
13
  id: `${s}-${e}`,
13
14
  name: e,
14
15
  property: t,
15
16
  value: i[e],
16
17
  required: d.has(e),
17
18
  disabled: o,
18
- translate: l,
19
+ translate: c,
19
20
  onChange: (t) => a({
20
21
  ...i,
21
22
  [e]: t
22
23
  })
23
24
  }, e))
24
25
  });
25
- }, f = ({ id: e, name: t, property: r, value: d, required: f, disabled: p, translate: m, onChange: h }) => {
26
- let [g, _] = i(!1), [v, y] = i(!1), b = r.title ?? t, x = r.placeholder ?? r.description ?? "";
27
- if (r.type === "notice") return /* @__PURE__ */ l("div", {
26
+ }, p = ({ id: e, name: t, property: r, value: f, required: p, disabled: m, translate: h, onChange: g }) => {
27
+ let [_, v] = a(!1), [y, b] = a(!1), x = r.title ?? t, S = r.placeholder ?? r.description ?? "";
28
+ if (r.type === "notice") return /* @__PURE__ */ u("div", {
28
29
  className: "flex items-start gap-2 px-3 py-2 rounded-md bg-status-info-bg-subtle border border-border-default",
29
- children: [/* @__PURE__ */ c(s, {
30
+ children: [/* @__PURE__ */ l(c, {
30
31
  size: 14,
31
32
  className: "text-status-info-text flex-shrink-0 mt-0.5"
32
- }), /* @__PURE__ */ c("span", {
33
+ }), /* @__PURE__ */ l("span", {
33
34
  className: "text-xs text-status-info-text",
34
- children: r.description ?? b
35
+ children: r.description ?? x
35
36
  })]
36
37
  });
37
- let S = r.description ? /* @__PURE__ */ c("p", {
38
+ let C = r.description ? /* @__PURE__ */ l("p", {
38
39
  className: "mt-1 text-xs text-text-secondary",
39
40
  children: r.description
40
- }) : null, C = /* @__PURE__ */ l("label", {
41
+ }) : null, w = /* @__PURE__ */ u("label", {
41
42
  htmlFor: e,
42
43
  className: "block text-sm font-medium text-text-primary mb-1.5",
43
44
  children: [
44
- b,
45
+ x,
45
46
  " ",
46
- f && /* @__PURE__ */ c("span", {
47
+ p && /* @__PURE__ */ l("span", {
47
48
  className: "text-status-error-text",
48
49
  children: "*"
49
50
  })
50
51
  ]
51
- }), w = "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50";
52
+ }), T = "w-full px-3 py-2 border border-border-subtle rounded-md bg-bg-surface text-sm focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary disabled:opacity-50";
52
53
  if (r.type === "boolean") {
53
- let t = !!(d ?? r.default ?? !1);
54
- return /* @__PURE__ */ l("div", {
54
+ let t = !!(f ?? r.default ?? !1);
55
+ return /* @__PURE__ */ u("div", {
55
56
  className: "flex items-center gap-3",
56
- children: [/* @__PURE__ */ c("button", {
57
+ children: [/* @__PURE__ */ l("button", {
57
58
  type: "button",
58
59
  role: "switch",
59
60
  id: e,
60
61
  "aria-checked": t,
61
- "aria-label": b,
62
- onClick: () => h(!t),
63
- disabled: p,
62
+ "aria-label": x,
63
+ onClick: () => g(!t),
64
+ disabled: m,
64
65
  className: `relative inline-flex h-5 w-9 items-center rounded-full transition-colors disabled:opacity-50 ${t ? "bg-primary" : "bg-bg-muted"}`,
65
- children: /* @__PURE__ */ c("span", { className: `inline-block h-3.5 w-3.5 transform rounded-full bg-bg-surface transition-transform ${t ? "translate-x-4.5" : "translate-x-0.5"}` })
66
- }), /* @__PURE__ */ l("span", {
66
+ children: /* @__PURE__ */ l("span", { className: `inline-block h-3.5 w-3.5 transform rounded-full bg-bg-surface transition-transform ${t ? "translate-x-4.5" : "translate-x-0.5"}` })
67
+ }), /* @__PURE__ */ u("span", {
67
68
  className: "text-sm font-medium text-text-primary",
68
- children: [b, r.description && /* @__PURE__ */ l("span", {
69
+ children: [x, r.description && /* @__PURE__ */ u("span", {
69
70
  className: "text-text-secondary font-normal ms-1",
70
71
  children: ["— ", r.description]
71
72
  })]
72
73
  })]
73
74
  });
74
75
  }
75
- if (r.enum && r.enum.length > 0) return /* @__PURE__ */ l("div", { children: [
76
- C,
77
- /* @__PURE__ */ l("select", {
76
+ if (r.enum && r.enum.length > 0) return /* @__PURE__ */ u("div", { children: [
77
+ w,
78
+ /* @__PURE__ */ u(i, {
78
79
  id: e,
79
- "aria-label": b,
80
- value: String(d ?? r.default ?? ""),
81
- onChange: (e) => h(e.target.value),
82
- disabled: p,
83
- className: `${w} scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary`,
84
- children: [/* @__PURE__ */ c("option", {
80
+ "aria-label": x,
81
+ value: String(f ?? r.default ?? ""),
82
+ onChange: (e) => g(e.target.value),
83
+ disabled: m,
84
+ className: `${T} scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary`,
85
+ children: [/* @__PURE__ */ l("option", {
85
86
  value: "",
86
- children: m("integrations.schemaForm.select", "Select {{label}}", { label: b.toLowerCase() })
87
- }), n(r.enum).map((e) => /* @__PURE__ */ c("option", {
87
+ children: h("integrations.schemaForm.select", "Select {{label}}", { label: x.toLowerCase() })
88
+ }), n(r.enum).map((e) => /* @__PURE__ */ l("option", {
88
89
  value: e.value,
89
90
  children: e.label
90
91
  }, e.value))]
91
92
  }),
92
- S
93
+ C
93
94
  ] });
94
- if (r.type === "number") return /* @__PURE__ */ l("div", { children: [
95
- C,
96
- /* @__PURE__ */ c("input", {
95
+ if (r.type === "number") return /* @__PURE__ */ u("div", { children: [
96
+ w,
97
+ /* @__PURE__ */ l("input", {
97
98
  id: e,
98
- "aria-label": b,
99
+ "aria-label": x,
99
100
  type: "number",
100
- value: d == null ? "" : String(d),
101
- onChange: (e) => h(e.target.value === "" ? void 0 : Number(e.target.value)),
102
- placeholder: x,
103
- disabled: p,
104
- className: w
101
+ value: f == null ? "" : String(f),
102
+ onChange: (e) => g(e.target.value === "" ? void 0 : Number(e.target.value)),
103
+ placeholder: S,
104
+ disabled: m,
105
+ className: T
105
106
  }),
106
- S
107
+ C
107
108
  ] });
108
109
  if (r.format === "textarea" || r.format === "json") {
109
- let t = !!r.secret && !g, n = typeof d == "string" && d.length > 0;
110
- return t && !u && n && !v ? /* @__PURE__ */ l("div", { children: [
111
- C,
112
- /* @__PURE__ */ l("div", {
110
+ let t = !!r.secret && !_, n = typeof f == "string" && f.length > 0;
111
+ return t && !d && n && !y ? /* @__PURE__ */ u("div", { children: [
112
+ w,
113
+ /* @__PURE__ */ u("div", {
113
114
  className: "flex items-center justify-between gap-2 px-3 py-2 border border-border-subtle rounded-md bg-bg-surface",
114
- children: [/* @__PURE__ */ c("span", {
115
+ children: [/* @__PURE__ */ l("span", {
115
116
  className: "text-sm font-mono text-text-secondary select-none",
116
117
  children: "••••••••••••"
117
- }), /* @__PURE__ */ l("button", {
118
+ }), /* @__PURE__ */ u("button", {
118
119
  type: "button",
119
- onClick: () => _(!0),
120
- disabled: p,
121
- "aria-label": m("integrations.schemaForm.reveal", "Show {{label}}", { label: b }),
120
+ onClick: () => v(!0),
121
+ disabled: m,
122
+ "aria-label": h("integrations.schemaForm.reveal", "Show {{label}}", { label: x }),
122
123
  className: "inline-flex items-center gap-1 text-xs text-primary hover:underline disabled:opacity-50",
123
124
  children: [
124
- /* @__PURE__ */ c(a, { size: 14 }),
125
+ /* @__PURE__ */ l(o, { size: 14 }),
125
126
  " ",
126
- m("integrations.schemaForm.revealToEdit", "Reveal to edit")
127
+ h("integrations.schemaForm.revealToEdit", "Reveal to edit")
127
128
  ]
128
129
  })]
129
130
  }),
130
- S
131
- ] }) : /* @__PURE__ */ l("div", { children: [
132
- C,
133
- /* @__PURE__ */ l("div", {
131
+ C
132
+ ] }) : /* @__PURE__ */ u("div", { children: [
133
+ w,
134
+ /* @__PURE__ */ u("div", {
134
135
  className: "relative",
135
136
  ...r.secret ? { "data-agent-sensitive": "" } : {},
136
- children: [/* @__PURE__ */ c("textarea", {
137
+ children: [/* @__PURE__ */ l("textarea", {
137
138
  id: e,
138
- "aria-label": b,
139
- value: String(d ?? ""),
140
- onChange: (e) => h(e.target.value),
141
- onFocus: () => y(!0),
142
- onBlur: () => y(!1),
143
- placeholder: x,
144
- disabled: p,
139
+ "aria-label": x,
140
+ value: String(f ?? ""),
141
+ onChange: (e) => g(e.target.value),
142
+ onFocus: () => b(!0),
143
+ onBlur: () => b(!1),
144
+ placeholder: S,
145
+ disabled: m,
145
146
  rows: 5,
146
147
  autoComplete: "off",
147
148
  spellCheck: !1,
148
149
  style: t ? { WebkitTextSecurity: "disc" } : void 0,
149
- className: `${w} font-mono ${r.secret ? "pe-10" : ""}`
150
- }), r.secret && /* @__PURE__ */ c("button", {
150
+ className: `${T} font-mono ${r.secret ? "pe-10" : ""}`
151
+ }), r.secret && /* @__PURE__ */ l("button", {
151
152
  type: "button",
152
- onClick: () => _((e) => !e),
153
- "aria-label": g ? m("integrations.schemaForm.hide", "Hide {{label}}", { label: b }) : m("integrations.schemaForm.reveal", "Show {{label}}", { label: b }),
153
+ onClick: () => v((e) => !e),
154
+ "aria-label": _ ? h("integrations.schemaForm.hide", "Hide {{label}}", { label: x }) : h("integrations.schemaForm.reveal", "Show {{label}}", { label: x }),
154
155
  className: "absolute end-2 top-2 text-text-secondary hover:text-text-primary",
155
- children: c(g ? o : a, { size: 16 })
156
+ children: l(_ ? s : o, { size: 16 })
156
157
  })]
157
158
  }),
158
- S
159
+ C
159
160
  ] });
160
161
  }
161
- return /* @__PURE__ */ l("div", { children: [
162
- C,
163
- /* @__PURE__ */ l("div", {
162
+ return /* @__PURE__ */ u("div", { children: [
163
+ w,
164
+ /* @__PURE__ */ u("div", {
164
165
  className: "relative",
165
166
  ...r.secret ? { "data-agent-sensitive": "" } : {},
166
- children: [/* @__PURE__ */ c("input", {
167
+ children: [/* @__PURE__ */ l("input", {
167
168
  id: e,
168
- "aria-label": b,
169
- type: r.secret && !g ? "password" : "text",
170
- value: String(d ?? ""),
171
- onChange: (e) => h(e.target.value),
172
- placeholder: x,
173
- disabled: p,
169
+ "aria-label": x,
170
+ type: r.secret && !_ ? "password" : "text",
171
+ value: String(f ?? ""),
172
+ onChange: (e) => g(e.target.value),
173
+ placeholder: S,
174
+ disabled: m,
174
175
  autoComplete: "off",
175
- className: `${w} ${r.secret ? "font-mono pe-10" : ""}`
176
- }), r.secret && /* @__PURE__ */ c("button", {
176
+ className: `${T} ${r.secret ? "font-mono pe-10" : ""}`
177
+ }), r.secret && /* @__PURE__ */ l("button", {
177
178
  type: "button",
178
- onClick: () => _((e) => !e),
179
- "aria-label": g ? m("integrations.schemaForm.hide", "Hide {{label}}", { label: b }) : m("integrations.schemaForm.reveal", "Show {{label}}", { label: b }),
179
+ onClick: () => v((e) => !e),
180
+ "aria-label": _ ? h("integrations.schemaForm.hide", "Hide {{label}}", { label: x }) : h("integrations.schemaForm.reveal", "Show {{label}}", { label: x }),
180
181
  className: "absolute end-2 top-1/2 -translate-y-1/2 text-text-secondary hover:text-text-primary",
181
- children: c(g ? o : a, { size: 16 })
182
+ children: l(_ ? s : o, { size: 16 })
182
183
  })]
183
184
  }),
184
- S
185
+ C
185
186
  ] });
186
187
  };
187
- export { d as SchemaForm };
188
+ export { f as SchemaForm };