buildgrid-ui 1.17.1 → 1.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +172 -5
- package/dist/buildgrid-ui.css +1 -1
- package/dist/buildgrid-ui.es.js +63 -35
- package/dist/buildgrid-ui.umd.js +6 -6
- package/dist/components/card/card.d.ts +3 -1
- package/dist/components/skeleton/skeleton.d.ts +1 -1
- package/package.json +162 -149
package/dist/buildgrid-ui.es.js
CHANGED
|
@@ -10575,18 +10575,21 @@ function YS({
|
|
|
10575
10575
|
})
|
|
10576
10576
|
] });
|
|
10577
10577
|
}
|
|
10578
|
-
const et = ({ className: e, repeat: t = 1, ...n }) =>
|
|
10579
|
-
|
|
10580
|
-
{
|
|
10581
|
-
|
|
10582
|
-
|
|
10583
|
-
|
|
10584
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
|
|
10578
|
+
const et = ({ className: e, repeat: t = 1, ...n }) => {
|
|
10579
|
+
const r = t == null || Number.isNaN(t) || t < 0 ? 1 : Math.floor(t);
|
|
10580
|
+
return r === 0 ? null : /* @__PURE__ */ c.jsx(c.Fragment, { children: Array.from({ length: r }).map((o, a) => /* @__PURE__ */ c.jsx(
|
|
10581
|
+
"div",
|
|
10582
|
+
{
|
|
10583
|
+
className: I(
|
|
10584
|
+
"animate-shimmer bg-gradient-to-r from-gray-300 via-gray-100 to-gray-300",
|
|
10585
|
+
"bg-[length:200%_100%] rounded-md h-5",
|
|
10586
|
+
e
|
|
10587
|
+
),
|
|
10588
|
+
...n
|
|
10589
|
+
},
|
|
10590
|
+
a
|
|
10591
|
+
)) });
|
|
10592
|
+
};
|
|
10590
10593
|
function qS({ columns: e, rows: t = 5 }) {
|
|
10591
10594
|
return /* @__PURE__ */ c.jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ c.jsxs(Gi, { children: [
|
|
10592
10595
|
/* @__PURE__ */ c.jsx(Yi, { children: /* @__PURE__ */ c.jsx(lr, { children: Array.from({ length: e }).map((n, r) => /* @__PURE__ */ c.jsx(po, { children: /* @__PURE__ */ c.jsx(et, { className: "h-4 w-20" }) }, r)) }) }),
|
|
@@ -11487,11 +11490,12 @@ const bM = yr(function(t, n) {
|
|
|
11487
11490
|
i || null
|
|
11488
11491
|
), S = Ve(null), C = Ve(null), j = Ve(null);
|
|
11489
11492
|
Ne(() => {
|
|
11490
|
-
if (s)
|
|
11491
|
-
|
|
11492
|
-
|
|
11493
|
-
|
|
11494
|
-
|
|
11493
|
+
if (s !== void 0)
|
|
11494
|
+
if (s) {
|
|
11495
|
+
const _ = r.find((M) => M.value === s);
|
|
11496
|
+
_ && (w(_), d(_.label));
|
|
11497
|
+
} else
|
|
11498
|
+
w(null), d("");
|
|
11495
11499
|
}, [s, r]), Bi(n, () => ({
|
|
11496
11500
|
clearSelection: () => {
|
|
11497
11501
|
w(null), d(""), a(null);
|
|
@@ -12258,16 +12262,21 @@ const sk = {
|
|
|
12258
12262
|
}
|
|
12259
12263
|
);
|
|
12260
12264
|
};
|
|
12261
|
-
function CM({
|
|
12265
|
+
function CM({
|
|
12266
|
+
className: e,
|
|
12267
|
+
size: t = "default",
|
|
12268
|
+
...n
|
|
12269
|
+
}) {
|
|
12262
12270
|
return /* @__PURE__ */ c.jsx(
|
|
12263
12271
|
"div",
|
|
12264
12272
|
{
|
|
12265
12273
|
"data-slot": "card",
|
|
12274
|
+
"data-size": t,
|
|
12266
12275
|
className: I(
|
|
12267
|
-
"bg-card text-card-foreground
|
|
12276
|
+
"ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col",
|
|
12268
12277
|
e
|
|
12269
12278
|
),
|
|
12270
|
-
...
|
|
12279
|
+
...n
|
|
12271
12280
|
}
|
|
12272
12281
|
);
|
|
12273
12282
|
}
|
|
@@ -12277,7 +12286,7 @@ function SM({ className: e, ...t }) {
|
|
|
12277
12286
|
{
|
|
12278
12287
|
"data-slot": "card-header",
|
|
12279
12288
|
className: I(
|
|
12280
|
-
"@container/card-header grid auto-rows-min
|
|
12289
|
+
"gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]",
|
|
12281
12290
|
e
|
|
12282
12291
|
),
|
|
12283
12292
|
...t
|
|
@@ -12289,7 +12298,10 @@ function EM({ className: e, ...t }) {
|
|
|
12289
12298
|
"div",
|
|
12290
12299
|
{
|
|
12291
12300
|
"data-slot": "card-title",
|
|
12292
|
-
className: I(
|
|
12301
|
+
className: I(
|
|
12302
|
+
"text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",
|
|
12303
|
+
e
|
|
12304
|
+
),
|
|
12293
12305
|
...t
|
|
12294
12306
|
}
|
|
12295
12307
|
);
|
|
@@ -12318,14 +12330,24 @@ function NM({ className: e, ...t }) {
|
|
|
12318
12330
|
);
|
|
12319
12331
|
}
|
|
12320
12332
|
function RM({ className: e, ...t }) {
|
|
12321
|
-
return /* @__PURE__ */ c.jsx(
|
|
12333
|
+
return /* @__PURE__ */ c.jsx(
|
|
12334
|
+
"div",
|
|
12335
|
+
{
|
|
12336
|
+
"data-slot": "card-content",
|
|
12337
|
+
className: I("px-4 group-data-[size=sm]/card:px-3", e),
|
|
12338
|
+
...t
|
|
12339
|
+
}
|
|
12340
|
+
);
|
|
12322
12341
|
}
|
|
12323
12342
|
function PM({ className: e, ...t }) {
|
|
12324
12343
|
return /* @__PURE__ */ c.jsx(
|
|
12325
12344
|
"div",
|
|
12326
12345
|
{
|
|
12327
12346
|
"data-slot": "card-footer",
|
|
12328
|
-
className: I(
|
|
12347
|
+
className: I(
|
|
12348
|
+
"bg-muted/50 rounded-b-xl border-t p-4 group-data-[size=sm]/card:p-3 flex items-center",
|
|
12349
|
+
e
|
|
12350
|
+
),
|
|
12329
12351
|
...t
|
|
12330
12352
|
}
|
|
12331
12353
|
);
|
|
@@ -14397,8 +14419,13 @@ const JN = V.forwardRef(
|
|
|
14397
14419
|
const x = g.toFixed(2).split("."), b = x[0].replace(/\B(?=(\d{3})+(?!\d))/g, o);
|
|
14398
14420
|
return `${n} ${b}${r}${x[1]}`;
|
|
14399
14421
|
}, m = (g) => {
|
|
14400
|
-
const
|
|
14401
|
-
|
|
14422
|
+
const b = g.target.value.replace(/\D/g, "");
|
|
14423
|
+
if (b === "") {
|
|
14424
|
+
f(h(0)), a(0);
|
|
14425
|
+
return;
|
|
14426
|
+
}
|
|
14427
|
+
const y = parseFloat(b) / 100;
|
|
14428
|
+
f(h(y)), a(y), d.current && window.requestAnimationFrame(() => {
|
|
14402
14429
|
d.current?.setSelectionRange(
|
|
14403
14430
|
d.current.value.length,
|
|
14404
14431
|
d.current.value.length
|
|
@@ -15820,6 +15847,7 @@ function ZM(e) {
|
|
|
15820
15847
|
className: "absolute right-0 top-0 h-full",
|
|
15821
15848
|
onClick: () => f(!p),
|
|
15822
15849
|
"aria-label": p ? a : o,
|
|
15850
|
+
disabled: s.disabled,
|
|
15823
15851
|
children: p ? /* @__PURE__ */ c.jsx(vy, { className: "h-4 w-4" }) : /* @__PURE__ */ c.jsx(by, { className: "h-4 w-4" })
|
|
15824
15852
|
}
|
|
15825
15853
|
)
|
|
@@ -22191,7 +22219,7 @@ function $_({
|
|
|
22191
22219
|
onFilesChange: t,
|
|
22192
22220
|
onFileUpload: n,
|
|
22193
22221
|
className: r,
|
|
22194
|
-
placeholder: o = "
|
|
22222
|
+
placeholder: o = "Drag files here or click to select"
|
|
22195
22223
|
}) {
|
|
22196
22224
|
const [a, i] = pe([]), [s, l] = pe(!1), d = { ...cd, ...e }, p = he(
|
|
22197
22225
|
async (y) => {
|
|
@@ -22212,7 +22240,7 @@ function $_({
|
|
|
22212
22240
|
);
|
|
22213
22241
|
} catch {
|
|
22214
22242
|
i(
|
|
22215
|
-
(k) => k.map((N) => N.id === C.id ? { ...N, error: "
|
|
22243
|
+
(k) => k.map((N) => N.id === C.id ? { ...N, error: "Upload error" } : N)
|
|
22216
22244
|
);
|
|
22217
22245
|
}
|
|
22218
22246
|
l(!1);
|
|
@@ -22255,15 +22283,15 @@ function $_({
|
|
|
22255
22283
|
children: [
|
|
22256
22284
|
/* @__PURE__ */ c.jsx("input", { ...h() }),
|
|
22257
22285
|
/* @__PURE__ */ c.jsx(Qy, { className: "mx-auto h-12 w-12 text-muted-foreground mb-4" }),
|
|
22258
|
-
/* @__PURE__ */ c.jsx("p", { className: "text-lg font-medium mb-2", children: m ? "
|
|
22286
|
+
/* @__PURE__ */ c.jsx("p", { className: "text-lg font-medium mb-2", children: m ? "Drop files here" : o }),
|
|
22259
22287
|
/* @__PURE__ */ c.jsxs("p", { className: "text-sm text-muted-foreground", children: [
|
|
22260
|
-
"
|
|
22288
|
+
"Maximum ",
|
|
22261
22289
|
d.maxFiles,
|
|
22262
|
-
"
|
|
22290
|
+
" file",
|
|
22263
22291
|
d.maxFiles !== 1 ? "s" : "",
|
|
22264
|
-
" •
|
|
22292
|
+
" • Up to ",
|
|
22265
22293
|
Math.round((d.maxSize || 0) / 1024 / 1024),
|
|
22266
|
-
"MB
|
|
22294
|
+
"MB each"
|
|
22267
22295
|
] })
|
|
22268
22296
|
]
|
|
22269
22297
|
}
|
|
@@ -22284,7 +22312,7 @@ function $_({
|
|
|
22284
22312
|
y.name
|
|
22285
22313
|
)) }),
|
|
22286
22314
|
a.length > 0 && /* @__PURE__ */ c.jsxs("div", { className: "space-y-2", children: [
|
|
22287
|
-
/* @__PURE__ */ c.jsx("h4", { className: "font-medium", children: "
|
|
22315
|
+
/* @__PURE__ */ c.jsx("h4", { className: "font-medium", children: "Selected files:" }),
|
|
22288
22316
|
a.map((y) => /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-3 p-3 border rounded-lg", children: [
|
|
22289
22317
|
d.showPreview && y.preview ? /* @__PURE__ */ c.jsx(
|
|
22290
22318
|
"img",
|
|
@@ -22295,7 +22323,7 @@ function $_({
|
|
|
22295
22323
|
}
|
|
22296
22324
|
) : /* @__PURE__ */ c.jsx("div", { className: "h-10 w-10 flex items-center justify-center bg-muted rounded", children: x(y) }),
|
|
22297
22325
|
/* @__PURE__ */ c.jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
22298
|
-
/* @__PURE__ */ c.jsx("p", { className: "text-sm font-medium truncate", title: y.name, children: y.name || "
|
|
22326
|
+
/* @__PURE__ */ c.jsx("p", { className: "text-sm font-medium truncate", title: y.name, children: y.name || "Unnamed file" }),
|
|
22299
22327
|
/* @__PURE__ */ c.jsx("p", { className: "text-xs text-muted-foreground", children: b(y.size) }),
|
|
22300
22328
|
d.showProgress && y.progress !== void 0 && /* @__PURE__ */ c.jsx(ec, { value: y.progress, className: "mt-1 h-1" }),
|
|
22301
22329
|
y.error && /* @__PURE__ */ c.jsx("p", { className: "text-xs text-destructive mt-1", children: y.error })
|