@fiestaboard/ui 5.8.0 → 5.10.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 (50) hide show
  1. package/README.md +2 -2
  2. package/dist/components/chrome/pagination.d.ts +75 -0
  3. package/dist/components/chrome/pagination.js +93 -0
  4. package/dist/components/chrome/pagination.js.map +1 -0
  5. package/dist/components/chrome/top-nav.d.ts +102 -0
  6. package/dist/components/chrome/top-nav.js +91 -0
  7. package/dist/components/chrome/top-nav.js.map +1 -0
  8. package/dist/components/containment/action-card.d.ts +95 -0
  9. package/dist/components/containment/action-card.js +91 -0
  10. package/dist/components/containment/action-card.js.map +1 -0
  11. package/dist/components/containment/card.d.ts +24 -1
  12. package/dist/components/containment/card.js +11 -10
  13. package/dist/components/containment/card.js.map +1 -1
  14. package/dist/components/containment/icon-tile.d.ts +1 -1
  15. package/dist/components/editor/color-picker-content.js +17 -17
  16. package/dist/components/editor/filter-picker-content.js +20 -20
  17. package/dist/components/editor/formatting-picker-content.js +20 -20
  18. package/dist/components/editor/formula/formula-editor-panel.js +184 -184
  19. package/dist/components/editor/formula/formula-editor-panel.js.map +1 -1
  20. package/dist/components/editor/node-views/color-tile-node-view.js +5 -5
  21. package/dist/components/editor/node-views/formula-node-view.js +9 -9
  22. package/dist/components/editor/template-editor-toolbar.js +44 -44
  23. package/dist/components/editor/template-editor.js +23 -23
  24. package/dist/components/editor/toolbar-dropdown.js +6 -6
  25. package/dist/components/editor/variable-picker-content.js +79 -79
  26. package/dist/components/feedback/alert.d.ts +1 -1
  27. package/dist/components/feedback/badge.d.ts +1 -1
  28. package/dist/components/feedback/badge.js +6 -6
  29. package/dist/components/feedback/chip.js +6 -6
  30. package/dist/components/feedback/spinner.d.ts +1 -1
  31. package/dist/components/feedback/status-dot.d.ts +1 -1
  32. package/dist/components/forms/button.d.ts +2 -2
  33. package/dist/components/forms/button.js +6 -6
  34. package/dist/components/forms/field.d.ts +66 -0
  35. package/dist/components/forms/field.js +64 -0
  36. package/dist/components/forms/field.js.map +1 -0
  37. package/dist/components/forms/swatch.d.ts +4 -4
  38. package/dist/components/forms/time-picker.js +24 -24
  39. package/dist/components/forms/toggle-card.d.ts +2 -2
  40. package/dist/components/forms/toggle.d.ts +1 -1
  41. package/dist/components/plugin/plugin-card.js +5 -5
  42. package/dist/components/typography/heading.d.ts +2 -2
  43. package/dist/components/typography/kbd.d.ts +35 -0
  44. package/dist/components/typography/kbd.js +115 -0
  45. package/dist/components/typography/kbd.js.map +1 -0
  46. package/dist/components/typography/text.d.ts +2 -2
  47. package/dist/index.d.ts +5 -0
  48. package/dist/index.js +113 -108
  49. package/dist/theme.css +54 -9
  50. package/package.json +1 -1
@@ -2,13 +2,13 @@
2
2
  import { cn as e } from "../../lib/utils.js";
3
3
  import { Accordion as t, AccordionContent as n, AccordionItem as r, AccordionTrigger as i } from "../containment/accordion.js";
4
4
  import { Badge as a } from "../feedback/badge.js";
5
- import { Input as o } from "../forms/input.js";
6
- import { Box as s } from "../layout/box.js";
7
- import { Flex as c } from "../layout/flex.js";
8
- import { Code as l } from "../typography/code.js";
9
- import { ScrollArea as u } from "../containment/scroll-area.js";
10
- import { Skeleton as d } from "../feedback/skeleton.js";
11
- import { Text as f } from "../typography/text.js";
5
+ import { Text as o } from "../typography/text.js";
6
+ import { Input as s } from "../forms/input.js";
7
+ import { Box as c } from "../layout/box.js";
8
+ import { Flex as l } from "../layout/flex.js";
9
+ import { Code as u } from "../typography/code.js";
10
+ import { ScrollArea as d } from "../containment/scroll-area.js";
11
+ import { Skeleton as f } from "../feedback/skeleton.js";
12
12
  import { Stack as p } from "../layout/stack.js";
13
13
  import { Tooltip as m, TooltipContent as h, TooltipProvider as g, TooltipTrigger as _ } from "../overlays/tooltip.js";
14
14
  import { Search as v } from "lucide-react";
@@ -63,7 +63,7 @@ function F({ label: e, description: t, preview: n, onInsert: r }) {
63
63
  children: /* @__PURE__ */ C("button", {
64
64
  type: "button",
65
65
  onClick: r,
66
- children: [e, n && /* @__PURE__ */ S(f, {
66
+ children: [e, n && /* @__PURE__ */ S(o, {
67
67
  as: "span",
68
68
  tone: "muted",
69
69
  weight: "normal",
@@ -81,9 +81,9 @@ function F({ label: e, description: t, preview: n, onInsert: r }) {
81
81
  children: t
82
82
  })] }) : i;
83
83
  }
84
- function I(e, o, u, d, m, h, g, _, v, y = !1, b) {
84
+ function I(e, s, d, f, m, h, g, _, v, y = !1, b) {
85
85
  if (!m || Object.keys(m).length === 0) return null;
86
- let x = h?.variables?.arrays?.[u]?.sub_arrays?.[d];
86
+ let x = h?.variables?.arrays?.[d]?.sub_arrays?.[f];
87
87
  if (!x) return null;
88
88
  let w = x.item_fields || [], T = x.key_type || "index", E = x.key_field, D = x.label_field, O = (e) => {
89
89
  let t = D && e[D] || E && e[E] || e[w[0]];
@@ -91,15 +91,15 @@ function I(e, o, u, d, m, h, g, _, v, y = !1, b) {
91
91
  }, k = y ? Object.entries(m) : Object.entries(m).filter(([e, t]) => {
92
92
  if (!_.trim()) return !0;
93
93
  let n = T === "dynamic" && E ? String(t[E] ?? e) : e, r = O(t) || n;
94
- return N(d, _) || N(n, _) || N(r, _) || w.some((e) => N(e, _));
94
+ return N(f, _) || N(n, _) || N(r, _) || w.some((e) => N(e, _));
95
95
  });
96
- return k.length === 0 ? null : /* @__PURE__ */ C(s, { children: [/* @__PURE__ */ C(f, {
96
+ return k.length === 0 ? null : /* @__PURE__ */ C(c, { children: [/* @__PURE__ */ C(o, {
97
97
  size: "xs",
98
98
  tone: "muted",
99
99
  className: "mb-1.5 flex items-center gap-1",
100
100
  children: [
101
101
  b && /* @__PURE__ */ S(b, { className: "h-3 w-3" }),
102
- d.charAt(0).toUpperCase() + d.slice(1),
102
+ f.charAt(0).toUpperCase() + f.slice(1),
103
103
  " ",
104
104
  v.itemCount(k.length)
105
105
  ]
@@ -110,18 +110,18 @@ function I(e, o, u, d, m, h, g, _, v, y = !1, b) {
110
110
  children: k.map(([t, m]) => {
111
111
  let h = T === "dynamic" && E ? String(m[E] ?? t) : t, v = O(m) || h, b = y ? w : w.filter((e) => !_.trim() || N(e, _));
112
112
  return b.length === 0 ? null : /* @__PURE__ */ C(r, {
113
- value: `${u}-${o}-${d}-${t}`,
113
+ value: `${d}-${s}-${f}-${t}`,
114
114
  className: "border-b-0",
115
115
  children: [/* @__PURE__ */ S(i, {
116
116
  className: "py-1.5 hover:no-underline text-xs",
117
- children: /* @__PURE__ */ C(c, {
117
+ children: /* @__PURE__ */ C(l, {
118
118
  align: "center",
119
119
  gap: "2",
120
120
  children: [T === "dynamic" && /* @__PURE__ */ S(a, {
121
121
  variant: "outline",
122
122
  className: "text-[10px] font-mono px-1.5",
123
123
  children: h
124
- }), /* @__PURE__ */ S(f, {
124
+ }), /* @__PURE__ */ S(o, {
125
125
  as: "span",
126
126
  size: "xs",
127
127
  className: "text-left",
@@ -131,26 +131,26 @@ function I(e, o, u, d, m, h, g, _, v, y = !1, b) {
131
131
  }), /* @__PURE__ */ S(n, { children: /* @__PURE__ */ C(p, {
132
132
  gap: "2",
133
133
  className: "pt-2 pl-2",
134
- children: [/* @__PURE__ */ S(c, {
134
+ children: [/* @__PURE__ */ S(l, {
135
135
  wrap: !0,
136
136
  gap: "1.5",
137
137
  children: b.map((n) => {
138
- let r = `{{${e}.${u}.${o}.${d}.${t}.${n}}}`;
138
+ let r = `{{${e}.${d}.${s}.${f}.${t}.${n}}}`;
139
139
  return /* @__PURE__ */ S(F, {
140
140
  label: n,
141
141
  onInsert: () => g(r)
142
142
  }, n);
143
143
  })
144
- }), /* @__PURE__ */ S(s, {
144
+ }), /* @__PURE__ */ S(c, {
145
145
  className: "text-xs text-muted-foreground bg-muted/50 p-2 rounded-md",
146
- children: /* @__PURE__ */ C(l, {
146
+ children: /* @__PURE__ */ C(u, {
147
147
  className: "text-xs bg-transparent px-0",
148
148
  children: [
149
- u,
149
+ d,
150
150
  ".",
151
- o,
151
+ s,
152
152
  ".",
153
- d,
153
+ f,
154
154
  ".",
155
155
  t,
156
156
  ".*"
@@ -162,33 +162,33 @@ function I(e, o, u, d, m, h, g, _, v, y = !1, b) {
162
162
  })
163
163
  })] });
164
164
  }
165
- function L(e, a, o, d, m, h, g, _ = !1, v) {
166
- if (!o || o.length === 0) return /* @__PURE__ */ C(s, {
165
+ function L(e, a, s, f, m, h, g, _ = !1, v) {
166
+ if (!s || s.length === 0) return /* @__PURE__ */ C(c, {
167
167
  className: "p-3 bg-muted/30 rounded-lg text-xs text-muted-foreground",
168
- children: [/* @__PURE__ */ S(f, {
168
+ children: [/* @__PURE__ */ S(o, {
169
169
  size: "xs",
170
170
  tone: "muted",
171
171
  className: "mb-2",
172
172
  children: g.configureHint(a)
173
- }), /* @__PURE__ */ C(f, {
173
+ }), /* @__PURE__ */ C(o, {
174
174
  tone: "muted",
175
175
  className: "font-mono text-[10px]",
176
176
  children: [
177
177
  g.configureExample,
178
178
  " ",
179
- /* @__PURE__ */ C(l, {
179
+ /* @__PURE__ */ C(u, {
180
180
  className: "bg-background px-1 text-[10px]",
181
181
  children: [a, ".0.*"]
182
182
  })
183
183
  ]
184
184
  })]
185
185
  });
186
- let y = d?.variables?.arrays?.[a];
186
+ let y = f?.variables?.arrays?.[a];
187
187
  if (!y) return null;
188
- let b = y.label_field || "name", x = y.item_fields || [], w = y.sub_arrays || {}, T = _ ? o.map((e, t) => ({
188
+ let b = y.label_field || "name", x = y.item_fields || [], w = y.sub_arrays || {}, T = _ ? s.map((e, t) => ({
189
189
  item: e,
190
190
  index: t
191
- })) : o.map((e, t) => ({
191
+ })) : s.map((e, t) => ({
192
192
  item: e,
193
193
  index: t
194
194
  })).filter(({ item: e, index: t }) => {
@@ -199,59 +199,59 @@ function L(e, a, o, d, m, h, g, _ = !1, v) {
199
199
  return n ? N(t, h) || Object.keys(n).some((e) => N(e, h)) : !1;
200
200
  });
201
201
  });
202
- return T.length === 0 ? /* @__PURE__ */ S(s, {
202
+ return T.length === 0 ? /* @__PURE__ */ S(c, {
203
203
  className: "p-3 bg-muted/30 rounded-lg text-xs text-muted-foreground",
204
- children: /* @__PURE__ */ S(f, {
204
+ children: /* @__PURE__ */ S(o, {
205
205
  size: "xs",
206
206
  tone: "muted",
207
207
  children: g.noMatchingVariables
208
208
  })
209
- }) : /* @__PURE__ */ S(u, {
209
+ }) : /* @__PURE__ */ S(d, {
210
210
  className: "max-h-[400px] pr-1",
211
211
  children: /* @__PURE__ */ S(t, {
212
212
  type: "single",
213
213
  collapsible: !0,
214
214
  className: "w-full",
215
- children: T.map(({ item: t, index: o }) => {
216
- let l = String(t[b] || t.name || g.itemFallbackLabel(o)), u = _ ? x.filter((e) => !e.includes(".")) : x.filter((e) => !e.includes(".")).filter((e) => !h.trim() || N(e, h)), y = Object.entries(w).filter(([e]) => {
215
+ children: T.map(({ item: t, index: s }) => {
216
+ let u = String(t[b] || t.name || g.itemFallbackLabel(s)), d = _ ? x.filter((e) => !e.includes(".")) : x.filter((e) => !e.includes(".")).filter((e) => !h.trim() || N(e, h)), y = Object.entries(w).filter(([e]) => {
217
217
  let n = t[e];
218
218
  return n ? _ || !h.trim() ? !0 : N(e, h) || Object.keys(n).some((e) => N(e, h)) : !1;
219
219
  });
220
- return u.length > 0 || y.length > 0 ? /* @__PURE__ */ C(r, {
221
- value: `${a}-${o}`,
220
+ return d.length > 0 || y.length > 0 ? /* @__PURE__ */ C(r, {
221
+ value: `${a}-${s}`,
222
222
  className: "border-b-0",
223
223
  children: [/* @__PURE__ */ S(i, {
224
224
  className: "py-2 hover:no-underline",
225
- children: /* @__PURE__ */ C(c, {
225
+ children: /* @__PURE__ */ C(l, {
226
226
  align: "center",
227
227
  gap: "2",
228
228
  className: "text-xs",
229
- children: [v && /* @__PURE__ */ S(v, { className: "h-3 w-3" }), /* @__PURE__ */ C(s, {
229
+ children: [v && /* @__PURE__ */ S(v, { className: "h-3 w-3" }), /* @__PURE__ */ C(c, {
230
230
  className: "text-left",
231
- children: [/* @__PURE__ */ S(f, {
231
+ children: [/* @__PURE__ */ S(o, {
232
232
  size: "xs",
233
233
  weight: "medium",
234
- children: l
235
- }), /* @__PURE__ */ S(f, {
234
+ children: u
235
+ }), /* @__PURE__ */ S(o, {
236
236
  size: "xs",
237
237
  tone: "muted",
238
- children: g.indexLabel(o)
238
+ children: g.indexLabel(s)
239
239
  })]
240
240
  })]
241
241
  })
242
242
  }), /* @__PURE__ */ S(n, { children: /* @__PURE__ */ C(p, {
243
243
  gap: "3",
244
244
  className: "pt-2 pl-2",
245
- children: [u.length > 0 && /* @__PURE__ */ C(s, { children: [/* @__PURE__ */ S(f, {
245
+ children: [d.length > 0 && /* @__PURE__ */ C(c, { children: [/* @__PURE__ */ S(o, {
246
246
  size: "xs",
247
247
  tone: "muted",
248
248
  className: "mb-1.5",
249
249
  children: g.itemInfo
250
- }), /* @__PURE__ */ S(c, {
250
+ }), /* @__PURE__ */ S(l, {
251
251
  wrap: !0,
252
252
  gap: "1.5",
253
- children: u.map((t) => {
254
- let n = `{{${e}.${a}.${o}.${t}}}`;
253
+ children: d.map((t) => {
254
+ let n = `{{${e}.${a}.${s}.${t}}}`;
255
255
  return /* @__PURE__ */ S(F, {
256
256
  label: t,
257
257
  onInsert: () => m(n)
@@ -259,28 +259,28 @@ function L(e, a, o, d, m, h, g, _ = !1, v) {
259
259
  })
260
260
  })] }), y.map(([n]) => {
261
261
  let r = O(t[n]);
262
- return r ? /* @__PURE__ */ S(s, { children: I(e, o, a, n, r, d, m, h, g, _, v) }, n) : null;
262
+ return r ? /* @__PURE__ */ S(c, { children: I(e, s, a, n, r, f, m, h, g, _, v) }, n) : null;
263
263
  })]
264
264
  }) })]
265
- }, o) : null;
265
+ }, s) : null;
266
266
  })
267
267
  })
268
268
  });
269
269
  }
270
- function R({ onInsert: t, templateVariables: n, isLoadingVariables: r = !1, pluginManifests: i = E, isLoadingManifests: a = !1, pluginDisplayData: l = T, resolveIcon: m, maxHeight: h = "400px", autoFocusSearch: _ = !0, labels: O, className: k }) {
270
+ function R({ onInsert: t, templateVariables: n, isLoadingVariables: r = !1, pluginManifests: i = E, isLoadingManifests: a = !1, pluginDisplayData: u = T, resolveIcon: m, maxHeight: h = "400px", autoFocusSearch: _ = !0, labels: O, className: k }) {
271
271
  let A = {
272
272
  ...w,
273
273
  ...O
274
- }, [M, I] = b(""), R = y(l), z = y(M), B = n?.variable_metadata ?? {}, V = n?.variable_groups ?? {};
275
- if (r || a) return /* @__PURE__ */ C(s, {
274
+ }, [M, I] = b(""), R = y(u), z = y(M), B = n?.variable_metadata ?? {}, V = n?.variable_groups ?? {};
275
+ if (r || a) return /* @__PURE__ */ C(c, {
276
276
  className: "p-3 min-w-[300px]",
277
277
  children: [
278
- /* @__PURE__ */ S(d, { className: "h-4 w-full mb-2" }),
279
- /* @__PURE__ */ S(d, { className: "h-4 w-3/4 mb-2" }),
280
- /* @__PURE__ */ S(d, { className: "h-4 w-1/2" })
278
+ /* @__PURE__ */ S(f, { className: "h-4 w-full mb-2" }),
279
+ /* @__PURE__ */ S(f, { className: "h-4 w-3/4 mb-2" }),
280
+ /* @__PURE__ */ S(f, { className: "h-4 w-1/2" })
281
281
  ]
282
282
  });
283
- if (!n?.variables) return /* @__PURE__ */ S(f, {
283
+ if (!n?.variables) return /* @__PURE__ */ S(o, {
284
284
  tone: "muted",
285
285
  className: "p-3 min-w-[300px]",
286
286
  children: A.noVariablesAvailable
@@ -302,14 +302,14 @@ function R({ onInsert: t, templateVariables: n, isLoadingVariables: r = !1, plug
302
302
  });
303
303
  return /* @__PURE__ */ S(g, {
304
304
  delayDuration: 300,
305
- children: /* @__PURE__ */ C(c, {
305
+ children: /* @__PURE__ */ C(l, {
306
306
  direction: "col",
307
307
  className: e("w-full min-w-[min(340px,calc(100vw-24px))]", k),
308
- children: [/* @__PURE__ */ S(s, {
308
+ children: [/* @__PURE__ */ S(c, {
309
309
  className: "p-2 border-b",
310
- children: /* @__PURE__ */ C(s, {
310
+ children: /* @__PURE__ */ C(c, {
311
311
  className: "relative",
312
- children: [/* @__PURE__ */ S(v, { className: "absolute left-2.5 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" }), /* @__PURE__ */ S(o, {
312
+ children: [/* @__PURE__ */ S(v, { className: "absolute left-2.5 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground" }), /* @__PURE__ */ S(s, {
313
313
  autoFocus: _,
314
314
  type: "text",
315
315
  placeholder: A.searchPlaceholder,
@@ -319,18 +319,18 @@ function R({ onInsert: t, templateVariables: n, isLoadingVariables: r = !1, plug
319
319
  className: "pl-8 h-9"
320
320
  })]
321
321
  })
322
- }), /* @__PURE__ */ S(u, {
322
+ }), /* @__PURE__ */ S(d, {
323
323
  className: "flex-1",
324
324
  style: { height: h },
325
325
  children: /* @__PURE__ */ S(p, {
326
326
  gap: "3",
327
327
  className: "p-2",
328
- children: H.length === 0 ? /* @__PURE__ */ S(f, {
328
+ children: H.length === 0 ? /* @__PURE__ */ S(o, {
329
329
  tone: "muted",
330
330
  className: "p-3 text-center",
331
331
  children: A.noVariablesFound(z)
332
332
  }) : H.map(([e, n]) => {
333
- let r = i[e], a = j(r), o = B[e] ?? {}, l = V[e] ?? {}, u = Object.keys(l).length > 0, d = (r?.icon ? m?.(r.icon) : null) ?? null, h = n.filter((e) => !e.includes(".*.")), g = a.length > 0 ? h.filter((e) => !a.some((t) => e === t || e.startsWith(t + "."))) : h, _ = z.trim() && (N(e, z) || e.toLowerCase().replace(/_/g, " ").split(/\s+/).some((e) => e.includes(z.toLowerCase()))), v = _ ? g : g.filter((t) => !z.trim() || P(e, t, z)), y = a.length > 0 && a.some((t) => {
333
+ let r = i[e], a = j(r), s = B[e] ?? {}, u = V[e] ?? {}, d = Object.keys(u).length > 0, f = (r?.icon ? m?.(r.icon) : null) ?? null, h = n.filter((e) => !e.includes(".*.")), g = a.length > 0 ? h.filter((e) => !a.some((t) => e === t || e.startsWith(t + "."))) : h, _ = z.trim() && (N(e, z) || e.toLowerCase().replace(/_/g, " ").split(/\s+/).some((e) => e.includes(z.toLowerCase()))), v = _ ? g : g.filter((t) => !z.trim() || P(e, t, z)), y = a.length > 0 && a.some((t) => {
334
334
  if (!z.trim() || _ || N(t, z)) return !0;
335
335
  let n = D(R[e]?.[t]);
336
336
  if (!n || n.length === 0) return !1;
@@ -339,12 +339,12 @@ function R({ onInsert: t, templateVariables: n, isLoadingVariables: r = !1, plug
339
339
  });
340
340
  if (v.length === 0 && !y) return null;
341
341
  let b = {};
342
- if (u) for (let e of v) {
343
- let t = o[e]?.group || "", n = t && l[t] ? t : "__ungrouped__";
342
+ if (d) for (let e of v) {
343
+ let t = s[e]?.group || "", n = t && u[t] ? t : "__ungrouped__";
344
344
  (b[n] ??= []).push(e);
345
345
  }
346
346
  let w = (n) => {
347
- let r = o[n], i = `{{${e}.${n}}}`;
347
+ let r = s[n], i = `{{${e}.${n}}}`;
348
348
  return /* @__PURE__ */ S(F, {
349
349
  label: n,
350
350
  description: r?.description,
@@ -355,38 +355,38 @@ function R({ onInsert: t, templateVariables: n, isLoadingVariables: r = !1, plug
355
355
  return /* @__PURE__ */ C(p, {
356
356
  gap: "1.5",
357
357
  children: [
358
- /* @__PURE__ */ C(c, {
358
+ /* @__PURE__ */ C(l, {
359
359
  align: "center",
360
360
  gap: "2",
361
361
  className: "bg-muted/30 rounded-md px-2 py-1.5 -mx-1",
362
- children: [d && /* @__PURE__ */ S(d, { className: "h-3 w-3 text-muted-foreground" }), /* @__PURE__ */ S(f, {
362
+ children: [f && /* @__PURE__ */ S(f, { className: "h-3 w-3 text-muted-foreground" }), /* @__PURE__ */ S(o, {
363
363
  as: "span",
364
364
  size: "xs",
365
365
  weight: "semibold",
366
366
  children: e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase())
367
367
  })]
368
368
  }),
369
- u ? /* @__PURE__ */ C(x, { children: [Object.entries(l).map(([e, t]) => {
369
+ d ? /* @__PURE__ */ C(x, { children: [Object.entries(u).map(([e, t]) => {
370
370
  let n = b[e];
371
- return !n || n.length === 0 ? null : /* @__PURE__ */ C(s, { children: [/* @__PURE__ */ S(f, {
371
+ return !n || n.length === 0 ? null : /* @__PURE__ */ C(c, { children: [/* @__PURE__ */ S(o, {
372
372
  className: "text-[9px] uppercase tracking-widest text-muted-foreground mt-1 mb-1 pb-0.5 border-b border-border/30",
373
373
  children: t.label
374
- }), /* @__PURE__ */ S(c, {
374
+ }), /* @__PURE__ */ S(l, {
375
375
  wrap: !0,
376
376
  gap: "1.5",
377
377
  children: n.map(w)
378
378
  })] }, e);
379
- }), b.__ungrouped__ && b.__ungrouped__.length > 0 && /* @__PURE__ */ C(s, { children: [/* @__PURE__ */ S(f, {
379
+ }), b.__ungrouped__ && b.__ungrouped__.length > 0 && /* @__PURE__ */ C(c, { children: [/* @__PURE__ */ S(o, {
380
380
  className: "text-[9px] uppercase tracking-widest text-muted-foreground mt-1 mb-1 pb-0.5 border-b border-border/30",
381
381
  children: A.general
382
- }), /* @__PURE__ */ S(c, {
382
+ }), /* @__PURE__ */ S(l, {
383
383
  wrap: !0,
384
384
  gap: "1.5",
385
385
  children: b.__ungrouped__.map(w)
386
- })] })] }) : v.length > 0 && /* @__PURE__ */ C(s, { children: [/* @__PURE__ */ S(f, {
386
+ })] })] }) : v.length > 0 && /* @__PURE__ */ C(c, { children: [/* @__PURE__ */ S(o, {
387
387
  className: "text-[9px] uppercase tracking-widest text-muted-foreground mt-1 mb-1 pb-0.5 border-b border-border/30",
388
388
  children: A.general
389
- }), /* @__PURE__ */ S(c, {
389
+ }), /* @__PURE__ */ S(l, {
390
390
  wrap: !0,
391
391
  gap: "1.5",
392
392
  children: v.map(w)
@@ -395,17 +395,17 @@ function R({ onInsert: t, templateVariables: n, isLoadingVariables: r = !1, plug
395
395
  let i = D(R[e]?.[n]);
396
396
  return !z.trim() || _ || N(n, z) || i && i.length > 0 ? /* @__PURE__ */ C(p, {
397
397
  gap: "1.5",
398
- children: [/* @__PURE__ */ C(f, {
398
+ children: [/* @__PURE__ */ C(o, {
399
399
  size: "xs",
400
400
  tone: "muted",
401
401
  className: "flex items-center gap-1",
402
402
  children: [
403
- d && /* @__PURE__ */ S(d, { className: "h-3 w-3" }),
403
+ f && /* @__PURE__ */ S(f, { className: "h-3 w-3" }),
404
404
  n.charAt(0).toUpperCase() + n.slice(1),
405
405
  " ",
406
406
  i ? A.itemCount(i.length) : A.noneConfigured
407
407
  ]
408
- }), L(e, n, i, r, t, z, A, !!_, d)]
408
+ }), L(e, n, i, r, t, z, A, !!_, f)]
409
409
  }, n) : null;
410
410
  })
411
411
  ]
@@ -1,7 +1,7 @@
1
1
  import { type VariantProps } from "class-variance-authority";
2
2
  import * as React from "react";
3
3
  declare const alertVariants: (props?: ({
4
- variant?: "default" | "destructive" | "info" | "success" | "warning" | null | undefined;
4
+ variant?: "destructive" | "default" | "info" | "success" | "warning" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
6
  declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
7
7
  declare function AlertTitle({ className, ...props }: React.ComponentProps<"h5">): React.JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { type VariantProps } from "class-variance-authority";
2
2
  import * as React from "react";
3
3
  declare const badgeVariants: (props?: ({
4
- variant?: "default" | "destructive" | "success" | "brand" | "outline" | "secondary" | "variable" | "formula" | null | undefined;
4
+ variant?: "destructive" | "default" | "success" | "brand" | "outline" | "secondary" | "variable" | "formula" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
6
  export type BadgeProps = React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
7
7
  asChild?: boolean;
@@ -3,10 +3,10 @@ import { Button as t } from "../forms/button.js";
3
3
  import { X as n } from "lucide-react";
4
4
  import * as r from "react";
5
5
  import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
6
- import { cva as s } from "class-variance-authority";
7
- import { useRender as c } from "@base-ui/react/use-render";
6
+ import { useRender as s } from "@base-ui/react/use-render";
7
+ import { cva as c } from "class-variance-authority";
8
8
  //#region src/components/feedback/badge.tsx
9
- var l = s("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-ring aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
9
+ var l = c("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-ring aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden", {
10
10
  variants: { variant: {
11
11
  default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary-hover",
12
12
  brand: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary-hover",
@@ -19,15 +19,15 @@ var l = s("inline-flex items-center justify-center rounded-full border px-2 py-0
19
19
  } },
20
20
  defaultVariants: { variant: "default" }
21
21
  });
22
- function u({ className: s, variant: u, asChild: d = !1, children: f, onDismiss: p, dismissLabel: m, ref: h, ...g }) {
22
+ function u({ className: c, variant: u, asChild: d = !1, children: f, onDismiss: p, dismissLabel: m, ref: h, ...g }) {
23
23
  let _ = p !== void 0 && !d;
24
- return c({
24
+ return s({
25
25
  defaultTagName: "span",
26
26
  ref: h,
27
27
  render: d ? r.Children.only(f) : void 0,
28
28
  props: {
29
29
  "data-slot": "badge",
30
- className: e(l({ variant: u }), _ && ["overflow-visible", "py-1 pe-1 gap-1"], s),
30
+ className: e(l({ variant: u }), _ && ["overflow-visible", "py-1 pe-1 gap-1"], c),
31
31
  ...d ? {} : { children: _ ? /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a("span", {
32
32
  "data-slot": "badge-label",
33
33
  className: "min-w-0 overflow-hidden text-ellipsis",
@@ -1,23 +1,23 @@
1
1
  import { cn as e } from "../../lib/utils.js";
2
2
  import * as t from "react";
3
- import { cva as n } from "class-variance-authority";
4
- import { useRender as r } from "@base-ui/react/use-render";
3
+ import { useRender as n } from "@base-ui/react/use-render";
4
+ import { cva as r } from "class-variance-authority";
5
5
  //#region src/components/feedback/chip.tsx
6
- var i = n("inline-flex items-center justify-center rounded-full border px-2.5 py-1 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none text-foreground no-underline hover:bg-accent hover:text-accent-foreground hover:border-brand active:bg-secondary focus-ring transition-[color,background-color,border-color,box-shadow] duration-control disabled:pointer-events-none disabled:opacity-50", {
6
+ var i = r("inline-flex items-center justify-center rounded-full border px-2.5 py-1 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none text-foreground no-underline hover:bg-accent hover:text-accent-foreground hover:border-brand active:bg-secondary focus-ring transition-[color,background-color,border-color,box-shadow] duration-control disabled:pointer-events-none disabled:opacity-50", {
7
7
  variants: { mono: {
8
8
  true: "font-mono",
9
9
  false: ""
10
10
  } },
11
11
  defaultVariants: { mono: !1 }
12
12
  });
13
- function a({ className: n, mono: a, asChild: o = !1, children: s, ref: c, ...l }) {
14
- return r({
13
+ function a({ className: r, mono: a, asChild: o = !1, children: s, ref: c, ...l }) {
14
+ return n({
15
15
  defaultTagName: "button",
16
16
  ref: c,
17
17
  render: o ? t.Children.only(s) : void 0,
18
18
  props: {
19
19
  "data-slot": "chip",
20
- className: e(i({ mono: a }), n),
20
+ className: e(i({ mono: a }), r),
21
21
  ...o ? {} : { children: s },
22
22
  ...l
23
23
  }
@@ -10,7 +10,7 @@ import * as React from "react";
10
10
  * lg 20px Button size="lg" / "icon-lg" (h-10)
11
11
  */
12
12
  declare const spinnerVariants: (props?: ({
13
- size?: "lg" | "sm" | "md" | null | undefined;
13
+ size?: "sm" | "md" | "lg" | null | undefined;
14
14
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
15
15
  export interface SpinnerProps extends Omit<React.ComponentProps<"span">, "children">, VariantProps<typeof spinnerVariants> {
16
16
  /**
@@ -2,7 +2,7 @@ import { type VariantProps } from "class-variance-authority";
2
2
  import * as React from "react";
3
3
  declare const statusDotVariants: (props?: ({
4
4
  status?: "info" | "success" | "warning" | "danger" | "neutral" | null | undefined;
5
- size?: "lg" | "sm" | "md" | null | undefined;
5
+ size?: "sm" | "md" | "lg" | null | undefined;
6
6
  pulse?: boolean | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
8
  export interface StatusDotProps extends Omit<React.ComponentProps<"span">, "children" | "color">, VariantProps<typeof statusDotVariants> {
@@ -1,8 +1,8 @@
1
1
  import { type VariantProps } from "class-variance-authority";
2
2
  import * as React from "react";
3
3
  declare const buttonVariants: (props?: ({
4
- variant?: "link" | "default" | "destructive" | "brand" | "outline" | "secondary" | "ghost" | null | undefined;
5
- size?: "lg" | "icon" | "sm" | "default" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
4
+ variant?: "link" | "destructive" | "default" | "brand" | "outline" | "secondary" | "ghost" | null | undefined;
5
+ size?: "sm" | "lg" | "icon" | "default" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  declare function Button({ className, variant, size, asChild, loading, children, onClick, ref, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
8
8
  asChild?: boolean;
@@ -2,10 +2,10 @@ import { cn as e } from "../../lib/utils.js";
2
2
  import { Spinner as t } from "../feedback/spinner.js";
3
3
  import * as n from "react";
4
4
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
- import { cva as a } from "class-variance-authority";
6
- import { useRender as o } from "@base-ui/react/use-render";
5
+ import { useRender as a } from "@base-ui/react/use-render";
6
+ import { cva as o } from "class-variance-authority";
7
7
  //#region src/components/forms/button.tsx
8
- var s = a("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,background-color,border-color,box-shadow] duration-control disabled:pointer-events-none disabled:opacity-50 data-[loading]:cursor-progress [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 focus-ring aria-invalid:border-destructive", {
8
+ var s = o("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,background-color,border-color,box-shadow] duration-control disabled:pointer-events-none disabled:opacity-50 data-[loading]:cursor-progress [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 focus-ring aria-invalid:border-destructive", {
9
9
  variants: {
10
10
  variant: {
11
11
  default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary-hover active:bg-primary-active",
@@ -39,7 +39,7 @@ var s = a("inline-flex items-center justify-center gap-2 whitespace-nowrap round
39
39
  lg: "lg",
40
40
  "icon-lg": "lg"
41
41
  };
42
- function l({ className: a, variant: l = "default", size: u = "default", asChild: d = !1, loading: f = !1, children: p, onClick: m, ref: h, ...g }) {
42
+ function l({ className: o, variant: l = "default", size: u = "default", asChild: d = !1, loading: f = !1, children: p, onClick: m, ref: h, ...g }) {
43
43
  let _ = (e) => {
44
44
  if (f) {
45
45
  e.preventDefault(), e.stopPropagation();
@@ -62,7 +62,7 @@ function l({ className: a, variant: l = "default", size: u = "default", asChild:
62
62
  })
63
63
  })]
64
64
  }) : p;
65
- return o({
65
+ return a({
66
66
  defaultTagName: "button",
67
67
  ref: h,
68
68
  render: d ? n.Children.only(p) : void 0,
@@ -73,7 +73,7 @@ function l({ className: a, variant: l = "default", size: u = "default", asChild:
73
73
  className: e(s({
74
74
  variant: l,
75
75
  size: u
76
- }), a),
76
+ }), o),
77
77
  ...d ? {} : { children: v },
78
78
  ...g,
79
79
  ...f ? {
@@ -0,0 +1,66 @@
1
+ import * as React from "react";
2
+ export interface FieldProps {
3
+ /** Localized label text. Rendered as `<Label htmlFor={id}>`. */
4
+ label: React.ReactNode;
5
+ /** Helper line, wired to the control through `aria-describedby`. */
6
+ description?: React.ReactNode;
7
+ /**
8
+ * Validation message. REPLACES the description in the description chain (it
9
+ * does not append to it), sets `aria-invalid` on the control, and renders in
10
+ * `--destructive`. The description still renders — it is usually the thing
11
+ * that explains how to fix the error.
12
+ */
13
+ error?: React.ReactNode;
14
+ /**
15
+ * Marks the field required: renders the asterisk INSIDE the label, adds
16
+ * {@link FieldProps.requiredLabel} to the accessible name, and sets
17
+ * `required` on the control.
18
+ */
19
+ required?: boolean;
20
+ /**
21
+ * Screen-reader text appended to the label when `required` is set. Default
22
+ * `"(required)"` — user-facing copy, so it is a prop: this package resolves
23
+ * no i18n and never renders a string an app cannot translate.
24
+ */
25
+ requiredLabel?: string;
26
+ /**
27
+ * Id for the control. Generated with `useId()` when omitted; a child that
28
+ * carries its own `id` keeps it, and the label points at that instead.
29
+ */
30
+ id?: string;
31
+ /** Where the description sits relative to the control. @default "below" */
32
+ descriptionPlacement?: "above" | "below";
33
+ /**
34
+ * Layout. `"stacked"` is the settings default; `"inline"` puts the label in
35
+ * a left column from the `sm` breakpoint up and stacks below it.
36
+ * @default "stacked"
37
+ */
38
+ orientation?: "stacked" | "inline";
39
+ /**
40
+ * Exactly one control element. Receives `id`, `aria-describedby`,
41
+ * `aria-invalid` and `required` — see the file header for what happens when
42
+ * the child already declares one of them.
43
+ */
44
+ children: React.ReactElement;
45
+ /** Classes for the row wrapper. */
46
+ className?: string;
47
+ }
48
+ /**
49
+ * A labelled control with its helper and error text wired to it.
50
+ *
51
+ * ```tsx
52
+ * <Field
53
+ * label={t("boardUpdateIntervalLabel")}
54
+ * description={t("boardUpdateIntervalDescription")}
55
+ * error={errors.pollingInterval}
56
+ * required
57
+ * >
58
+ * <Input type="number" min={10} max={3600} value={value} onChange={onChange} />
59
+ * </Field>
60
+ * ```
61
+ *
62
+ * The child is cloned with the ids and states it needs, so no call site
63
+ * threads them by hand. See the file header for the argument.
64
+ */
65
+ declare function Field({ label, description, error, required, requiredLabel, id: idProp, descriptionPlacement, orientation, children, className, }: FieldProps): React.JSX.Element;
66
+ export { Field };