@declarion/react 0.66.1 → 0.80.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.
Files changed (66) hide show
  1. package/README.md +1 -1
  2. package/dist-lib/api/auth.js +24 -14
  3. package/dist-lib/app.js +28 -23
  4. package/dist-lib/components/chrome/AssociationTabs.js +35 -38
  5. package/dist-lib/components/chrome/HighlightsStrip.js +2 -1
  6. package/dist-lib/components/chrome/RecordHeader.js +33 -38
  7. package/dist-lib/components/detail-layout/AssociatedBlock.js +10 -21
  8. package/dist-lib/components/detail-layout/ChildrenBlock.js +1 -8
  9. package/dist-lib/components/detail-layout/ChildrenCards.js +1 -8
  10. package/dist-lib/components/detail-layout/ChildrenList.js +1 -8
  11. package/dist-lib/components/detail-layout/ChildrenTable.js +1 -8
  12. package/dist-lib/components/detail-layout/ChildrenTimeline.js +1 -8
  13. package/dist-lib/components/detail-layout/DetailAuditStrip.js +33 -29
  14. package/dist-lib/components/detail-layout/DetailHighlights.js +7 -2
  15. package/dist-lib/components/detail-layout/FieldsBlock.js +12 -9
  16. package/dist-lib/components/detail-layout/LayoutRenderer.js +10 -10
  17. package/dist-lib/components/detail-layout/LayoutTabs.js +49 -48
  18. package/dist-lib/components/detail-layout/SectionBlock.js +20 -28
  19. package/dist-lib/components/detail-layout/visibility.js +28 -0
  20. package/dist-lib/components/fields/IntArrayField.js +37 -33
  21. package/dist-lib/components/fields/NumberField.js +28 -55
  22. package/dist-lib/components/fields/RichTextField.js +1 -1
  23. package/dist-lib/components/fields/TimestampField.js +50 -89
  24. package/dist-lib/components/fields/cells/factories/date.js +13 -14
  25. package/dist-lib/components/fields/cells/factories/money.js +1 -1
  26. package/dist-lib/components/fields/cells/factories/number.js +4 -4
  27. package/dist-lib/components/file-widgets/DocumentCard.js +1 -1
  28. package/dist-lib/components/file-widgets/Grid.js +153 -152
  29. package/dist-lib/components/file-widgets/ImageWidget.js +90 -91
  30. package/dist-lib/components/file-widgets/LabeledSlots.js +1 -0
  31. package/dist-lib/components/file-widgets/helpers.js +15 -19
  32. package/dist-lib/components/file-widgets/host.js +33 -32
  33. package/dist-lib/components/file-widgets/upload.js +10 -6
  34. package/dist-lib/components/layout/Layout.js +125 -123
  35. package/dist-lib/components/pages/NoScreensPage.impl.js +14 -0
  36. package/dist-lib/components/pages/NoScreensPage.js +12 -0
  37. package/dist-lib/components/pages/SmartDetailPage.impl.js +451 -451
  38. package/dist-lib/components/pages/auth/AuthShell.js +62 -61
  39. package/dist-lib/components/pages/auth/CodeInput.js +63 -0
  40. package/dist-lib/components/pages/auth/SignIn.js +12 -4
  41. package/dist-lib/components/pages/auth/SignUp.impl.js +80 -103
  42. package/dist-lib/components/pages/auth/SignUpCode.js +122 -0
  43. package/dist-lib/components/pages/auth/TwoFA.impl.js +9 -55
  44. package/dist-lib/components/pages/list/cardProjection.js +135 -122
  45. package/dist-lib/components/pages/list/columns.js +58 -43
  46. package/dist-lib/components/pages/profile/Profile.impl.js +87 -104
  47. package/dist-lib/components/pages/tenant-params/TenantParamsPage.impl.js +1 -1
  48. package/dist-lib/components/params/ParamsBlock.js +6 -17
  49. package/dist-lib/components/params/param-editors.js +14 -10
  50. package/dist-lib/components/primitives/Fields.js +314 -236
  51. package/dist-lib/components/shared/MarkdownRenderer.js +44 -43
  52. package/dist-lib/declarion-react.css +1 -1
  53. package/dist-lib/hooks/useActiveTabFollowsRoute.js +49 -0
  54. package/dist-lib/hooks/useAuth.js +44 -37
  55. package/dist-lib/hooks/useDocumentTitle.js +20 -0
  56. package/dist-lib/hooks/useFollowAgentOpen.js +1 -0
  57. package/dist-lib/hooks/useTabTitle.js +1 -1
  58. package/dist-lib/index.d.ts +21 -7
  59. package/dist-lib/lib/date-text.js +57 -0
  60. package/dist-lib/lib/number-text.js +9 -0
  61. package/dist-lib/lib/timestamp.js +29 -29
  62. package/dist-lib/stores/tabs.js +7 -5
  63. package/dist-lib/testing.d.ts +1 -1
  64. package/dist-lib/testing.js +1 -0
  65. package/dist-lib/{useResponsiveMode-DmrpMbZX.d.ts → useResponsiveMode-D3SKz5z4.d.ts} +20 -9
  66. package/package.json +11 -11
@@ -1,15 +1,16 @@
1
- import { Icon as e } from "./Icons.js";
2
- import { Btn as t } from "./Btn.js";
3
- import { IconBtn as n } from "./IconBtn.js";
4
- import { Dropdown as r } from "./Dropdown.js";
5
- import { Chip as i } from "./Chip.js";
6
- import { useText as a } from "../../hooks/useText.js";
7
- import { BoolToggle as o } from "./BoolToggle.js";
8
- import { MenuItem as s } from "./MenuItem.js";
9
- import { useMemo as c, useRef as l, useState as u } from "react";
10
- import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
1
+ import { formatDateText as e, isDateDraft as t, parseDateText as n } from "../../lib/date-text.js";
2
+ import { Icon as r } from "./Icons.js";
3
+ import { Btn as i } from "./Btn.js";
4
+ import { IconBtn as a } from "./IconBtn.js";
5
+ import { Dropdown as o } from "./Dropdown.js";
6
+ import { Chip as s } from "./Chip.js";
7
+ import { useText as c } from "../../hooks/useText.js";
8
+ import { BoolToggle as l } from "./BoolToggle.js";
9
+ import { MenuItem as u } from "./MenuItem.js";
10
+ import { useId as d, useMemo as f, useRef as p, useState as m } from "react";
11
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
11
12
  //#region src/components/primitives/Fields.tsx
12
- var m = ({ children: t, required: n, hint: r, htmlFor: i, id: a }) => /* @__PURE__ */ p("div", {
13
+ var v = ({ children: e, required: t, hint: n, htmlFor: i, id: a }) => /* @__PURE__ */ _("div", {
13
14
  style: {
14
15
  display: "flex",
15
16
  alignItems: "center",
@@ -21,30 +22,30 @@ var m = ({ children: t, required: n, hint: r, htmlFor: i, id: a }) => /* @__PURE
21
22
  letterSpacing: "0.01em"
22
23
  },
23
24
  children: [
24
- i ? /* @__PURE__ */ f("label", {
25
+ i ? /* @__PURE__ */ g("label", {
25
26
  id: a,
26
27
  htmlFor: i,
27
- children: t
28
- }) : /* @__PURE__ */ f("span", {
28
+ children: e
29
+ }) : /* @__PURE__ */ g("span", {
29
30
  id: a,
30
- children: t
31
+ children: e
31
32
  }),
32
- n && /* @__PURE__ */ f("span", {
33
+ t && /* @__PURE__ */ g("span", {
33
34
  "aria-hidden": "true",
34
35
  style: { color: "var(--danger)" },
35
36
  children: "*"
36
37
  }),
37
- r && /* @__PURE__ */ f("span", {
38
- title: r,
38
+ n && /* @__PURE__ */ g("span", {
39
+ title: n,
39
40
  style: {
40
41
  cursor: "help",
41
42
  color: "var(--text-4)",
42
43
  display: "flex"
43
44
  },
44
- children: /* @__PURE__ */ f(e.info, { size: 11 })
45
+ children: /* @__PURE__ */ g(r.info, { size: 11 })
45
46
  })
46
47
  ]
47
- }), h = {
48
+ }), y = {
48
49
  width: "100%",
49
50
  height: "var(--control-height)",
50
51
  padding: "0 10px",
@@ -57,33 +58,37 @@ var m = ({ children: t, required: n, hint: r, htmlFor: i, id: a }) => /* @__PURE
57
58
  outline: "none",
58
59
  transition: "border-color .12s, box-shadow .12s"
59
60
  };
60
- function g({ value: e, onChange: t, placeholder: n, prefix: r, suffix: i, style: a, ...o }) {
61
- let [s, c] = u(!1);
62
- return /* @__PURE__ */ p("div", {
61
+ function b({ value: e, onChange: t, placeholder: n, prefix: r, suffix: i, style: a, onFocus: o, onBlur: s, ...c }) {
62
+ let [l, u] = m(!1);
63
+ return /* @__PURE__ */ _("div", {
63
64
  style: {
64
65
  display: "flex",
65
66
  alignItems: "center",
66
67
  gap: 6,
67
- ...h,
68
+ ...y,
68
69
  padding: r || i ? "0 8px" : "0 10px",
69
- borderColor: s ? "var(--accent)" : "var(--border)",
70
- boxShadow: s ? "0 0 0 3px var(--accent-ring)" : "none",
70
+ borderColor: l ? "var(--accent)" : "var(--border)",
71
+ boxShadow: l ? "0 0 0 3px var(--accent-ring)" : "none",
71
72
  ...a
72
73
  },
73
74
  children: [
74
- r && /* @__PURE__ */ f("span", {
75
+ r && /* @__PURE__ */ g("span", {
75
76
  style: {
76
77
  color: "var(--text-3)",
77
78
  display: "flex"
78
79
  },
79
80
  children: r
80
81
  }),
81
- /* @__PURE__ */ f("input", {
82
+ /* @__PURE__ */ g("input", {
82
83
  value: e ?? "",
83
84
  onChange: (e) => t?.(e.target.value),
84
85
  placeholder: n,
85
- onFocus: () => c(!0),
86
- onBlur: () => c(!1),
86
+ onFocus: (e) => {
87
+ u(!0), o?.(e);
88
+ },
89
+ onBlur: (e) => {
90
+ u(!1), s?.(e);
91
+ },
87
92
  style: {
88
93
  border: 0,
89
94
  outline: 0,
@@ -94,9 +99,9 @@ function g({ value: e, onChange: t, placeholder: n, prefix: r, suffix: i, style:
94
99
  padding: 0,
95
100
  minWidth: 0
96
101
  },
97
- ...o
102
+ ...c
98
103
  }),
99
- i && /* @__PURE__ */ f("span", {
104
+ i && /* @__PURE__ */ g("span", {
100
105
  style: {
101
106
  color: "var(--text-3)",
102
107
  display: "flex"
@@ -106,8 +111,8 @@ function g({ value: e, onChange: t, placeholder: n, prefix: r, suffix: i, style:
106
111
  ]
107
112
  });
108
113
  }
109
- function _({ value: e, onChange: t, placeholder: n, rows: r = 4, fill: i, id: a, name: o, ariaRequired: s }) {
110
- let [c, l] = u(!1), d = i ? {
114
+ function x({ value: e, onChange: t, placeholder: n, rows: r = 4, fill: i, id: a, name: o, ariaRequired: s }) {
115
+ let [c, l] = m(!1), u = i ? {
111
116
  flex: 1,
112
117
  height: "100%",
113
118
  minHeight: 0,
@@ -116,7 +121,7 @@ function _({ value: e, onChange: t, placeholder: n, rows: r = 4, fill: i, id: a,
116
121
  height: "auto",
117
122
  resize: "vertical"
118
123
  };
119
- return /* @__PURE__ */ f("textarea", {
124
+ return /* @__PURE__ */ g("textarea", {
120
125
  id: a,
121
126
  name: o,
122
127
  "aria-required": s || void 0,
@@ -127,55 +132,55 @@ function _({ value: e, onChange: t, placeholder: n, rows: r = 4, fill: i, id: a,
127
132
  onFocus: () => l(!0),
128
133
  onBlur: () => l(!1),
129
134
  style: {
130
- ...h,
135
+ ...y,
131
136
  padding: "8px 10px",
132
137
  lineHeight: 1.5,
133
- ...d,
138
+ ...u,
134
139
  borderColor: c ? "var(--accent)" : "var(--border)",
135
140
  boxShadow: c ? "0 0 0 3px var(--accent-ring)" : "none",
136
141
  fontFamily: "inherit"
137
142
  }
138
143
  });
139
144
  }
140
- var v = 20, y = 100;
141
- function b(e) {
145
+ var S = 20, C = 100;
146
+ function w(e) {
142
147
  return typeof e.label == "string" || typeof e.label == "number" ? String(e.label) : e.value;
143
148
  }
144
- function x({ value: t, options: n, onChange: i, placeholder: o, onSearchChange: m, ..._ }) {
145
- let x = a(), [S, C] = u(!1), [w, T] = u(""), E = l(null), D = n.find((e) => !e.heading && !e.divider && e.value === t), O = n.filter((e) => !e.heading && !e.divider).length, k = !!m, A = k || O > v, j = (e) => {
146
- T(e), m?.(e);
147
- }, M = c(() => {
148
- if (k) return n.slice(0, y);
149
- let e = w.trim().toLowerCase();
150
- return e ? n.filter((t) => !t.heading && !t.divider && b(t).toLowerCase().includes(e)).slice(0, y) : n.slice(0, y);
149
+ function T({ value: e, options: t, onChange: n, placeholder: i, onSearchChange: a, ...s }) {
150
+ let l = c(), [d, v] = m(!1), [x, T] = m(""), E = p(null), D = t.find((t) => !t.heading && !t.divider && t.value === e), O = t.filter((e) => !e.heading && !e.divider).length, k = !!a, A = k || O > S, j = (e) => {
151
+ T(e), a?.(e);
152
+ }, M = f(() => {
153
+ if (k) return t.slice(0, C);
154
+ let e = x.trim().toLowerCase();
155
+ return e ? t.filter((t) => !t.heading && !t.divider && w(t).toLowerCase().includes(e)).slice(0, C) : t.slice(0, C);
151
156
  }, [
152
- n,
153
- w,
157
+ t,
158
+ x,
154
159
  k
155
160
  ]);
156
- return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ p("button", {
157
- ..._,
161
+ return /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _("button", {
162
+ ...s,
158
163
  type: "button",
159
164
  ref: E,
160
165
  "aria-haspopup": "listbox",
161
- "aria-expanded": S,
166
+ "aria-expanded": d,
162
167
  onClick: () => {
163
- C((e) => {
168
+ v((e) => {
164
169
  let t = !e;
165
170
  return t && j(""), t;
166
171
  });
167
172
  },
168
173
  style: {
169
- ...h,
174
+ ...y,
170
175
  display: "flex",
171
176
  alignItems: "center",
172
177
  justifyContent: "space-between",
173
178
  textAlign: "left",
174
179
  cursor: "pointer",
175
- ..._.style,
180
+ ...s.style,
176
181
  color: D ? "var(--text)" : "var(--text-placeholder)"
177
182
  },
178
- children: [/* @__PURE__ */ f("span", {
183
+ children: [/* @__PURE__ */ g("span", {
179
184
  style: {
180
185
  display: "flex",
181
186
  alignItems: "center",
@@ -184,8 +189,8 @@ function x({ value: t, options: n, onChange: i, placeholder: o, onSearchChange:
184
189
  textOverflow: "ellipsis",
185
190
  whiteSpace: "nowrap"
186
191
  },
187
- children: D ? D.label : o ?? x("control.select.placeholder", "Select…")
188
- }), /* @__PURE__ */ f(e.down, {
192
+ children: D ? D.label : i ?? l("control.select.placeholder", "Select…")
193
+ }), /* @__PURE__ */ g(r.down, {
189
194
  size: 12,
190
195
  cls: "",
191
196
  style: {
@@ -193,17 +198,17 @@ function x({ value: t, options: n, onChange: i, placeholder: o, onSearchChange:
193
198
  flexShrink: 0
194
199
  }
195
200
  })]
196
- }), /* @__PURE__ */ p(r, {
197
- open: S,
201
+ }), /* @__PURE__ */ _(o, {
202
+ open: d,
198
203
  anchor: E.current,
199
- onClose: () => C(!1),
204
+ onClose: () => v(!1),
200
205
  width: E.current?.offsetWidth,
201
206
  style: {
202
207
  maxHeight: "min(360px, calc(var(--app-height) - 24px))",
203
208
  overflowY: "auto"
204
209
  },
205
210
  children: [
206
- A && /* @__PURE__ */ f("div", {
211
+ A && /* @__PURE__ */ g("div", {
207
212
  style: {
208
213
  padding: 6,
209
214
  position: "sticky",
@@ -211,18 +216,18 @@ function x({ value: t, options: n, onChange: i, placeholder: o, onSearchChange:
211
216
  background: "var(--surface)",
212
217
  zIndex: 1
213
218
  },
214
- children: /* @__PURE__ */ f(g, {
215
- value: w,
219
+ children: /* @__PURE__ */ g(b, {
220
+ value: x,
216
221
  onChange: j,
217
- placeholder: x("control.search", "Search…"),
218
- prefix: /* @__PURE__ */ f(e.search, { size: 12 }),
222
+ placeholder: l("control.search", "Search…"),
223
+ prefix: /* @__PURE__ */ g(r.search, { size: 12 }),
219
224
  autoFocus: !0
220
225
  })
221
226
  }),
222
- M.map((e, n) => e.divider ? /* @__PURE__ */ f("div", { style: {
227
+ M.map((t, r) => t.divider ? /* @__PURE__ */ g("div", { style: {
223
228
  borderTop: "1px solid var(--divider)",
224
229
  margin: "4px 0"
225
- } }, `divider-${n}`) : e.heading ? /* @__PURE__ */ f("div", {
230
+ } }, `divider-${r}`) : t.heading ? /* @__PURE__ */ g("div", {
226
231
  style: {
227
232
  padding: "6px 10px 2px",
228
233
  fontSize: 10.5,
@@ -231,47 +236,47 @@ function x({ value: t, options: n, onChange: i, placeholder: o, onSearchChange:
231
236
  textTransform: "uppercase",
232
237
  letterSpacing: "0.06em"
233
238
  },
234
- children: e.label
235
- }, `heading-${n}`) : /* @__PURE__ */ f(s, {
239
+ children: t.label
240
+ }, `heading-${r}`) : /* @__PURE__ */ g(u, {
236
241
  onClick: () => {
237
- i(e.value), C(!1);
242
+ n(t.value), v(!1);
238
243
  },
239
- active: e.value === t,
240
- children: e.label
241
- }, e.value)),
242
- M.length === 0 && /* @__PURE__ */ f("div", {
244
+ active: t.value === e,
245
+ children: t.label
246
+ }, t.value)),
247
+ M.length === 0 && /* @__PURE__ */ g("div", {
243
248
  style: {
244
249
  padding: "8px 10px",
245
250
  fontSize: 12.5,
246
251
  color: "var(--text-3)"
247
252
  },
248
- children: x("control.no_matches", "No matches")
253
+ children: l("control.no_matches", "No matches")
249
254
  })
250
255
  ]
251
256
  })] });
252
257
  }
253
- function S({ value: t = [], options: n, onChange: i, placeholder: o, ...m }) {
254
- let _ = a(), [x, S] = u(!1), [C, w] = u(""), T = l(null), E = n.filter((e) => !e.heading && !e.divider), D = E.length > v, O = t.map((e) => E.find((t) => t.value === e) ?? {
258
+ function E({ value: e = [], options: t, onChange: n, placeholder: i, ...a }) {
259
+ let s = c(), [l, d] = m(!1), [v, x] = m(""), T = p(null), E = t.filter((e) => !e.heading && !e.divider), D = E.length > S, O = e.map((e) => E.find((t) => t.value === e) ?? {
255
260
  value: e,
256
261
  label: e
257
- }), k = c(() => {
258
- let e = C.trim().toLowerCase();
259
- return e ? n.filter((t) => !t.heading && !t.divider && b(t).toLowerCase().includes(e)).slice(0, y) : n.slice(0, y);
260
- }, [n, C]), A = (e) => i(t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
261
- return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ p("button", {
262
- ...m,
262
+ }), k = f(() => {
263
+ let e = v.trim().toLowerCase();
264
+ return e ? t.filter((t) => !t.heading && !t.divider && w(t).toLowerCase().includes(e)).slice(0, C) : t.slice(0, C);
265
+ }, [t, v]), A = (t) => n(e.includes(t) ? e.filter((e) => e !== t) : [...e, t]);
266
+ return /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _("button", {
267
+ ...a,
263
268
  type: "button",
264
269
  ref: T,
265
270
  "aria-haspopup": "listbox",
266
- "aria-expanded": x,
271
+ "aria-expanded": l,
267
272
  onClick: () => {
268
- S((e) => {
273
+ d((e) => {
269
274
  let t = !e;
270
- return t && w(""), t;
275
+ return t && x(""), t;
271
276
  });
272
277
  },
273
278
  style: {
274
- ...h,
279
+ ...y,
275
280
  height: "auto",
276
281
  minHeight: "var(--control-height)",
277
282
  display: "flex",
@@ -281,15 +286,15 @@ function S({ value: t = [], options: n, onChange: i, placeholder: o, ...m }) {
281
286
  padding: O.length ? "3px 8px" : "0 10px",
282
287
  textAlign: "left",
283
288
  cursor: "pointer",
284
- ...m.style
289
+ ...a.style
285
290
  },
286
- children: [O.length === 0 ? /* @__PURE__ */ f("span", {
291
+ children: [O.length === 0 ? /* @__PURE__ */ g("span", {
287
292
  style: {
288
293
  flex: 1,
289
294
  color: "var(--text-placeholder)"
290
295
  },
291
- children: o ?? _("control.select.placeholder", "Select…")
292
- }) : O.map((t) => /* @__PURE__ */ p("span", {
296
+ children: i ?? s("control.select.placeholder", "Select…")
297
+ }) : O.map((e) => /* @__PURE__ */ _("span", {
293
298
  style: {
294
299
  display: "inline-flex",
295
300
  alignItems: "center",
@@ -303,18 +308,18 @@ function S({ value: t = [], options: n, onChange: i, placeholder: o, ...m }) {
303
308
  color: "var(--text-2)",
304
309
  maxWidth: "100%"
305
310
  },
306
- children: [/* @__PURE__ */ f("span", {
311
+ children: [/* @__PURE__ */ g("span", {
307
312
  style: {
308
313
  overflow: "hidden",
309
314
  textOverflow: "ellipsis",
310
315
  whiteSpace: "nowrap"
311
316
  },
312
- children: t.label
313
- }), /* @__PURE__ */ f("span", {
317
+ children: e.label
318
+ }), /* @__PURE__ */ g("span", {
314
319
  role: "button",
315
- "aria-label": _("control.remove_value", "Remove {value}", { value: b(t) }),
316
- onClick: (e) => {
317
- e.stopPropagation(), A(t.value);
320
+ "aria-label": s("control.remove_value", "Remove {value}", { value: w(e) }),
321
+ onClick: (t) => {
322
+ t.stopPropagation(), A(e.value);
318
323
  },
319
324
  style: {
320
325
  display: "flex",
@@ -322,9 +327,9 @@ function S({ value: t = [], options: n, onChange: i, placeholder: o, ...m }) {
322
327
  cursor: "pointer",
323
328
  flexShrink: 0
324
329
  },
325
- children: /* @__PURE__ */ f(e.x, { size: 12 })
330
+ children: /* @__PURE__ */ g(r.x, { size: 12 })
326
331
  })]
327
- }, t.value)), /* @__PURE__ */ f(e.down, {
332
+ }, e.value)), /* @__PURE__ */ g(r.down, {
328
333
  size: 12,
329
334
  cls: "",
330
335
  style: {
@@ -333,17 +338,17 @@ function S({ value: t = [], options: n, onChange: i, placeholder: o, ...m }) {
333
338
  flexShrink: 0
334
339
  }
335
340
  })]
336
- }), /* @__PURE__ */ p(r, {
337
- open: x,
341
+ }), /* @__PURE__ */ _(o, {
342
+ open: l,
338
343
  anchor: T.current,
339
- onClose: () => S(!1),
344
+ onClose: () => d(!1),
340
345
  width: T.current?.offsetWidth,
341
346
  style: {
342
347
  maxHeight: "min(360px, calc(var(--app-height) - 24px))",
343
348
  overflowY: "auto"
344
349
  },
345
350
  children: [
346
- D && /* @__PURE__ */ f("div", {
351
+ D && /* @__PURE__ */ g("div", {
347
352
  style: {
348
353
  padding: 6,
349
354
  position: "sticky",
@@ -351,20 +356,20 @@ function S({ value: t = [], options: n, onChange: i, placeholder: o, ...m }) {
351
356
  background: "var(--surface)",
352
357
  zIndex: 1
353
358
  },
354
- children: /* @__PURE__ */ f(g, {
355
- value: C,
356
- onChange: w,
357
- placeholder: _("control.search", "Search…"),
358
- prefix: /* @__PURE__ */ f(e.search, { size: 12 }),
359
+ children: /* @__PURE__ */ g(b, {
360
+ value: v,
361
+ onChange: x,
362
+ placeholder: s("control.search", "Search…"),
363
+ prefix: /* @__PURE__ */ g(r.search, { size: 12 }),
359
364
  autoFocus: !0
360
365
  })
361
366
  }),
362
- k.map((n, r) => {
363
- if (n.divider) return /* @__PURE__ */ f("div", { style: {
367
+ k.map((t, n) => {
368
+ if (t.divider) return /* @__PURE__ */ g("div", { style: {
364
369
  borderTop: "1px solid var(--divider)",
365
370
  margin: "4px 0"
366
- } }, `divider-${r}`);
367
- if (n.heading) return /* @__PURE__ */ f("div", {
371
+ } }, `divider-${n}`);
372
+ if (t.heading) return /* @__PURE__ */ g("div", {
368
373
  style: {
369
374
  padding: "6px 10px 2px",
370
375
  fontSize: 10.5,
@@ -373,70 +378,143 @@ function S({ value: t = [], options: n, onChange: i, placeholder: o, ...m }) {
373
378
  textTransform: "uppercase",
374
379
  letterSpacing: "0.06em"
375
380
  },
376
- children: n.label
377
- }, `heading-${r}`);
378
- let i = t.includes(n.value);
379
- return /* @__PURE__ */ f(s, {
381
+ children: t.label
382
+ }, `heading-${n}`);
383
+ let i = e.includes(t.value);
384
+ return /* @__PURE__ */ g(u, {
380
385
  active: i,
381
- icon: i ? /* @__PURE__ */ f(e.check, { size: 13 }) : /* @__PURE__ */ f("span", { style: {
386
+ icon: i ? /* @__PURE__ */ g(r.check, { size: 13 }) : /* @__PURE__ */ g("span", { style: {
382
387
  display: "inline-block",
383
388
  width: 13
384
389
  } }),
385
- onClick: () => A(n.value),
386
- children: n.label
387
- }, n.value);
390
+ onClick: () => A(t.value),
391
+ children: t.label
392
+ }, t.value);
388
393
  }),
389
- k.length === 0 && /* @__PURE__ */ f("div", {
394
+ k.length === 0 && /* @__PURE__ */ g("div", {
390
395
  style: {
391
396
  padding: "8px 10px",
392
397
  fontSize: 12.5,
393
398
  color: "var(--text-3)"
394
399
  },
395
- children: _("control.no_matches", "No matches")
400
+ children: s("control.no_matches", "No matches")
396
401
  })
397
402
  ]
398
403
  })] });
399
404
  }
400
- function C({ value: t, onChange: n }) {
401
- let r = a();
402
- return /* @__PURE__ */ f(g, {
403
- value: t || "",
404
- onChange: n,
405
- placeholder: r("control.date.placeholder", "YYYY-MM-DD HH:mm"),
406
- prefix: /* @__PURE__ */ f(e.calendar, { size: 13 })
405
+ function D({ kind: i, value: o, onChange: s, id: l, name: u, ariaRequired: f }) {
406
+ let h = c(), v = `${d()}-error`, y = p(null), x = o ? e(i, o) : "", [S, C] = m(x), [w, T] = m(o), [E, D] = m(!1);
407
+ o !== w && (T(o), (o === null ? S !== "" : n(i, S) !== (o || null)) && (C(x), D(!1)));
408
+ let O = i === "date" ? {
409
+ placeholder: h("control.date.placeholder", "DD-MM-YYYY"),
410
+ invalid: h("control.date.invalid", "Enter the date as DD-MM-YYYY.")
411
+ } : {
412
+ placeholder: h("control.datetime.placeholder", "DD-MM-YYYY HH:mm"),
413
+ invalid: h("control.datetime.invalid", "Enter the date and time as DD-MM-YYYY HH:mm.")
414
+ }, k = h("control.date.pick", "Choose a date");
415
+ return /* @__PURE__ */ _("div", {
416
+ style: {
417
+ display: "flex",
418
+ flexDirection: "column",
419
+ gap: 4
420
+ },
421
+ children: [/* @__PURE__ */ g(b, {
422
+ id: l,
423
+ name: u,
424
+ "aria-required": f || void 0,
425
+ "aria-invalid": E || void 0,
426
+ "aria-describedby": E ? v : void 0,
427
+ type: "text",
428
+ inputMode: i === "date" ? "numeric" : void 0,
429
+ autoComplete: "off",
430
+ placeholder: O.placeholder,
431
+ value: S,
432
+ onChange: (e) => {
433
+ t(e) && (C(e), D(!1), s(e.trim() === "" ? null : n(i, e), e));
434
+ },
435
+ onBlur: () => {
436
+ if (S.trim() === "") return;
437
+ let t = n(i, S);
438
+ t ? C(e(i, t)) : D(!0);
439
+ },
440
+ suffix: /* @__PURE__ */ _("span", {
441
+ style: {
442
+ position: "relative",
443
+ display: "flex"
444
+ },
445
+ children: [/* @__PURE__ */ g(a, {
446
+ icon: /* @__PURE__ */ g(r.calendar, { size: 13 }),
447
+ title: k,
448
+ size: 22,
449
+ onClick: () => {
450
+ let e = y.current;
451
+ if (e) try {
452
+ e.showPicker();
453
+ } catch {
454
+ e.focus(), e.click();
455
+ }
456
+ }
457
+ }), /* @__PURE__ */ g("input", {
458
+ ref: y,
459
+ type: i === "date" ? "date" : "datetime-local",
460
+ tabIndex: -1,
461
+ "aria-hidden": "true",
462
+ value: o ?? "",
463
+ onChange: (t) => {
464
+ let n = t.target.value, r = n ? e(i, n) : "";
465
+ C(r), D(!1), s(n || null, r);
466
+ },
467
+ style: {
468
+ position: "absolute",
469
+ inset: 0,
470
+ width: "100%",
471
+ height: "100%",
472
+ opacity: 0,
473
+ pointerEvents: "none",
474
+ border: 0,
475
+ padding: 0
476
+ }
477
+ })]
478
+ })
479
+ }), E && /* @__PURE__ */ g("span", {
480
+ id: v,
481
+ role: "alert",
482
+ className: "text-xs text-destructive",
483
+ children: O.invalid
484
+ })]
407
485
  });
408
486
  }
409
- function w(e) {
487
+ function O(e) {
410
488
  if (!e) return 0;
411
489
  let t = 0;
412
490
  return e.length >= 8 && t++, e.length >= 12 && t++, /[A-Z]/.test(e) && /[a-z]/.test(e) && t++, /\d/.test(e) && t++, /[^A-Za-z0-9]/.test(e) && t++, Math.min(4, t);
413
491
  }
414
- var T = [
492
+ var k = [
415
493
  (e) => e("control.password.strength.too_short", "Too short"),
416
494
  (e) => e("control.password.strength.weak", "Weak"),
417
495
  (e) => e("control.password.strength.fair", "Fair"),
418
496
  (e) => e("control.password.strength.good", "Good"),
419
497
  (e) => e("control.password.strength.strong", "Strong")
420
- ], E = [
498
+ ], A = [
421
499
  "var(--danger)",
422
500
  "var(--danger)",
423
501
  "var(--warning, #B45309)",
424
502
  "var(--accent)",
425
503
  "var(--success, #3FBF8F)"
426
504
  ];
427
- function D({ value: t, onChange: n, placeholder: r, showStrength: i, id: o, name: s, ariaRequired: c }) {
428
- let l = a(), [d, m] = u(!1), h = t || "", _ = w(h);
429
- return /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f(g, {
430
- id: o,
431
- name: s,
432
- "aria-required": c || void 0,
433
- type: d ? "text" : "password",
434
- value: h,
435
- onChange: n,
436
- placeholder: r ?? l("control.password.placeholder", "Enter password"),
437
- suffix: /* @__PURE__ */ f("button", {
505
+ function j({ value: e, onChange: t, placeholder: n, showStrength: i, id: a, name: o, ariaRequired: s }) {
506
+ let l = c(), [u, d] = m(!1), f = e || "", p = O(f);
507
+ return /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g(b, {
508
+ id: a,
509
+ name: o,
510
+ "aria-required": s || void 0,
511
+ type: u ? "text" : "password",
512
+ value: f,
513
+ onChange: t,
514
+ placeholder: n ?? l("control.password.placeholder", "Enter password"),
515
+ suffix: /* @__PURE__ */ g("button", {
438
516
  type: "button",
439
- "aria-label": d ? l("control.password.hide", "Hide password") : l("control.password.show", "Show password"),
517
+ "aria-label": u ? l("control.password.hide", "Hide password") : l("control.password.show", "Show password"),
440
518
  style: {
441
519
  background: "none",
442
520
  border: 0,
@@ -445,17 +523,17 @@ function D({ value: t, onChange: n, placeholder: r, showStrength: i, id: o, name
445
523
  color: "var(--text-3)",
446
524
  display: "flex"
447
525
  },
448
- onClick: () => m((e) => !e),
449
- children: f(d ? e.eyeOff : e.eye, { size: 14 })
526
+ onClick: () => d((e) => !e),
527
+ children: g(u ? r.eyeOff : r.eye, { size: 14 })
450
528
  })
451
- }), i && /* @__PURE__ */ p("div", {
529
+ }), i && /* @__PURE__ */ _("div", {
452
530
  style: {
453
531
  marginTop: 6,
454
532
  display: "flex",
455
533
  alignItems: "center",
456
534
  gap: 8
457
535
  },
458
- children: [/* @__PURE__ */ f("div", {
536
+ children: [/* @__PURE__ */ g("div", {
459
537
  style: {
460
538
  display: "flex",
461
539
  gap: 3,
@@ -466,29 +544,29 @@ function D({ value: t, onChange: n, placeholder: r, showStrength: i, id: o, name
466
544
  1,
467
545
  2,
468
546
  3
469
- ].map((e) => /* @__PURE__ */ f("span", { style: {
547
+ ].map((e) => /* @__PURE__ */ g("span", { style: {
470
548
  flex: 1,
471
549
  height: 3,
472
550
  borderRadius: 999,
473
- background: e < _ ? E[_] : "var(--surface-3)",
551
+ background: e < p ? A[p] : "var(--surface-3)",
474
552
  transition: "background .15s"
475
553
  } }, e))
476
- }), /* @__PURE__ */ f("span", {
554
+ }), /* @__PURE__ */ g("span", {
477
555
  style: {
478
556
  fontSize: 10.5,
479
557
  color: "var(--text-3)",
480
558
  minWidth: 54,
481
559
  textAlign: "right"
482
560
  },
483
- children: h ? T[_](l) : ""
561
+ children: f ? k[p](l) : ""
484
562
  })]
485
563
  })] });
486
564
  }
487
- function O({ value: e = [], onChange: t }) {
488
- let n = a(), [r, o] = u("");
489
- return /* @__PURE__ */ p("div", {
565
+ function M({ value: e = [], onChange: t }) {
566
+ let n = c(), [r, i] = m("");
567
+ return /* @__PURE__ */ _("div", {
490
568
  style: {
491
- ...h,
569
+ ...y,
492
570
  height: "auto",
493
571
  minHeight: "var(--control-height)",
494
572
  display: "flex",
@@ -497,15 +575,15 @@ function O({ value: e = [], onChange: t }) {
497
575
  padding: "4px 6px",
498
576
  alignItems: "center"
499
577
  },
500
- children: [e.map((n, r) => /* @__PURE__ */ f(i, {
578
+ children: [e.map((n, r) => /* @__PURE__ */ g(s, {
501
579
  tone: "slate",
502
580
  onRemove: () => t(e.filter((e, t) => t !== r)),
503
581
  children: n
504
- }, r)), /* @__PURE__ */ f("input", {
582
+ }, r)), /* @__PURE__ */ g("input", {
505
583
  value: r,
506
- onChange: (e) => o(e.target.value),
584
+ onChange: (e) => i(e.target.value),
507
585
  onKeyDown: (n) => {
508
- n.key === "Enter" && r.trim() && (t([...e, r.trim()]), o(""), n.preventDefault()), n.key === "Backspace" && !r && e.length && t(e.slice(0, -1));
586
+ n.key === "Enter" && r.trim() && (t([...e, r.trim()]), i(""), n.preventDefault()), n.key === "Backspace" && !r && e.length && t(e.slice(0, -1));
509
587
  },
510
588
  placeholder: e.length ? "" : n("control.tags.placeholder", "Add tag… (Enter)"),
511
589
  style: {
@@ -520,17 +598,17 @@ function O({ value: e = [], onChange: t }) {
520
598
  })]
521
599
  });
522
600
  }
523
- var k = "JSON";
524
- function A({ value: e, onChange: n }) {
525
- let r = a();
526
- return /* @__PURE__ */ p("div", {
601
+ var N = "JSON";
602
+ function P({ value: e, onChange: t }) {
603
+ let n = c();
604
+ return /* @__PURE__ */ _("div", {
527
605
  style: {
528
606
  border: "1px solid var(--border)",
529
607
  borderRadius: "var(--radius-md)",
530
608
  background: "var(--surface-2)",
531
609
  overflow: "hidden"
532
610
  },
533
- children: [/* @__PURE__ */ p("div", {
611
+ children: [/* @__PURE__ */ _("div", {
534
612
  style: {
535
613
  padding: "6px 10px",
536
614
  background: "var(--surface-3)",
@@ -540,7 +618,7 @@ function A({ value: e, onChange: n }) {
540
618
  gap: 8
541
619
  },
542
620
  children: [
543
- /* @__PURE__ */ f("span", {
621
+ /* @__PURE__ */ g("span", {
544
622
  className: "mono",
545
623
  style: {
546
624
  fontSize: 10.5,
@@ -548,24 +626,24 @@ function A({ value: e, onChange: n }) {
548
626
  textTransform: "uppercase",
549
627
  letterSpacing: "0.04em"
550
628
  },
551
- children: k
629
+ children: N
552
630
  }),
553
- /* @__PURE__ */ f("span", { style: { flex: 1 } }),
554
- /* @__PURE__ */ f(t, {
631
+ /* @__PURE__ */ g("span", { style: { flex: 1 } }),
632
+ /* @__PURE__ */ g(i, {
555
633
  size: "xs",
556
634
  kind: "ghost",
557
- children: r("control.json.format", "Format")
635
+ children: n("control.json.format", "Format")
558
636
  }),
559
- /* @__PURE__ */ f(t, {
637
+ /* @__PURE__ */ g(i, {
560
638
  size: "xs",
561
639
  kind: "ghost",
562
- children: r("control.json.validate", "Validate")
640
+ children: n("control.json.validate", "Validate")
563
641
  })
564
642
  ]
565
- }), /* @__PURE__ */ f("textarea", {
643
+ }), /* @__PURE__ */ g("textarea", {
566
644
  className: "mono",
567
645
  value: e || "",
568
- onChange: (e) => n?.(e.target.value),
646
+ onChange: (e) => t?.(e.target.value),
569
647
  style: {
570
648
  width: "100%",
571
649
  minHeight: 140,
@@ -581,31 +659,31 @@ function A({ value: e, onChange: n }) {
581
659
  })]
582
660
  });
583
661
  }
584
- function j({ value: t, entity: n = "company", onChange: i, items: o = [], id: c, ariaLabelledby: m, ariaRequired: _ }) {
585
- let v = a(), [y, b] = u(!1), x = l(null);
586
- return /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ p("button", {
662
+ function F({ value: e, entity: t = "company", onChange: n, items: i = [], id: a, ariaLabelledby: s, ariaRequired: l }) {
663
+ let d = c(), [f, v] = m(!1), x = p(null);
664
+ return /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _("button", {
587
665
  type: "button",
588
- id: c,
589
- "aria-labelledby": m,
590
- "aria-required": _ || void 0,
666
+ id: a,
667
+ "aria-labelledby": s,
668
+ "aria-required": l || void 0,
591
669
  ref: x,
592
- onClick: () => b(!0),
670
+ onClick: () => v(!0),
593
671
  style: {
594
- ...h,
672
+ ...y,
595
673
  display: "flex",
596
674
  alignItems: "center",
597
675
  justifyContent: "space-between",
598
676
  textAlign: "left",
599
677
  cursor: "pointer"
600
678
  },
601
- children: [/* @__PURE__ */ p("span", {
679
+ children: [/* @__PURE__ */ _("span", {
602
680
  style: {
603
681
  display: "flex",
604
682
  alignItems: "center",
605
683
  gap: 8,
606
684
  overflow: "hidden"
607
685
  },
608
- children: [/* @__PURE__ */ f("span", {
686
+ children: [/* @__PURE__ */ g("span", {
609
687
  style: {
610
688
  width: 18,
611
689
  height: 18,
@@ -616,39 +694,39 @@ function j({ value: t, entity: n = "company", onChange: i, items: o = [], id: c,
616
694
  alignItems: "center",
617
695
  justifyContent: "center"
618
696
  },
619
- children: /* @__PURE__ */ f(e.link, { size: 11 })
620
- }), /* @__PURE__ */ f("span", {
621
- style: { color: t ? "var(--accent)" : "var(--text-placeholder)" },
622
- children: t || v("control.ref.link_to", "Link to {entity}…", { entity: n })
697
+ children: /* @__PURE__ */ g(r.link, { size: 11 })
698
+ }), /* @__PURE__ */ g("span", {
699
+ style: { color: e ? "var(--accent)" : "var(--text-placeholder)" },
700
+ children: e || d("control.ref.link_to", "Link to {entity}…", { entity: t })
623
701
  })]
624
- }), /* @__PURE__ */ f(e.search, {
702
+ }), /* @__PURE__ */ g(r.search, {
625
703
  size: 12,
626
704
  cls: "",
627
705
  style: { color: "var(--text-3)" }
628
706
  })]
629
- }), /* @__PURE__ */ p(r, {
630
- open: y,
707
+ }), /* @__PURE__ */ _(o, {
708
+ open: f,
631
709
  anchor: x.current,
632
- onClose: () => b(!1),
710
+ onClose: () => v(!1),
633
711
  width: x.current?.offsetWidth,
634
- children: [/* @__PURE__ */ f("div", {
712
+ children: [/* @__PURE__ */ g("div", {
635
713
  style: { padding: 4 },
636
- children: /* @__PURE__ */ f(g, {
637
- placeholder: v("control.ref.search", "Search {entity}…", { entity: n }),
638
- prefix: /* @__PURE__ */ f(e.search, { size: 12 }),
714
+ children: /* @__PURE__ */ g(b, {
715
+ placeholder: d("control.ref.search", "Search {entity}…", { entity: t }),
716
+ prefix: /* @__PURE__ */ g(r.search, { size: 12 }),
639
717
  style: { marginBottom: 4 }
640
718
  })
641
- }), o.slice(0, 6).map((t) => /* @__PURE__ */ f(s, {
642
- icon: /* @__PURE__ */ f(e.building, { size: 13 }),
719
+ }), i.slice(0, 6).map((e) => /* @__PURE__ */ g(u, {
720
+ icon: /* @__PURE__ */ g(r.building, { size: 13 }),
643
721
  onClick: () => {
644
- i?.(t.name), b(!1);
722
+ n?.(e.name), v(!1);
645
723
  },
646
- children: t.name
647
- }, t.id))]
724
+ children: e.name
725
+ }, e.id))]
648
726
  })] });
649
727
  }
650
- function M({ label: e, children: t, mono: n, wide: r, empty: i }) {
651
- return /* @__PURE__ */ p("div", {
728
+ function I({ label: e, children: t, mono: n, wide: r, empty: i }) {
729
+ return /* @__PURE__ */ _("div", {
652
730
  style: {
653
731
  display: "flex",
654
732
  flexDirection: r ? "column" : "row",
@@ -656,7 +734,7 @@ function M({ label: e, children: t, mono: n, wide: r, empty: i }) {
656
734
  minHeight: 24,
657
735
  alignItems: "baseline"
658
736
  },
659
- children: [/* @__PURE__ */ f("div", {
737
+ children: [/* @__PURE__ */ g("div", {
660
738
  style: {
661
739
  width: r ? "auto" : 140,
662
740
  flexShrink: 0,
@@ -666,7 +744,7 @@ function M({ label: e, children: t, mono: n, wide: r, empty: i }) {
666
744
  letterSpacing: "0.01em"
667
745
  },
668
746
  children: e
669
- }), /* @__PURE__ */ f("div", {
747
+ }), /* @__PURE__ */ g("div", {
670
748
  className: n ? "mono num" : "num",
671
749
  style: {
672
750
  flex: 1,
@@ -680,50 +758,50 @@ function M({ label: e, children: t, mono: n, wide: r, empty: i }) {
680
758
  })]
681
759
  });
682
760
  }
683
- function N({ value: t, onChange: r, type: i = "text", options: s }) {
684
- let c = a(), [l, m] = u(!1), [h, _] = u(t), v = () => {
685
- h !== void 0 && r?.(h), m(!1);
686
- }, y = () => {
687
- _(t), m(!1);
761
+ function L({ value: e, onChange: t, type: n = "text", options: i }) {
762
+ let o = c(), [s, u] = m(!1), [d, f] = m(e), p = () => {
763
+ d !== void 0 && t?.(d), u(!1);
764
+ }, v = () => {
765
+ f(e), u(!1);
688
766
  };
689
- return l ? /* @__PURE__ */ p("div", {
767
+ return s ? /* @__PURE__ */ _("div", {
690
768
  style: {
691
769
  display: "flex",
692
770
  alignItems: "center",
693
771
  gap: 4
694
772
  },
695
773
  onKeyDown: (e) => {
696
- e.key === "Enter" && v(), e.key === "Escape" && y();
774
+ e.key === "Enter" && p(), e.key === "Escape" && v();
697
775
  },
698
- children: [i === "select" ? /* @__PURE__ */ f(x, {
699
- value: h,
700
- options: s || [],
776
+ children: [n === "select" ? /* @__PURE__ */ g(T, {
777
+ value: d,
778
+ options: i || [],
701
779
  onChange: (e) => {
702
- _(e), r?.(e), m(!1);
780
+ f(e), t?.(e), u(!1);
703
781
  }
704
- }) : i === "bool" ? /* @__PURE__ */ f(o, {
705
- value: h === "true",
782
+ }) : n === "bool" ? /* @__PURE__ */ g(l, {
783
+ value: d === "true",
706
784
  onChange: (e) => {
707
- let t = String(e);
708
- _(t), r?.(t), m(!1);
785
+ let n = String(e);
786
+ f(n), t?.(n), u(!1);
709
787
  }
710
- }) : /* @__PURE__ */ f(g, {
711
- value: h ?? "",
712
- onChange: _,
788
+ }) : /* @__PURE__ */ g(b, {
789
+ value: d ?? "",
790
+ onChange: f,
713
791
  autoFocus: !0
714
- }), i !== "select" && i !== "bool" && /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(n, {
792
+ }), n !== "select" && n !== "bool" && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(a, {
715
793
  size: 24,
716
- icon: /* @__PURE__ */ f(e.check, { size: 13 }),
717
- onClick: v,
718
- title: c("dialog.save", "Save")
719
- }), /* @__PURE__ */ f(n, {
794
+ icon: /* @__PURE__ */ g(r.check, { size: 13 }),
795
+ onClick: p,
796
+ title: o("dialog.save", "Save")
797
+ }), /* @__PURE__ */ g(a, {
720
798
  size: 24,
721
- icon: /* @__PURE__ */ f(e.x, { size: 13 }),
722
- onClick: y,
723
- title: c("dialog.cancel", "Cancel")
799
+ icon: /* @__PURE__ */ g(r.x, { size: 13 }),
800
+ onClick: v,
801
+ title: o("dialog.cancel", "Cancel")
724
802
  })] })]
725
- }) : /* @__PURE__ */ f("div", {
726
- onClick: () => m(!0),
803
+ }) : /* @__PURE__ */ g("div", {
804
+ onClick: () => u(!0),
727
805
  style: {
728
806
  padding: "4px 6px",
729
807
  margin: "-4px -6px",
@@ -741,11 +819,11 @@ function N({ value: t, onChange: r, type: i = "text", options: s }) {
741
819
  onMouseLeave: (e) => {
742
820
  e.currentTarget.style.borderColor = "transparent";
743
821
  },
744
- children: t || /* @__PURE__ */ f("span", {
822
+ children: e || /* @__PURE__ */ g("span", {
745
823
  style: { color: "var(--text-4)" },
746
- children: c("control.click_to_edit", "Click to edit")
824
+ children: o("control.click_to_edit", "Click to edit")
747
825
  })
748
826
  });
749
827
  }
750
828
  //#endregion
751
- export { C as DateInput, m as FieldLabel, A as JsonField, S as MultiSelect, D as PasswordInput, N as QuickEditCell, j as RefField, x as Select, O as TagsInput, _ as TextArea, g as TextInput, M as ViewField };
829
+ export { D as DateInput, v as FieldLabel, P as JsonField, E as MultiSelect, j as PasswordInput, L as QuickEditCell, F as RefField, T as Select, M as TagsInput, x as TextArea, b as TextInput, I as ViewField };