@yenio-pld/blocks 1.2.0-rc.16 → 1.2.0-rc.17
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/dist/index.cjs +43 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -4
- package/dist/index.d.ts +23 -4
- package/dist/index.js +43 -5
- package/dist/index.js.map +1 -1
- package/dist/ui/button.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -179,6 +179,32 @@ function avatarFallbackStyle(name) {
|
|
|
179
179
|
function cn(...inputs) {
|
|
180
180
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
181
181
|
}
|
|
182
|
+
var SIZE_CLASS = {
|
|
183
|
+
sm: "max-w-[140px]",
|
|
184
|
+
md: "max-w-[220px]",
|
|
185
|
+
lg: "max-w-[280px]"
|
|
186
|
+
};
|
|
187
|
+
function ProductIllustration({
|
|
188
|
+
src,
|
|
189
|
+
alt = "",
|
|
190
|
+
className,
|
|
191
|
+
size = "md"
|
|
192
|
+
}) {
|
|
193
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
194
|
+
"img",
|
|
195
|
+
{
|
|
196
|
+
src,
|
|
197
|
+
alt,
|
|
198
|
+
loading: "lazy",
|
|
199
|
+
decoding: "async",
|
|
200
|
+
className: cn(
|
|
201
|
+
"mx-auto h-auto w-full object-contain",
|
|
202
|
+
SIZE_CLASS[size],
|
|
203
|
+
className
|
|
204
|
+
)
|
|
205
|
+
}
|
|
206
|
+
);
|
|
207
|
+
}
|
|
182
208
|
function LoadingState({
|
|
183
209
|
label,
|
|
184
210
|
className
|
|
@@ -236,6 +262,7 @@ function EmptyState({
|
|
|
236
262
|
description,
|
|
237
263
|
action,
|
|
238
264
|
icon: Icon = lucideReact.Inbox,
|
|
265
|
+
illustration,
|
|
239
266
|
variant = "default",
|
|
240
267
|
className
|
|
241
268
|
}) {
|
|
@@ -250,7 +277,14 @@ function EmptyState({
|
|
|
250
277
|
),
|
|
251
278
|
children: [
|
|
252
279
|
/* @__PURE__ */ jsxRuntime.jsxs(empty_js.EmptyHeader, { className: "gap-3", children: [
|
|
253
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
280
|
+
illustration ? /* @__PURE__ */ jsxRuntime.jsx(empty_js.EmptyMedia, { variant: "default", className: "mb-0 w-full max-w-[240px]", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
281
|
+
ProductIllustration,
|
|
282
|
+
{
|
|
283
|
+
src: illustration.src,
|
|
284
|
+
alt: illustration.alt ?? "",
|
|
285
|
+
size: isCompact ? "sm" : "md"
|
|
286
|
+
}
|
|
287
|
+
) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
254
288
|
empty_js.EmptyMedia,
|
|
255
289
|
{
|
|
256
290
|
variant: "icon",
|
|
@@ -603,6 +637,7 @@ function DataTableBody({
|
|
|
603
637
|
rowKey,
|
|
604
638
|
emptyTitle,
|
|
605
639
|
emptyDescription,
|
|
640
|
+
emptyIllustration,
|
|
606
641
|
skeletonRows
|
|
607
642
|
}) {
|
|
608
643
|
switch (mode) {
|
|
@@ -621,7 +656,8 @@ function DataTableBody({
|
|
|
621
656
|
{
|
|
622
657
|
variant: "compact",
|
|
623
658
|
title: emptyTitle,
|
|
624
|
-
description: emptyDescription
|
|
659
|
+
description: emptyDescription,
|
|
660
|
+
illustration: emptyIllustration
|
|
625
661
|
}
|
|
626
662
|
) }) });
|
|
627
663
|
case "rows":
|
|
@@ -646,6 +682,7 @@ function DataTable({
|
|
|
646
682
|
toolbar,
|
|
647
683
|
emptyTitle,
|
|
648
684
|
emptyDescription,
|
|
685
|
+
emptyIllustration,
|
|
649
686
|
loading = false,
|
|
650
687
|
skeletonRows = DATA_TABLE_DEFAULT_SKELETON_ROWS,
|
|
651
688
|
loadMore,
|
|
@@ -667,6 +704,7 @@ function DataTable({
|
|
|
667
704
|
rowKey,
|
|
668
705
|
emptyTitle,
|
|
669
706
|
emptyDescription,
|
|
707
|
+
emptyIllustration,
|
|
670
708
|
skeletonRows
|
|
671
709
|
}
|
|
672
710
|
) })
|
|
@@ -6673,7 +6711,7 @@ function OptionRow({
|
|
|
6673
6711
|
),
|
|
6674
6712
|
...props,
|
|
6675
6713
|
children: [
|
|
6676
|
-
icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg]:size-5", children: icon }) : null,
|
|
6714
|
+
icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-10 shrink-0 items-center justify-center overflow-hidden rounded-lg bg-muted text-foreground [&_img]:size-9 [&_img]:object-contain [&_svg]:size-5", children: icon }) : null,
|
|
6677
6715
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0 flex-1", children: [
|
|
6678
6716
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-wrap items-center gap-2", children: [
|
|
6679
6717
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-foreground", children: title }),
|
|
@@ -7110,7 +7148,7 @@ function SectionCard({
|
|
|
7110
7148
|
] }),
|
|
7111
7149
|
headerAction ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: headerAction }) : null
|
|
7112
7150
|
] }),
|
|
7113
|
-
/* @__PURE__ */ jsxRuntime.jsx(card_js.CardContent, { children }),
|
|
7151
|
+
children != null ? /* @__PURE__ */ jsxRuntime.jsx(card_js.CardContent, { children }) : null,
|
|
7114
7152
|
footer ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end border-t border-border/60 px-6 pb-6 pt-4", children: footer }) : null
|
|
7115
7153
|
]
|
|
7116
7154
|
}
|
|
@@ -7785,6 +7823,7 @@ exports.PageTitleSkeleton = PageTitleSkeleton;
|
|
|
7785
7823
|
exports.PaginatedCombobox = PaginatedCombobox;
|
|
7786
7824
|
exports.PasswordInput = PasswordInput;
|
|
7787
7825
|
exports.PhoneInput = PhoneInput;
|
|
7826
|
+
exports.ProductIllustration = ProductIllustration;
|
|
7788
7827
|
exports.QueueLayout = QueueLayout;
|
|
7789
7828
|
exports.RfcInput = RfcInput;
|
|
7790
7829
|
exports.RiskBadge = RiskBadge;
|