@ux-builder/ui 0.6.1 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -13,7 +13,7 @@ to the app, as long as the app follows the rules below.
13
13
  3. Never hard-code colours, font families or radii: no hex, rgb(), named colours, font names or pixel radii in CSS or style props.
14
14
  4. Run the lint rule ux-builder/no-hard-coded-values (@ux-builder/ui/stylelint, @ux-builder/ui/eslint) with ux-builder/no-foreign-ui and ux-builder/no-inline-svg, then the theme audit on the running app (npx ux-builder-audit <url>, @ux-builder/audit), and fix what they report.
15
15
  5. Select themes with ThemeProvider (theme, appearance) or data-theme and data-appearance on <html>; never restyle per theme in app code.
16
- 6. Compose screens from @ux-builder/ui/patterns before writing any layout CSS: AppShell for the frame; CollectionList, ListDetail, RecordDetail, FormPage, QuickEdit, Dashboard, ReportViewer, SettingsPage and ErrorScreen for screens; the regions and the layout primitives (Stack, Cluster, Grid, Page, SplitView) for anything else. Supply content, data and actions through their slots; never fork or restyle a pattern.
16
+ 6. Compose screens from @ux-builder/ui/patterns before writing any layout CSS: AppShell for the frame, with each screen inside a Page, which gives it the page gutter and width (AppShell's content area and the screen patterns have none of their own; ErrorScreen excepted); CollectionList, ListDetail, RecordDetail, FormPage, QuickEdit, Dashboard, ReportViewer, SettingsPage and ErrorScreen for screens; the regions and the layout primitives (Stack, Cluster, Grid, Page, SplitView) for anything else. Supply content, data and actions through their slots; never fork or restyle a pattern.
17
17
  <!-- rules:end -->
18
18
 
19
19
  ## Setting up
@@ -77,7 +77,7 @@ import { ThemeProvider } from "@ux-builder/ui";
77
77
  <!-- catalogue:start -->
78
78
  ## Reference (generated from the SDK; do not edit by hand)
79
79
 
80
- @ux-builder/ui 0.6.1, @ux-builder/tokens 1.5.0. The full catalogue, with every token and prop, is `@ux-builder/ui/catalogue.json`.
80
+ @ux-builder/ui 0.6.3, @ux-builder/tokens 1.6.0. The full catalogue, with every token and prop, is `@ux-builder/ui/catalogue.json`.
81
81
 
82
82
  ### Components
83
83
 
package/catalogue.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$description": "Generated by tools/gen-catalogue.mjs from source (FEAT-004 SDK-13). Do not edit; run npm run catalogue.",
3
3
  "packages": {
4
- "@ux-builder/ui": "0.6.1",
5
- "@ux-builder/tokens": "1.5.0"
4
+ "@ux-builder/ui": "0.6.3",
5
+ "@ux-builder/tokens": "1.6.0"
6
6
  },
7
7
  "rules": [
8
8
  "Use the SDK's widgets (@ux-builder/ui) for buttons, fields, choices, tables, menus, tabs, breadcrumbs, sheets, notices, status pills, toasts, progress bars, spinners, skeletons, icons and the logo; do not build your own. Icons beyond the shared names come from @ux-builder/ui/icons, never hand-drawn.",
@@ -10,7 +10,7 @@
10
10
  "Never hard-code colours, font families or radii: no hex, rgb(), named colours, font names or pixel radii in CSS or style props.",
11
11
  "Run the lint rule ux-builder/no-hard-coded-values (@ux-builder/ui/stylelint, @ux-builder/ui/eslint) with ux-builder/no-foreign-ui and ux-builder/no-inline-svg, then the theme audit on the running app (npx ux-builder-audit <url>, @ux-builder/audit), and fix what they report.",
12
12
  "Select themes with ThemeProvider (theme, appearance) or data-theme and data-appearance on <html>; never restyle per theme in app code.",
13
- "Compose screens from @ux-builder/ui/patterns before writing any layout CSS: AppShell for the frame; CollectionList, ListDetail, RecordDetail, FormPage, QuickEdit, Dashboard, ReportViewer, SettingsPage and ErrorScreen for screens; the regions and the layout primitives (Stack, Cluster, Grid, Page, SplitView) for anything else. Supply content, data and actions through their slots; never fork or restyle a pattern."
13
+ "Compose screens from @ux-builder/ui/patterns before writing any layout CSS: AppShell for the frame, with each screen inside a Page, which gives it the page gutter and width (AppShell's content area and the screen patterns have none of their own; ErrorScreen excepted); CollectionList, ListDetail, RecordDetail, FormPage, QuickEdit, Dashboard, ReportViewer, SettingsPage and ErrorScreen for screens; the regions and the layout primitives (Stack, Cluster, Grid, Page, SplitView) for anything else. Supply content, data and actions through their slots; never fork or restyle a pattern."
14
14
  ],
15
15
  "lint": {
16
16
  "rule": "ux-builder/no-hard-coded-values",
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, h as m, i as h, j as g, k as _, l as v, m as y, n as b, o as x, p as S, r as C, s as w, t as T, u as E, v as D, w as ee, x as O, y as k } from "./shared-CjrUPFqv.js";
1
+ import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, h as m, i as h, j as g, k as _, l as v, m as y, n as b, o as x, p as S, r as C, s as w, t as T, u as E, v as D, w as ee, x as O, y as k } from "./shared-CAXoQbx9.js";
2
2
  import { UC as A, Wu as te, lP as ne } from "./shared-Bom_GJww.js";
3
3
  import { cloneElement as re, createContext as ie, useCallback as j, useContext as M, useEffect as N, useId as P, useLayoutEffect as ae, useMemo as oe, useRef as F, useState as I } from "react";
4
4
  import { jsx as L, jsxs as R } from "react/jsx-runtime";
package/dist/patterns.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as e, a as t, b as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, p as d, r as f, s as p, t as m, u as h } from "./shared-CjrUPFqv.js";
1
+ import { _ as e, a as t, b as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, p as d, r as f, s as p, t as m, u as h } from "./shared-CAXoQbx9.js";
2
2
  import { Fragment as g, cloneElement as _, useCallback as v, useEffect as y, useId as b, useLayoutEffect as x, useMemo as S, useRef as C, useState as w } from "react";
3
3
  import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
4
4
  //#region src/patterns/Layout.jsx
@@ -110,26 +110,26 @@ var f = [
110
110
  png: "image/png",
111
111
  webp: "image/webp",
112
112
  ico: "image/x-icon"
113
- };
114
- function _(e) {
113
+ }, _ = /url\(\s*(?:"((?:[^"\\]|\\.)*)"|'((?:[^'\\]|\\.)*)'|([^\s"'()]+))\s*\)/;
114
+ function v(e) {
115
115
  if (typeof window > "u" || !e) return null;
116
- let t = getComputedStyle(e).getPropertyValue("--piq-brand-favicon").trim();
117
- return /url\(\s*["']?([^"')]+)["']?\s*\)/.exec(t)?.[1] ?? null;
116
+ let t = getComputedStyle(e).getPropertyValue("--piq-brand-favicon").trim(), n = _.exec(t);
117
+ return n ? (n[1] ?? n[2] ?? n[3]).replace(/\\(.)/g, "$1") : null;
118
118
  }
119
- function v(e = typeof document > "u" ? null : document.documentElement) {
119
+ function y(e = typeof document > "u" ? null : document.documentElement) {
120
120
  if (typeof document > "u" || !e) return null;
121
- let t = _(e), n = document.head.querySelector(`link[${h}]`);
121
+ let t = v(e), n = document.head.querySelector(`link[${h}]`);
122
122
  if (!t) return n?.remove(), null;
123
123
  n || (n = document.createElement("link"), n.rel = "icon", n.setAttribute(h, ""));
124
- let r = g[/\.(\w+)(?:[?#].*)?$/.exec(t)?.[1]?.toLowerCase()];
124
+ let r = /^data:([^;,]+)/.exec(t)?.[1] ?? g[/\.(\w+)(?:[?#].*)?$/.exec(t)?.[1]?.toLowerCase()];
125
125
  return r ? n.type = r : n.removeAttribute("type"), n.getAttribute("href") !== t && n.setAttribute("href", t), document.head.appendChild(n), t;
126
126
  }
127
- function y() {
127
+ function b() {
128
128
  typeof document < "u" && document.head.querySelector(`link[${h}]`)?.remove();
129
129
  }
130
- function b() {
130
+ function x() {
131
131
  return r(() => {
132
- let e = document.documentElement, t = () => v(e);
132
+ let e = document.documentElement, t = () => y(e);
133
133
  t();
134
134
  let n = new MutationObserver(t);
135
135
  n.observe(e, {
@@ -138,119 +138,119 @@ function b() {
138
138
  });
139
139
  let r = window.matchMedia?.("(prefers-color-scheme: dark)");
140
140
  return r?.addEventListener("change", t), () => {
141
- n.disconnect(), r?.removeEventListener("change", t), y();
141
+ n.disconnect(), r?.removeEventListener("change", t), b();
142
142
  };
143
143
  }, []), null;
144
144
  }
145
145
  //#endregion
146
146
  //#region src/ThemeProvider.jsx
147
- var x = e(null), S = new Map(f.map((e) => [e.name, e])), C = "(prefers-color-scheme: dark)", w = "piq:set-theme", T = !0;
147
+ var S = e(null), C = new Map(f.map((e) => [e.name, e])), w = "(prefers-color-scheme: dark)", T = "piq:set-theme", E = !0;
148
148
  try {
149
- T = process.env.NODE_ENV !== "production";
149
+ E = process.env.NODE_ENV !== "production";
150
150
  } catch {}
151
- var E = (e) => {
152
- T && console.warn(`@ux-builder/ui ThemeProvider: ${e}`);
151
+ var D = (e) => {
152
+ E && console.warn(`@ux-builder/ui ThemeProvider: ${e}`);
153
153
  };
154
- function D() {
155
- return typeof window > "u" || !window.matchMedia ? null : window.matchMedia(C).matches ? "dark" : "light";
154
+ function O() {
155
+ return typeof window > "u" || !window.matchMedia ? null : window.matchMedia(w).matches ? "dark" : "light";
156
156
  }
157
- function O(e, t, n = D()) {
158
- let r = t === "system" ? n : t, i = S.get(e);
157
+ function k(e, t, n = O()) {
158
+ let r = t === "system" ? n : t, i = C.get(e);
159
159
  return i ? r && i.appearances.includes(r) ? r : i.default : r ?? null;
160
160
  }
161
- var k = typeof window > "u" ? r : a, A = (e) => ({
161
+ var A = typeof window > "u" ? r : a, ee = (e) => ({
162
162
  ...Object.fromEntries(m.map((e) => [`--${e}`, "initial"])),
163
163
  ...Object.fromEntries(Object.entries(e).filter(([, e]) => !String(e).startsWith("url(")).map(([e, t]) => [`--${e}`, t]))
164
164
  });
165
165
  function j({ theme: e, appearance: i = "system", tokens: a, favicon: l = !0, onChange: d, as: p = "div", style: m, children: h, ...g }) {
166
- let _ = n(x), b = s(null), [T, j] = c(e), [M, N] = c(i), [P, F] = c(D);
167
- r(() => j(e), [e]), r(() => N(i), [i]), k(() => {
168
- if (M !== "system" || typeof window > "u" || !window.matchMedia) return;
169
- let e = window.matchMedia(C), t = () => F(e.matches ? "dark" : "light");
166
+ let _ = n(S), v = s(null), [x, E] = c(e), [j, M] = c(i), [N, P] = c(O);
167
+ r(() => E(e), [e]), r(() => M(i), [i]), A(() => {
168
+ if (j !== "system" || typeof window > "u" || !window.matchMedia) return;
169
+ let e = window.matchMedia(w), t = () => P(e.matches ? "dark" : "light");
170
170
  return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
171
- }, [M]);
172
- let I = a ? M === "system" ? P ?? "light" : M : O(T, M, P);
171
+ }, [j]);
172
+ let F = a ? j === "system" ? N ?? "light" : j : k(x, j, N);
173
173
  r(() => {
174
- a || (T && !S.has(T) ? E(`unknown theme "${T}"; known: ${[...S.keys()].join(", ")}`) : T && M !== "system" && I !== M && E(`theme "${T}" has no ${M} appearance; using ${I}`));
174
+ a || (x && !C.has(x) ? D(`unknown theme "${x}"; known: ${[...C.keys()].join(", ")}`) : x && j !== "system" && F !== j && D(`theme "${x}" has no ${j} appearance; using ${F}`));
175
175
  }, [
176
- T,
177
- M,
178
- I,
176
+ x,
177
+ j,
178
+ F,
179
179
  a
180
180
  ]);
181
- let L = l && !a && !_;
182
- k(() => {
183
- L && v(b.current);
181
+ let I = l && !a && !_;
182
+ A(() => {
183
+ I && y(v.current);
184
184
  }, [
185
- L,
186
- T,
187
- I
188
- ]), r(() => L ? y : void 0, [L]);
189
- let R = t((e) => {
190
- j(e), d?.({
185
+ I,
186
+ x,
187
+ F
188
+ ]), r(() => I ? b : void 0, [I]);
189
+ let L = t((e) => {
190
+ E(e), d?.({
191
191
  theme: e,
192
- appearance: M
192
+ appearance: j
193
193
  });
194
- }, [d, M]), z = t((e) => {
195
- N(e), d?.({
196
- theme: T,
194
+ }, [d, j]), R = t((e) => {
195
+ M(e), d?.({
196
+ theme: x,
197
197
  appearance: e
198
198
  });
199
- }, [d, T]), B = !a && !_;
199
+ }, [d, x]), z = !a && !_;
200
200
  r(() => {
201
- if (!B || typeof window > "u") return;
201
+ if (!z || typeof window > "u") return;
202
202
  let e = (e) => {
203
203
  let { theme: t, appearance: n } = e.detail ?? {};
204
- t && j(t), n && N(n), (t || n) && d?.({
205
- theme: t ?? T,
206
- appearance: n ?? M
204
+ t && E(t), n && M(n), (t || n) && d?.({
205
+ theme: t ?? x,
206
+ appearance: n ?? j
207
207
  });
208
208
  };
209
- return window.addEventListener(w, e), () => window.removeEventListener(w, e);
209
+ return window.addEventListener(T, e), () => window.removeEventListener(T, e);
210
210
  }, [
211
- B,
211
+ z,
212
212
  d,
213
- T,
214
- M
213
+ x,
214
+ j
215
215
  ]);
216
- let V = o(() => ({
217
- theme: a ? null : T,
218
- appearance: I,
219
- preference: M,
216
+ let B = o(() => ({
217
+ theme: a ? null : x,
218
+ appearance: F,
219
+ preference: j,
220
220
  themes: f,
221
- setTheme: R,
222
- setAppearance: z
221
+ setTheme: L,
222
+ setAppearance: R
223
223
  }), [
224
- T,
225
- I,
226
- M,
224
+ x,
225
+ F,
226
+ j,
227
227
  a,
228
- R,
229
- z
230
- ]), H = a ? { style: {
231
- ...A(a),
232
- colorScheme: I ?? void 0,
228
+ L,
229
+ R
230
+ ]), V = a ? { style: {
231
+ ...ee(a),
232
+ colorScheme: F ?? void 0,
233
233
  ...m
234
234
  } } : {
235
- "data-theme": T,
236
- ...I && { "data-appearance": I },
235
+ "data-theme": x,
236
+ ...F && { "data-appearance": F },
237
237
  style: {
238
- colorScheme: I ?? void 0,
238
+ colorScheme: F ?? void 0,
239
239
  ...m
240
240
  }
241
241
  };
242
- return /* @__PURE__ */ u(x.Provider, {
243
- value: V,
242
+ return /* @__PURE__ */ u(S.Provider, {
243
+ value: B,
244
244
  children: /* @__PURE__ */ u(p, {
245
- ref: b,
245
+ ref: v,
246
246
  ...g,
247
- ...H,
247
+ ...V,
248
248
  children: h
249
249
  })
250
250
  });
251
251
  }
252
252
  function M() {
253
- let e = n(x);
253
+ let e = n(S);
254
254
  if (!e) throw Error("useTheme() needs a <ThemeProvider> above it");
255
255
  return e;
256
256
  }
@@ -839,14 +839,14 @@ function z(e) {
839
839
  function B(e, t, n = P) {
840
840
  return n[t]?.[e] ? [n[t][e], t] : n.lucide?.[e] ? [n.lucide[e], "lucide"] : [null, null];
841
841
  }
842
- var V = /* @__PURE__ */ new Map(), H = /<script|\son\w+\s*=|\shref\s*=|<foreignObject/i, ee = (e, t) => {
842
+ var V = /* @__PURE__ */ new Map(), H = /<script|\son\w+\s*=|\shref\s*=|<foreignObject/i, U = (e, t) => {
843
843
  let n = e.glyphs;
844
844
  if (n[t]) return [n[t], t];
845
845
  if (n.lucide) return [n.lucide, "lucide"];
846
846
  let r = Object.keys(N).find((e) => n[e]);
847
847
  return r ? [n[r], r] : [null, null];
848
848
  };
849
- function te(...e) {
849
+ function W(...e) {
850
850
  let t = [];
851
851
  for (let n of e.flat()) {
852
852
  if (!(n && typeof n.name == "string" && n.glyphs && Object.keys(n.glyphs).length > 0 && Object.keys(n.glyphs).every((e) => N[e]))) throw Error(`@ux-builder/ui registerIcons: an icon is { name, glyphs: { ${Object.keys(N).join(" | ")}: { viewBox, body } } }`);
@@ -855,17 +855,17 @@ function te(...e) {
855
855
  }
856
856
  return t;
857
857
  }
858
- var ne = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), U = Object.fromEntries(Object.entries(N).map(([e, t]) => [e, Object.fromEntries(Object.entries(t.svg).map(([e, t]) => [ne(e), t]))])), W = typeof window > "u" ? r : a;
858
+ var te = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), ne = Object.fromEntries(Object.entries(N).map(([e, t]) => [e, Object.fromEntries(Object.entries(t.svg).map(([e, t]) => [te(e), t]))])), re = typeof window > "u" ? r : a;
859
859
  function G({ name: e, icon: t, set: r, size: i = "1em", label: a, className: o = "", ...l }) {
860
- let d = n(x), f = s(null), [p, m] = c(null), [h, g] = c(null);
861
- W(() => {
860
+ let d = n(S), f = s(null), [p, m] = c(null), [h, g] = c(null);
861
+ re(() => {
862
862
  if (r || !f.current) return;
863
863
  let e = getComputedStyle(f.current).getPropertyValue("--piq-icon-set").trim().replace(/^["']|["']$/g, "");
864
864
  g(P[e] ? e : null), d?.theme || m(f.current.closest?.("[data-theme]")?.getAttribute("data-theme") ?? null);
865
865
  });
866
- let _ = r ?? h ?? z(d?.theme ?? p), v = t ?? (P.lucide[e] ? null : V.get(e)), [y, b] = v ? ee(v, _) : B(e, _);
866
+ let _ = r ?? h ?? z(d?.theme ?? p), v = t ?? (P.lucide[e] ? null : V.get(e)), [y, b] = v ? U(v, _) : B(e, _);
867
867
  if (!y) return R && console.warn(`@ux-builder/ui Icon: no icon "${e}". Shared names: ${L.join(", ")}. Every Lucide icon is in @ux-builder/ui/icons: import it (e.g. import { iconPin } from "@ux-builder/ui/icons") and pass icon={iconPin}, or registerIcons(iconPin) once.`), null;
868
- let S = a ? {
868
+ let x = a ? {
869
869
  role: "img",
870
870
  "aria-label": a
871
871
  } : {
@@ -881,17 +881,17 @@ function G({ name: e, icon: t, set: r, size: i = "1em", label: a, className: o =
881
881
  className: `piq-icon${o ? ` ${o}` : ""}`,
882
882
  "data-icon": v?.name ?? e,
883
883
  "data-icon-set": b,
884
- ...U[b],
885
- ...S,
884
+ ...ne[b],
885
+ ...x,
886
886
  ...l,
887
887
  dangerouslySetInnerHTML: { __html: y.body }
888
888
  });
889
889
  }
890
890
  //#endregion
891
891
  //#region src/widgets/Loading.jsx
892
- var re = (e, t, n) => Math.min(n, Math.max(t, e)), K = (e) => typeof e == "number" ? `${e}px` : e;
893
- function ie({ label: e, value: t, max: n = 100, valueText: r, showValue: a = !1, hideLabel: o = !1, className: s = "", ...c }) {
894
- let l = i(), f = n > 0 ? n : 100, p = typeof t == "number" && Number.isFinite(t), m = p ? re(t, 0, f) : null, h = p ? Math.round(m / f * 100) : null;
892
+ var ie = (e, t, n) => Math.min(n, Math.max(t, e)), K = (e) => typeof e == "number" ? `${e}px` : e;
893
+ function ae({ label: e, value: t, max: n = 100, valueText: r, showValue: a = !1, hideLabel: o = !1, className: s = "", ...c }) {
894
+ let l = i(), f = n > 0 ? n : 100, p = typeof t == "number" && Number.isFinite(t), m = p ? ie(t, 0, f) : null, h = p ? Math.round(m / f * 100) : null;
895
895
  return /* @__PURE__ */ d("div", {
896
896
  className: `piq-progress${p ? "" : " piq-progress--indeterminate"}${s ? ` ${s}` : ""}`,
897
897
  ...c,
@@ -943,7 +943,7 @@ function q() {
943
943
  })]
944
944
  });
945
945
  }
946
- function ae({ size: e = "md", label: t = "Loading", showLabel: n = !1, className: r = "", ...i }) {
946
+ function oe({ size: e = "md", label: t = "Loading", showLabel: n = !1, className: r = "", ...i }) {
947
947
  return /* @__PURE__ */ d("span", {
948
948
  className: `piq-spinner piq-spinner--${e}${r ? ` ${r}` : ""}`,
949
949
  role: "status",
@@ -954,7 +954,7 @@ function ae({ size: e = "md", label: t = "Loading", showLabel: n = !1, className
954
954
  })]
955
955
  });
956
956
  }
957
- function oe({ variant: e = "text", lines: t = 1, width: n, height: r, className: i = "", style: a, ...o }) {
957
+ function se({ variant: e = "text", lines: t = 1, width: n, height: r, className: i = "", style: a, ...o }) {
958
958
  let s = `piq-skeleton piq-skeleton--${e}${i ? ` ${i}` : ""}`;
959
959
  if (e === "text") {
960
960
  let e = Math.max(1, Math.floor(t));
@@ -988,13 +988,13 @@ function oe({ variant: e = "text", lines: t = 1, width: n, height: r, className:
988
988
  }
989
989
  //#endregion
990
990
  //#region src/widgets/Button.jsx
991
- var se = {
991
+ var ce = {
992
992
  primary: "",
993
993
  secondary: " piq-btn--secondary",
994
994
  text: " piq-btn--text"
995
995
  };
996
996
  function J({ variant: e = "primary", size: t, badge: n, busy: r = !1, type: i = "button", className: a = "", onClick: o, children: s, ...c }) {
997
- let f = `piq-btn${se[e] ?? ""}${t === "sm" ? " piq-btn--sm" : ""}${r ? " piq-btn--busy" : ""}${a ? ` ${a}` : ""}`, p = /* @__PURE__ */ d(l, { children: [s, n != null && /* @__PURE__ */ u("span", {
997
+ let f = `piq-btn${ce[e] ?? ""}${t === "sm" ? " piq-btn--sm" : ""}${r ? " piq-btn--busy" : ""}${a ? ` ${a}` : ""}`, p = /* @__PURE__ */ d(l, { children: [s, n != null && /* @__PURE__ */ u("span", {
998
998
  className: "piq-btn__badge",
999
999
  children: n
1000
1000
  })] });
@@ -1022,7 +1022,7 @@ function J({ variant: e = "primary", size: t, badge: n, busy: r = !1, type: i =
1022
1022
  }
1023
1023
  //#endregion
1024
1024
  //#region src/widgets/Choice.jsx
1025
- function ce({ label: e, className: t = "", ...n }) {
1025
+ function le({ label: e, className: t = "", ...n }) {
1026
1026
  return /* @__PURE__ */ d("label", {
1027
1027
  className: `piq-check${t ? ` ${t}` : ""}`,
1028
1028
  children: [/* @__PURE__ */ u("input", {
@@ -1032,7 +1032,7 @@ function ce({ label: e, className: t = "", ...n }) {
1032
1032
  }), /* @__PURE__ */ u("span", { children: e })]
1033
1033
  });
1034
1034
  }
1035
- function le({ label: e, className: t = "", ...n }) {
1035
+ function ue({ label: e, className: t = "", ...n }) {
1036
1036
  return /* @__PURE__ */ d("label", {
1037
1037
  className: `piq-check piq-switch${t ? ` ${t}` : ""}`,
1038
1038
  children: [/* @__PURE__ */ u("input", {
@@ -1043,7 +1043,7 @@ function le({ label: e, className: t = "", ...n }) {
1043
1043
  }), /* @__PURE__ */ u("span", { children: e })]
1044
1044
  });
1045
1045
  }
1046
- function ue({ label: e, options: t, name: n, value: r, defaultValue: a, onChange: o, disabled: s }) {
1046
+ function de({ label: e, options: t, name: n, value: r, defaultValue: a, onChange: o, disabled: s }) {
1047
1047
  let c = i(), l = n ?? c;
1048
1048
  return /* @__PURE__ */ d("fieldset", {
1049
1049
  className: "piq-radios",
@@ -1112,7 +1112,7 @@ function X({ label: e, hint: t, error: n, id: r, className: i = "", ...a }) {
1112
1112
  })
1113
1113
  });
1114
1114
  }
1115
- function de({ label: e, hint: t, error: n, id: r, className: i = "", rows: a = 4, ...o }) {
1115
+ function fe({ label: e, hint: t, error: n, id: r, className: i = "", rows: a = 4, ...o }) {
1116
1116
  return /* @__PURE__ */ u(Y, {
1117
1117
  label: e,
1118
1118
  hint: t,
@@ -1169,7 +1169,7 @@ function Q({ label: e, value: t, onChange: n, min: r, max: i, hint: a, error: o,
1169
1169
  onChange: (e) => n?.(e.target.value)
1170
1170
  });
1171
1171
  }
1172
- function fe({ label: e, from: t, to: n, onChange: r, min: a, max: o, fromLabel: s = "From", toLabel: c = "To", className: l }) {
1172
+ function pe({ label: e, from: t, to: n, onChange: r, min: a, max: o, fromLabel: s = "From", toLabel: c = "To", className: l }) {
1173
1173
  let f = i();
1174
1174
  return /* @__PURE__ */ d("fieldset", {
1175
1175
  className: `piq-date-range${l ? ` ${l}` : ""}`,
@@ -1215,7 +1215,7 @@ function $(e, t) {
1215
1215
  }
1216
1216
  //#endregion
1217
1217
  //#region src/widgets/Dialog.jsx
1218
- function pe({ open: e = !1, onClose: t, title: n, description: r, actions: a, closeLabel: o = "Close", initialFocus: s, role: c, className: l, children: f, ...p }) {
1218
+ function me({ open: e = !1, onClose: t, title: n, description: r, actions: a, closeLabel: o = "Close", initialFocus: s, role: c, className: l, children: f, ...p }) {
1219
1219
  let m = $(e, s), h = i(), g = i();
1220
1220
  return /* @__PURE__ */ d("dialog", {
1221
1221
  ref: m,
@@ -1260,7 +1260,7 @@ function pe({ open: e = !1, onClose: t, title: n, description: r, actions: a, cl
1260
1260
  }
1261
1261
  //#endregion
1262
1262
  //#region src/widgets/MenuButton.jsx
1263
- function me({ label: e, items: t = [], icon: n, variant: a = "secondary", size: o, align: l = "start", buttonLabel: f, className: p, ...m }) {
1263
+ function he({ label: e, items: t = [], icon: n, variant: a = "secondary", size: o, align: l = "start", buttonLabel: f, className: p, ...m }) {
1264
1264
  let [h, g] = c(!1), [_, v] = c(-1), y = s(null), b = s(null), x = i(), S = t.map((e, t) => e.disabled ? -1 : t).filter((e) => e >= 0), C = (e) => {
1265
1265
  g(!0), v(e === "last" ? S.at(-1) : S[0]);
1266
1266
  }, w = (e = !0) => {
@@ -1360,7 +1360,7 @@ function me({ label: e, items: t = [], icon: n, variant: a = "secondary", size:
1360
1360
  }
1361
1361
  //#endregion
1362
1362
  //#region src/widgets/Pagination.jsx
1363
- function he({ page: e = 1, pageSize: t = 20, total: n = 0, onPageChange: r, pageSizes: i = [
1363
+ function ge({ page: e = 1, pageSize: t = 20, total: n = 0, onPageChange: r, pageSizes: i = [
1364
1364
  10,
1365
1365
  20,
1366
1366
  50,
@@ -1409,7 +1409,7 @@ function he({ page: e = 1, pageSize: t = 20, total: n = 0, onPageChange: r, page
1409
1409
  }
1410
1410
  //#endregion
1411
1411
  //#region src/widgets/Sheet.jsx
1412
- function ge({ open: e = !1, onClose: t, title: n, label: r, side: a = "start", closeLabel: o = "Close", initialFocus: s, className: c, children: l, ...f }) {
1412
+ function _e({ open: e = !1, onClose: t, title: n, label: r, side: a = "start", closeLabel: o = "Close", initialFocus: s, className: c, children: l, ...f }) {
1413
1413
  let p = $(e, s), m = i();
1414
1414
  return /* @__PURE__ */ u("dialog", {
1415
1415
  ref: p,
@@ -1445,7 +1445,7 @@ function ge({ open: e = !1, onClose: t, title: n, label: r, side: a = "start", c
1445
1445
  }
1446
1446
  //#endregion
1447
1447
  //#region src/widgets/Tabs.jsx
1448
- function _e({ tabs: e = [], value: t, defaultValue: n, onChange: r, label: a, className: o, ...l }) {
1448
+ function ve({ tabs: e = [], value: t, defaultValue: n, onChange: r, label: a, className: o, ...l }) {
1449
1449
  let [f, p] = c(n ?? e[0]?.id), m = t ?? f, h = i(), g = s(null);
1450
1450
  function _(e, n) {
1451
1451
  t === void 0 && p(e), e !== m && r?.(e), n && [...g.current?.querySelectorAll("[role=\"tab\"]") ?? []].find((t) => t.dataset.tab === String(e))?.focus();
@@ -1496,6 +1496,6 @@ function _e({ tabs: e = [], value: t, defaultValue: n, onChange: r, label: a, cl
1496
1496
  });
1497
1497
  }
1498
1498
  //#endregion
1499
- export { p as A, te as C, M as D, O as E, b as O, B as S, j as T, oe as _, pe as a, G as b, Y as c, X as d, ce as f, ie as g, J as h, me as i, f as j, v as k, Z as l, le as m, ge as n, Q as o, ue as p, he as r, fe as s, _e as t, de as u, ae as v, x as w, z as x, L as y };
1499
+ export { p as A, W as C, M as D, k as E, x as O, B as S, j as T, se as _, me as a, G as b, Y as c, X as d, le as f, ae as g, J as h, he as i, f as j, y as k, Z as l, ue as m, _e as n, Q as o, de as p, ge as r, pe as s, ve as t, fe as u, oe as v, S as w, z as x, L as y };
1500
1500
 
1501
- //# sourceMappingURL=shared-CjrUPFqv.js.map
1501
+ //# sourceMappingURL=shared-CAXoQbx9.js.map