@axtec/components 0.1.4 → 0.1.6
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 +6 -0
- package/dist/components/OptionDivider/OptionDivider.d.ts +5 -0
- package/dist/components/OptionDivider/index.d.ts +1 -0
- package/dist/components/SelectionCard/SelectionCard.d.ts +12 -0
- package/dist/components/SelectionCard/index.d.ts +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/index.css +1 -1
- package/dist/index.js +106 -102
- package/dist/index.js.map +1 -1
- package/dist/index12.js +1 -1
- package/dist/index3.js +2 -2
- package/dist/index43.js +12 -14
- package/dist/index43.js.map +1 -1
- package/dist/index44.js +11 -87
- package/dist/index44.js.map +1 -1
- package/dist/index45.js +91 -69
- package/dist/index45.js.map +1 -1
- package/dist/index46.js +68 -121
- package/dist/index46.js.map +1 -1
- package/dist/index47.js +118 -36
- package/dist/index47.js.map +1 -1
- package/dist/index48.js +40 -44
- package/dist/index48.js.map +1 -1
- package/dist/index49.js +44 -56
- package/dist/index49.js.map +1 -1
- package/dist/index50.js +56 -16
- package/dist/index50.js.map +1 -1
- package/dist/index51.js +16 -65
- package/dist/index51.js.map +1 -1
- package/dist/index52.js +62 -51
- package/dist/index52.js.map +1 -1
- package/dist/index53.js +54 -37
- package/dist/index53.js.map +1 -1
- package/dist/index54.js +37 -66
- package/dist/index54.js.map +1 -1
- package/dist/index55.js +63 -19
- package/dist/index55.js.map +1 -1
- package/dist/index56.js +19 -101
- package/dist/index56.js.map +1 -1
- package/dist/index57.js +99 -213
- package/dist/index57.js.map +1 -1
- package/dist/index58.js +58 -62
- package/dist/index58.js.map +1 -1
- package/dist/index59.js +206 -224
- package/dist/index59.js.map +1 -1
- package/dist/index60.js +62 -96
- package/dist/index60.js.map +1 -1
- package/dist/index61.js +233 -33
- package/dist/index61.js.map +1 -1
- package/dist/index62.js +98 -14
- package/dist/index62.js.map +1 -1
- package/dist/index63.js +35 -59
- package/dist/index63.js.map +1 -1
- package/dist/index64.js +16 -59
- package/dist/index64.js.map +1 -1
- package/dist/index65.js +57 -72
- package/dist/index65.js.map +1 -1
- package/dist/index66.js +58 -106
- package/dist/index66.js.map +1 -1
- package/dist/index67.js +70 -43
- package/dist/index67.js.map +1 -1
- package/dist/index68.js +101 -40
- package/dist/index68.js.map +1 -1
- package/dist/index69.js +44 -72
- package/dist/index69.js.map +1 -1
- package/dist/index70.js +47 -53
- package/dist/index70.js.map +1 -1
- package/dist/index71.js +70 -62
- package/dist/index71.js.map +1 -1
- package/dist/index72.js +46 -28
- package/dist/index72.js.map +1 -1
- package/dist/index73.js +67 -13
- package/dist/index73.js.map +1 -1
- package/dist/index74.js +35 -2263
- package/dist/index74.js.map +1 -1
- package/dist/index75.js +17 -0
- package/dist/index75.js.map +1 -0
- package/dist/index76.js +2267 -0
- package/dist/index76.js.map +1 -0
- package/package.json +1 -1
package/dist/index44.js
CHANGED
|
@@ -1,94 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
function u(i, t, e) {
|
|
8
|
-
const l = e * 2 + 5;
|
|
9
|
-
if (t <= l)
|
|
10
|
-
return p(1, t);
|
|
11
|
-
const o = Math.max(i - e, 1), r = Math.min(i + e, t), a = o > 2, d = r < t - 1;
|
|
12
|
-
return !a && d ? [...p(1, 3 + e * 2), "ellipsis", t] : a && !d ? [1, "ellipsis", ...p(t - (2 + e * 2), t)] : [1, "ellipsis", ...p(o, r), "ellipsis", t];
|
|
13
|
-
}
|
|
14
|
-
function R({
|
|
15
|
-
currentPage: i,
|
|
16
|
-
totalPages: t,
|
|
17
|
-
onPageChange: e,
|
|
18
|
-
siblingCount: l = 1,
|
|
19
|
-
className: o
|
|
20
|
-
}) {
|
|
21
|
-
const r = u(i, t, l);
|
|
22
|
-
if (t <= 1)
|
|
23
|
-
return null;
|
|
24
|
-
const a = () => {
|
|
25
|
-
i > 1 && e(i - 1);
|
|
26
|
-
}, d = () => {
|
|
27
|
-
i < t && e(i + 1);
|
|
28
|
-
};
|
|
29
|
-
return /* @__PURE__ */ m(
|
|
30
|
-
"nav",
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { cn as i } from "./index3.js";
|
|
3
|
+
function a({ children: t, className: e }) {
|
|
4
|
+
return /* @__PURE__ */ r(
|
|
5
|
+
"h1",
|
|
31
6
|
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
{
|
|
38
|
-
type: "button",
|
|
39
|
-
onClick: a,
|
|
40
|
-
disabled: i === 1,
|
|
41
|
-
className: c(
|
|
42
|
-
"p-2 rounded-lg transition-colors duration-150",
|
|
43
|
-
"text-slate-500 hover:bg-slate-100 hover:text-slate-700",
|
|
44
|
-
"disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent"
|
|
45
|
-
),
|
|
46
|
-
"aria-label": "Previous page",
|
|
47
|
-
children: /* @__PURE__ */ s(b, { className: "h-5 w-5" })
|
|
48
|
-
}
|
|
49
|
-
),
|
|
50
|
-
r.map((n, h) => n === "ellipsis" ? /* @__PURE__ */ s(
|
|
51
|
-
"span",
|
|
52
|
-
{
|
|
53
|
-
className: "px-3 py-2 text-slate-400",
|
|
54
|
-
children: "..."
|
|
55
|
-
},
|
|
56
|
-
`ellipsis-${h}`
|
|
57
|
-
) : /* @__PURE__ */ s(
|
|
58
|
-
"button",
|
|
59
|
-
{
|
|
60
|
-
type: "button",
|
|
61
|
-
onClick: () => e(n),
|
|
62
|
-
className: c(
|
|
63
|
-
"min-w-[40px] h-10 px-3 rounded-lg text-sm font-medium",
|
|
64
|
-
"transition-colors duration-150",
|
|
65
|
-
n === i ? "bg-primary-500 text-white" : "text-slate-700 hover:bg-slate-100"
|
|
66
|
-
),
|
|
67
|
-
"aria-current": n === i ? "page" : void 0,
|
|
68
|
-
children: n
|
|
69
|
-
},
|
|
70
|
-
n
|
|
71
|
-
)),
|
|
72
|
-
/* @__PURE__ */ s(
|
|
73
|
-
"button",
|
|
74
|
-
{
|
|
75
|
-
type: "button",
|
|
76
|
-
onClick: d,
|
|
77
|
-
disabled: i === t,
|
|
78
|
-
className: c(
|
|
79
|
-
"p-2 rounded-lg transition-colors duration-150",
|
|
80
|
-
"text-slate-500 hover:bg-slate-100 hover:text-slate-700",
|
|
81
|
-
"disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent"
|
|
82
|
-
),
|
|
83
|
-
"aria-label": "Next page",
|
|
84
|
-
children: /* @__PURE__ */ s(f, { className: "h-5 w-5" })
|
|
85
|
-
}
|
|
86
|
-
)
|
|
87
|
-
]
|
|
7
|
+
className: i(
|
|
8
|
+
"text-5xl font-light text-slate-900 tracking-tight",
|
|
9
|
+
e
|
|
10
|
+
),
|
|
11
|
+
children: t
|
|
88
12
|
}
|
|
89
13
|
);
|
|
90
14
|
}
|
|
91
15
|
export {
|
|
92
|
-
|
|
16
|
+
a as PageHeading
|
|
93
17
|
};
|
|
94
18
|
//# sourceMappingURL=index44.js.map
|
package/dist/index44.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index44.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index44.js","sources":["../src/components/Typography/PageHeading.tsx"],"sourcesContent":["import { cn } from '@/lib/utils'\nimport type { ReactNode } from 'react'\n\nexport interface PageHeadingProps {\n children: ReactNode\n className?: string\n}\n\nexport function PageHeading({ children, className }: PageHeadingProps) {\n return (\n <h1\n className={cn(\n 'text-5xl font-light text-slate-900 tracking-tight',\n className\n )}\n >\n {children}\n </h1>\n )\n}\n"],"names":["PageHeading","children","className","jsx","cn"],"mappings":";;AAQO,SAASA,EAAY,EAAE,UAAAC,GAAU,WAAAC,KAA+B;AACrE,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAGD,UAAAD;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
package/dist/index45.js
CHANGED
|
@@ -1,72 +1,94 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
1
|
+
import { jsxs as m, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeftIcon as b, ChevronRightIcon as f } from "@heroicons/react/20/solid";
|
|
3
|
+
import { cn as c } from "./index3.js";
|
|
4
|
+
function p(i, t) {
|
|
5
|
+
return Array.from({ length: t - i + 1 }, (e, l) => i + l);
|
|
6
|
+
}
|
|
7
|
+
function u(i, t, e) {
|
|
8
|
+
const l = e * 2 + 5;
|
|
9
|
+
if (t <= l)
|
|
10
|
+
return p(1, t);
|
|
11
|
+
const o = Math.max(i - e, 1), r = Math.min(i + e, t), a = o > 2, d = r < t - 1;
|
|
12
|
+
return !a && d ? [...p(1, 3 + e * 2), "ellipsis", t] : a && !d ? [1, "ellipsis", ...p(t - (2 + e * 2), t)] : [1, "ellipsis", ...p(o, r), "ellipsis", t];
|
|
13
|
+
}
|
|
14
|
+
function R({
|
|
15
|
+
currentPage: i,
|
|
16
|
+
totalPages: t,
|
|
17
|
+
onPageChange: e,
|
|
18
|
+
siblingCount: l = 1,
|
|
19
|
+
className: o
|
|
20
|
+
}) {
|
|
21
|
+
const r = u(i, t, l);
|
|
22
|
+
if (t <= 1)
|
|
23
|
+
return null;
|
|
24
|
+
const a = () => {
|
|
25
|
+
i > 1 && e(i - 1);
|
|
26
|
+
}, d = () => {
|
|
27
|
+
i < t && e(i + 1);
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ m(
|
|
30
|
+
"nav",
|
|
31
|
+
{
|
|
32
|
+
"aria-label": "Pagination",
|
|
33
|
+
className: c("flex items-center justify-center gap-1", o),
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ s(
|
|
36
|
+
"button",
|
|
37
|
+
{
|
|
38
|
+
type: "button",
|
|
39
|
+
onClick: a,
|
|
40
|
+
disabled: i === 1,
|
|
41
|
+
className: c(
|
|
42
|
+
"p-2 rounded-lg transition-colors duration-150",
|
|
43
|
+
"text-slate-500 hover:bg-slate-100 hover:text-slate-700",
|
|
44
|
+
"disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent"
|
|
45
|
+
),
|
|
46
|
+
"aria-label": "Previous page",
|
|
47
|
+
children: /* @__PURE__ */ s(b, { className: "h-5 w-5" })
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
r.map((n, h) => n === "ellipsis" ? /* @__PURE__ */ s(
|
|
51
|
+
"span",
|
|
52
|
+
{
|
|
53
|
+
className: "px-3 py-2 text-slate-400",
|
|
54
|
+
children: "..."
|
|
55
|
+
},
|
|
56
|
+
`ellipsis-${h}`
|
|
57
|
+
) : /* @__PURE__ */ s(
|
|
58
|
+
"button",
|
|
59
|
+
{
|
|
60
|
+
type: "button",
|
|
61
|
+
onClick: () => e(n),
|
|
62
|
+
className: c(
|
|
63
|
+
"min-w-[40px] h-10 px-3 rounded-lg text-sm font-medium",
|
|
64
|
+
"transition-colors duration-150",
|
|
65
|
+
n === i ? "bg-primary-500 text-white" : "text-slate-700 hover:bg-slate-100"
|
|
66
|
+
),
|
|
67
|
+
"aria-current": n === i ? "page" : void 0,
|
|
68
|
+
children: n
|
|
69
|
+
},
|
|
70
|
+
n
|
|
71
|
+
)),
|
|
72
|
+
/* @__PURE__ */ s(
|
|
73
|
+
"button",
|
|
74
|
+
{
|
|
75
|
+
type: "button",
|
|
76
|
+
onClick: d,
|
|
77
|
+
disabled: i === t,
|
|
78
|
+
className: c(
|
|
79
|
+
"p-2 rounded-lg transition-colors duration-150",
|
|
80
|
+
"text-slate-500 hover:bg-slate-100 hover:text-slate-700",
|
|
81
|
+
"disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent"
|
|
82
|
+
),
|
|
83
|
+
"aria-label": "Next page",
|
|
84
|
+
children: /* @__PURE__ */ s(f, { className: "h-5 w-5" })
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
63
91
|
export {
|
|
64
|
-
|
|
65
|
-
p as PanelAction,
|
|
66
|
-
x as PanelBody,
|
|
67
|
-
u as PanelEmptyState,
|
|
68
|
-
b as PanelFooter,
|
|
69
|
-
m as PanelHeader,
|
|
70
|
-
d as PanelTitle
|
|
92
|
+
R as Pagination
|
|
71
93
|
};
|
|
72
94
|
//# sourceMappingURL=index45.js.map
|
package/dist/index45.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index45.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index45.js","sources":["../src/components/Pagination/Pagination.tsx"],"sourcesContent":["import { ChevronLeftIcon, ChevronRightIcon } from '@heroicons/react/20/solid'\nimport { cn } from '@/lib/utils'\n\nexport interface PaginationProps {\n currentPage: number\n totalPages: number\n onPageChange: (page: number) => void\n siblingCount?: number\n className?: string\n}\n\nfunction range(start: number, end: number): number[] {\n return Array.from({ length: end - start + 1 }, (_, i) => start + i)\n}\n\nfunction getPaginationRange(\n currentPage: number,\n totalPages: number,\n siblingCount: number\n): (number | 'ellipsis')[] {\n const totalPageNumbers = siblingCount * 2 + 5 // siblings + first + last + current + 2 ellipsis\n\n if (totalPages <= totalPageNumbers) {\n return range(1, totalPages)\n }\n\n const leftSiblingIndex = Math.max(currentPage - siblingCount, 1)\n const rightSiblingIndex = Math.min(currentPage + siblingCount, totalPages)\n\n const showLeftEllipsis = leftSiblingIndex > 2\n const showRightEllipsis = rightSiblingIndex < totalPages - 1\n\n if (!showLeftEllipsis && showRightEllipsis) {\n const leftRange = range(1, 3 + siblingCount * 2)\n return [...leftRange, 'ellipsis', totalPages]\n }\n\n if (showLeftEllipsis && !showRightEllipsis) {\n const rightRange = range(totalPages - (2 + siblingCount * 2), totalPages)\n return [1, 'ellipsis', ...rightRange]\n }\n\n const middleRange = range(leftSiblingIndex, rightSiblingIndex)\n return [1, 'ellipsis', ...middleRange, 'ellipsis', totalPages]\n}\n\nexport function Pagination({\n currentPage,\n totalPages,\n onPageChange,\n siblingCount = 1,\n className,\n}: PaginationProps) {\n const paginationRange = getPaginationRange(currentPage, totalPages, siblingCount)\n\n if (totalPages <= 1) {\n return null\n }\n\n const onPrevious = () => {\n if (currentPage > 1) {\n onPageChange(currentPage - 1)\n }\n }\n\n const onNext = () => {\n if (currentPage < totalPages) {\n onPageChange(currentPage + 1)\n }\n }\n\n return (\n <nav\n aria-label=\"Pagination\"\n className={cn('flex items-center justify-center gap-1', className)}\n >\n <button\n type=\"button\"\n onClick={onPrevious}\n disabled={currentPage === 1}\n className={cn(\n 'p-2 rounded-lg transition-colors duration-150',\n 'text-slate-500 hover:bg-slate-100 hover:text-slate-700',\n 'disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent'\n )}\n aria-label=\"Previous page\"\n >\n <ChevronLeftIcon className=\"h-5 w-5\" />\n </button>\n\n {paginationRange.map((page, index) => {\n if (page === 'ellipsis') {\n return (\n <span\n key={`ellipsis-${index}`}\n className=\"px-3 py-2 text-slate-400\"\n >\n ...\n </span>\n )\n }\n\n return (\n <button\n key={page}\n type=\"button\"\n onClick={() => onPageChange(page)}\n className={cn(\n 'min-w-[40px] h-10 px-3 rounded-lg text-sm font-medium',\n 'transition-colors duration-150',\n page === currentPage\n ? 'bg-primary-500 text-white'\n : 'text-slate-700 hover:bg-slate-100'\n )}\n aria-current={page === currentPage ? 'page' : undefined}\n >\n {page}\n </button>\n )\n })}\n\n <button\n type=\"button\"\n onClick={onNext}\n disabled={currentPage === totalPages}\n className={cn(\n 'p-2 rounded-lg transition-colors duration-150',\n 'text-slate-500 hover:bg-slate-100 hover:text-slate-700',\n 'disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent'\n )}\n aria-label=\"Next page\"\n >\n <ChevronRightIcon className=\"h-5 w-5\" />\n </button>\n </nav>\n )\n}\n"],"names":["range","start","end","_","i","getPaginationRange","currentPage","totalPages","siblingCount","totalPageNumbers","leftSiblingIndex","rightSiblingIndex","showLeftEllipsis","showRightEllipsis","Pagination","onPageChange","className","paginationRange","onPrevious","onNext","jsxs","cn","jsx","ChevronLeftIcon","page","index","ChevronRightIcon"],"mappings":";;;AAWA,SAASA,EAAMC,GAAeC,GAAuB;AACnD,SAAO,MAAM,KAAK,EAAE,QAAQA,IAAMD,IAAQ,EAAA,GAAK,CAACE,GAAGC,MAAMH,IAAQG,CAAC;AACpE;AAEA,SAASC,EACPC,GACAC,GACAC,GACyB;AACzB,QAAMC,IAAmBD,IAAe,IAAI;AAE5C,MAAID,KAAcE;AAChB,WAAOT,EAAM,GAAGO,CAAU;AAG5B,QAAMG,IAAmB,KAAK,IAAIJ,IAAcE,GAAc,CAAC,GACzDG,IAAoB,KAAK,IAAIL,IAAcE,GAAcD,CAAU,GAEnEK,IAAmBF,IAAmB,GACtCG,IAAoBF,IAAoBJ,IAAa;AAE3D,SAAI,CAACK,KAAoBC,IAEhB,CAAC,GADUb,EAAM,GAAG,IAAIQ,IAAe,CAAC,GACzB,YAAYD,CAAU,IAG1CK,KAAoB,CAACC,IAEhB,CAAC,GAAG,YAAY,GADJb,EAAMO,KAAc,IAAIC,IAAe,IAAID,CAAU,CACpC,IAI/B,CAAC,GAAG,YAAY,GADHP,EAAMU,GAAkBC,CAAiB,GACtB,YAAYJ,CAAU;AAC/D;AAEO,SAASO,EAAW;AAAA,EACzB,aAAAR;AAAA,EACA,YAAAC;AAAA,EACA,cAAAQ;AAAA,EACA,cAAAP,IAAe;AAAA,EACf,WAAAQ;AACF,GAAoB;AAClB,QAAMC,IAAkBZ,EAAmBC,GAAaC,GAAYC,CAAY;AAEhF,MAAID,KAAc;AAChB,WAAO;AAGT,QAAMW,IAAa,MAAM;AACvB,IAAIZ,IAAc,KAChBS,EAAaT,IAAc,CAAC;AAAA,EAEhC,GAEMa,IAAS,MAAM;AACnB,IAAIb,IAAcC,KAChBQ,EAAaT,IAAc,CAAC;AAAA,EAEhC;AAEA,SACE,gBAAAc;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,cAAW;AAAA,MACX,WAAWC,EAAG,0CAA0CL,CAAS;AAAA,MAEjE,UAAA;AAAA,QAAA,gBAAAM;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,SAASJ;AAAA,YACT,UAAUZ,MAAgB;AAAA,YAC1B,WAAWe;AAAA,cACT;AAAA,cACA;AAAA,cACA;AAAA,YAAA;AAAA,YAEF,cAAW;AAAA,YAEX,UAAA,gBAAAC,EAACC,GAAA,EAAgB,WAAU,UAAA,CAAU;AAAA,UAAA;AAAA,QAAA;AAAA,QAGtCN,EAAgB,IAAI,CAACO,GAAMC,MACtBD,MAAS,aAET,gBAAAF;AAAA,UAAC;AAAA,UAAA;AAAA,YAEC,WAAU;AAAA,YACX,UAAA;AAAA,UAAA;AAAA,UAFM,YAAYG,CAAK;AAAA,QAAA,IAS1B,gBAAAH;AAAA,UAAC;AAAA,UAAA;AAAA,YAEC,MAAK;AAAA,YACL,SAAS,MAAMP,EAAaS,CAAI;AAAA,YAChC,WAAWH;AAAA,cACT;AAAA,cACA;AAAA,cACAG,MAASlB,IACL,8BACA;AAAA,YAAA;AAAA,YAEN,gBAAckB,MAASlB,IAAc,SAAS;AAAA,YAE7C,UAAAkB;AAAA,UAAA;AAAA,UAZIA;AAAA,QAAA,CAeV;AAAA,QAED,gBAAAF;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,SAASH;AAAA,YACT,UAAUb,MAAgBC;AAAA,YAC1B,WAAWc;AAAA,cACT;AAAA,cACA;AAAA,cACA;AAAA,YAAA;AAAA,YAEF,cAAW;AAAA,YAEX,UAAA,gBAAAC,EAACI,GAAA,EAAiB,WAAU,UAAA,CAAU;AAAA,UAAA;AAAA,QAAA;AAAA,MACxC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
package/dist/index46.js
CHANGED
|
@@ -1,125 +1,72 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
columns: c = 4,
|
|
10
|
-
gap: u = 16,
|
|
11
|
-
emptyMessage: d = "To add images, upload them directly or import from another source.",
|
|
12
|
-
onDelete: a,
|
|
13
|
-
className: i
|
|
14
|
-
}) => {
|
|
15
|
-
const [l, r] = g(null), h = {
|
|
16
|
-
3: "grid-cols-3",
|
|
17
|
-
4: "grid-cols-4",
|
|
18
|
-
5: "grid-cols-5",
|
|
19
|
-
6: "grid-cols-6"
|
|
20
|
-
}, m = () => {
|
|
21
|
-
l !== null && l > 0 && r(l - 1);
|
|
22
|
-
}, f = () => {
|
|
23
|
-
l !== null && l < t.length - 1 && r(l + 1);
|
|
24
|
-
}, b = () => {
|
|
25
|
-
l !== null && a && (a(t[l], l), t.length === 1 ? r(null) : l >= t.length - 1 && r(t.length - 2));
|
|
26
|
-
};
|
|
27
|
-
return t.length === 0 ? /* @__PURE__ */ e(
|
|
28
|
-
x,
|
|
29
|
-
{
|
|
30
|
-
fullBlock: !0,
|
|
31
|
-
message: d,
|
|
32
|
-
className: i
|
|
33
|
-
}
|
|
34
|
-
) : /* @__PURE__ */ n(p, { children: [
|
|
35
|
-
/* @__PURE__ */ e(
|
|
36
|
-
"div",
|
|
37
|
-
{
|
|
38
|
-
className: v("grid", h[c], i),
|
|
39
|
-
style: { gap: `${u}px` },
|
|
40
|
-
children: t.map((o, s) => /* @__PURE__ */ e(
|
|
41
|
-
"div",
|
|
42
|
-
{
|
|
43
|
-
className: "aspect-square rounded-lg overflow-hidden cursor-pointer bg-slate-200 hover:opacity-90 transition-opacity",
|
|
44
|
-
onClick: () => r(s),
|
|
45
|
-
children: /* @__PURE__ */ e(
|
|
46
|
-
"img",
|
|
47
|
-
{
|
|
48
|
-
src: o.url,
|
|
49
|
-
alt: o.alt || `Image ${s + 1}`,
|
|
50
|
-
className: "w-full h-full object-cover"
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
},
|
|
54
|
-
o.id || o.url
|
|
55
|
-
))
|
|
56
|
-
}
|
|
1
|
+
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { cn as n } from "./index3.js";
|
|
3
|
+
const i = ({ children: e, className: t }) => /* @__PURE__ */ r(
|
|
4
|
+
"div",
|
|
5
|
+
{
|
|
6
|
+
className: n(
|
|
7
|
+
"border border-slate-200 rounded-2xl p-6 bg-white relative",
|
|
8
|
+
t
|
|
57
9
|
),
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
l !== null && /* @__PURE__ */ n("div", { className: "absolute bottom-8 left-1/2 -translate-x-1/2 px-4 py-2 rounded-full bg-white/80 text-sm font-medium", children: [
|
|
112
|
-
l + 1,
|
|
113
|
-
" / ",
|
|
114
|
-
t.length
|
|
115
|
-
] })
|
|
116
|
-
] }) })
|
|
117
|
-
]
|
|
118
|
-
}
|
|
119
|
-
)
|
|
120
|
-
] });
|
|
121
|
-
};
|
|
10
|
+
children: e
|
|
11
|
+
}
|
|
12
|
+
), m = ({ children: e, className: t }) => /* @__PURE__ */ r(
|
|
13
|
+
"div",
|
|
14
|
+
{
|
|
15
|
+
className: n(
|
|
16
|
+
"flex justify-between items-center mb-5",
|
|
17
|
+
t
|
|
18
|
+
),
|
|
19
|
+
children: e
|
|
20
|
+
}
|
|
21
|
+
), d = ({ children: e, badge: t, className: s }) => /* @__PURE__ */ a("div", { className: n("flex items-center gap-3", s), children: [
|
|
22
|
+
/* @__PURE__ */ r("h2", { className: "text-lg font-semibold text-primary-500 m-0", children: e }),
|
|
23
|
+
t
|
|
24
|
+
] }), p = ({ children: e, onClick: t, disabled: s, className: o }) => /* @__PURE__ */ r(
|
|
25
|
+
"button",
|
|
26
|
+
{
|
|
27
|
+
type: "button",
|
|
28
|
+
onClick: t,
|
|
29
|
+
disabled: s,
|
|
30
|
+
className: n(
|
|
31
|
+
"bg-transparent border-none p-0",
|
|
32
|
+
"flex items-center gap-1.5",
|
|
33
|
+
"cursor-pointer text-primary-500",
|
|
34
|
+
"text-sm font-semibold",
|
|
35
|
+
"transition-opacity hover:opacity-70",
|
|
36
|
+
"disabled:opacity-40 disabled:cursor-not-allowed",
|
|
37
|
+
o
|
|
38
|
+
),
|
|
39
|
+
children: e
|
|
40
|
+
}
|
|
41
|
+
), x = ({ children: e, className: t }) => /* @__PURE__ */ r("div", { className: t, children: e }), b = ({ children: e, className: t }) => /* @__PURE__ */ r(
|
|
42
|
+
"div",
|
|
43
|
+
{
|
|
44
|
+
className: n(
|
|
45
|
+
"border-t border-slate-100 pt-3 mt-4 text-center",
|
|
46
|
+
t
|
|
47
|
+
),
|
|
48
|
+
children: e
|
|
49
|
+
}
|
|
50
|
+
), u = ({ message: e, action: t, className: s }) => /* @__PURE__ */ a(
|
|
51
|
+
"div",
|
|
52
|
+
{
|
|
53
|
+
className: n(
|
|
54
|
+
"flex flex-col items-center justify-center py-8 text-center",
|
|
55
|
+
s
|
|
56
|
+
),
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ r("p", { className: "text-sm text-slate-500 mb-4", children: e }),
|
|
59
|
+
t
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
);
|
|
122
63
|
export {
|
|
123
|
-
|
|
64
|
+
i as Panel,
|
|
65
|
+
p as PanelAction,
|
|
66
|
+
x as PanelBody,
|
|
67
|
+
u as PanelEmptyState,
|
|
68
|
+
b as PanelFooter,
|
|
69
|
+
m as PanelHeader,
|
|
70
|
+
d as PanelTitle
|
|
124
71
|
};
|
|
125
72
|
//# sourceMappingURL=index46.js.map
|
package/dist/index46.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index46.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index46.js","sources":["../src/components/Panel/Panel.tsx"],"sourcesContent":["import { type ReactNode } from 'react'\nimport { cn } from '@/lib/utils'\n\nexport interface PanelProps {\n children: ReactNode\n className?: string\n}\n\nexport const Panel = ({ children, className }: PanelProps) => {\n return (\n <div\n className={cn(\n 'border border-slate-200 rounded-2xl p-6 bg-white relative',\n className\n )}\n >\n {children}\n </div>\n )\n}\n\nexport interface PanelHeaderProps {\n children: ReactNode\n className?: string\n}\n\nexport const PanelHeader = ({ children, className }: PanelHeaderProps) => {\n return (\n <div\n className={cn(\n 'flex justify-between items-center mb-5',\n className\n )}\n >\n {children}\n </div>\n )\n}\n\nexport interface PanelTitleProps {\n children: ReactNode\n badge?: ReactNode\n className?: string\n}\n\nexport const PanelTitle = ({ children, badge, className }: PanelTitleProps) => {\n return (\n <div className={cn('flex items-center gap-3', className)}>\n <h2 className=\"text-lg font-semibold text-primary-500 m-0\">\n {children}\n </h2>\n {badge}\n </div>\n )\n}\n\nexport interface PanelActionProps {\n children: ReactNode\n onClick?: () => void\n disabled?: boolean\n className?: string\n}\n\nexport const PanelAction = ({ children, onClick, disabled, className }: PanelActionProps) => {\n return (\n <button\n type=\"button\"\n onClick={onClick}\n disabled={disabled}\n className={cn(\n 'bg-transparent border-none p-0',\n 'flex items-center gap-1.5',\n 'cursor-pointer text-primary-500',\n 'text-sm font-semibold',\n 'transition-opacity hover:opacity-70',\n 'disabled:opacity-40 disabled:cursor-not-allowed',\n className\n )}\n >\n {children}\n </button>\n )\n}\n\nexport interface PanelBodyProps {\n children: ReactNode\n className?: string\n}\n\nexport const PanelBody = ({ children, className }: PanelBodyProps) => {\n return (\n <div className={className}>\n {children}\n </div>\n )\n}\n\nexport interface PanelFooterProps {\n children: ReactNode\n className?: string\n}\n\nexport const PanelFooter = ({ children, className }: PanelFooterProps) => {\n return (\n <div\n className={cn(\n 'border-t border-slate-100 pt-3 mt-4 text-center',\n className\n )}\n >\n {children}\n </div>\n )\n}\n\nexport interface PanelEmptyStateProps {\n message: string\n action?: ReactNode\n className?: string\n}\n\nexport const PanelEmptyState = ({ message, action, className }: PanelEmptyStateProps) => {\n return (\n <div\n className={cn(\n 'flex flex-col items-center justify-center py-8 text-center',\n className\n )}\n >\n <p className=\"text-sm text-slate-500 mb-4\">{message}</p>\n {action}\n </div>\n )\n}\n"],"names":["Panel","children","className","jsx","cn","PanelHeader","PanelTitle","badge","PanelAction","onClick","disabled","PanelBody","PanelFooter","PanelEmptyState","message","action","jsxs"],"mappings":";;AAQO,MAAMA,IAAQ,CAAC,EAAE,UAAAC,GAAU,WAAAC,QAE9B,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACAF;AAAA,IAAA;AAAA,IAGD,UAAAD;AAAA,EAAA;AAAA,GAUMI,IAAc,CAAC,EAAE,UAAAJ,GAAU,WAAAC,QAEpC,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACAF;AAAA,IAAA;AAAA,IAGD,UAAAD;AAAA,EAAA;AAAA,GAWMK,IAAa,CAAC,EAAE,UAAAL,GAAU,OAAAM,GAAO,WAAAL,0BAEzC,OAAA,EAAI,WAAWE,EAAG,2BAA2BF,CAAS,GACrD,UAAA;AAAA,EAAA,gBAAAC,EAAC,MAAA,EAAG,WAAU,8CACX,UAAAF,EAAA,CACH;AAAA,EACCM;AAAA,GACH,GAWSC,IAAc,CAAC,EAAE,UAAAP,GAAU,SAAAQ,GAAS,UAAAC,GAAU,WAAAR,QAEvD,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,MAAK;AAAA,IACL,SAAAM;AAAA,IACA,UAAAC;AAAA,IACA,WAAWN;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACAF;AAAA,IAAA;AAAA,IAGD,UAAAD;AAAA,EAAA;AAAA,GAUMU,IAAY,CAAC,EAAE,UAAAV,GAAU,WAAAC,QAElC,gBAAAC,EAAC,OAAA,EAAI,WAAAD,GACF,UAAAD,EAAA,CACH,GASSW,IAAc,CAAC,EAAE,UAAAX,GAAU,WAAAC,QAEpC,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC;AAAA,MACT;AAAA,MACAF;AAAA,IAAA;AAAA,IAGD,UAAAD;AAAA,EAAA;AAAA,GAWMY,IAAkB,CAAC,EAAE,SAAAC,GAAS,QAAAC,GAAQ,WAAAb,QAE/C,gBAAAc;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWZ;AAAA,MACT;AAAA,MACAF;AAAA,IAAA;AAAA,IAGF,UAAA;AAAA,MAAA,gBAAAC,EAAC,KAAA,EAAE,WAAU,+BAA+B,UAAAW,GAAQ;AAAA,MACnDC;AAAA,IAAA;AAAA,EAAA;AAAA;"}
|