@cryptlex/web-components 1.3.4 → 1.3.5
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/components/data-table/column-picker.es.js +12 -11
- package/dist/components/data-table/column-picker.es.js.map +1 -1
- package/dist/components/data-table/data-table.es.js +34 -31
- package/dist/components/data-table/data-table.es.js.map +1 -1
- package/dist/components/data-table/table-actions.es.js +8 -8
- package/dist/components/data-table/table-actions.es.js.map +1 -1
- package/dist/components/data-table/table-content.es.js +21 -17
- package/dist/components/data-table/table-content.es.js.map +1 -1
- package/dist/components/key-value-card/key-value-card.es.js +85 -0
- package/dist/components/key-value-card/key-value-card.es.js.map +1 -0
- package/dist/components/sidebar/app-layout.es.js +12 -22
- package/dist/components/sidebar/app-layout.es.js.map +1 -1
- package/dist/components/sidebar/nav-main.es.js +44 -42
- package/dist/components/sidebar/nav-main.es.js.map +1 -1
- package/dist/components/static-data-table/data-table.es.js +6 -6
- package/dist/components/static-data-table/data-table.es.js.map +1 -1
- package/dist/components/ui/button.es.js +10 -9
- package/dist/components/ui/button.es.js.map +1 -1
- package/dist/components/ui/chart.es.js +9 -9
- package/dist/components/ui/copy-button.es.js +72 -0
- package/dist/components/ui/copy-button.es.js.map +1 -0
- package/dist/components/ui/drawer.es.js +18 -21
- package/dist/components/ui/drawer.es.js.map +1 -1
- package/dist/components/ui/link-button.es.js +22 -0
- package/dist/components/ui/link-button.es.js.map +1 -0
- package/dist/components/ui/mutli-select.es.js +20 -18
- package/dist/components/ui/mutli-select.es.js.map +1 -1
- package/dist/components/ui/pagination.es.js +20 -20
- package/dist/components/ui/select.es.js +13 -13
- package/dist/components/ui/select.es.js.map +1 -1
- package/dist/components/ui/table.es.js +19 -19
- package/dist/components/ui/table.es.js.map +1 -1
- package/dist/index.es.d.ts +43 -15
- package/dist/index.es.js +225 -221
- package/dist/index.es.js.map +1 -1
- package/dist/utils/index.es.js +19 -14
- package/dist/utils/index.es.js.map +1 -1
- package/package.json +4 -3
- package/tailwind.preset.ts +55 -47
- package/dist/components/info-card/info-card.es.js +0 -71
- package/dist/components/info-card/info-card.es.js.map +0 -1
package/tailwind.preset.ts
CHANGED
|
@@ -20,65 +20,65 @@ export default {
|
|
|
20
20
|
},
|
|
21
21
|
fontSize: {
|
|
22
22
|
// text-caption
|
|
23
|
-
caption: [
|
|
24
|
-
|
|
23
|
+
'caption': [
|
|
24
|
+
'var(--font-sm)',
|
|
25
25
|
{
|
|
26
|
-
lineHeight:
|
|
26
|
+
lineHeight: '1.5',
|
|
27
27
|
},
|
|
28
28
|
],
|
|
29
29
|
// text-body
|
|
30
|
-
body: [
|
|
31
|
-
|
|
30
|
+
'body': [
|
|
31
|
+
'var(--font-base)',
|
|
32
32
|
{
|
|
33
|
-
lineHeight:
|
|
33
|
+
lineHeight: '1.6',
|
|
34
34
|
},
|
|
35
35
|
],
|
|
36
36
|
// text-heading-6
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
'heading-6': [
|
|
38
|
+
'var(--font-base)',
|
|
39
39
|
{
|
|
40
|
-
lineHeight:
|
|
41
|
-
fontWeight: 700
|
|
40
|
+
lineHeight: '1.2',
|
|
41
|
+
fontWeight: 700,
|
|
42
42
|
},
|
|
43
43
|
],
|
|
44
44
|
// text-heading-5
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
'heading-5': [
|
|
46
|
+
'var(--font-md)',
|
|
47
47
|
{
|
|
48
|
-
lineHeight:
|
|
48
|
+
lineHeight: '1.2',
|
|
49
49
|
},
|
|
50
50
|
],
|
|
51
51
|
// text-heading-4
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
'heading-4': [
|
|
53
|
+
'var(--font-lg)',
|
|
54
54
|
{
|
|
55
|
-
lineHeight:
|
|
56
|
-
fontWeight: 500
|
|
55
|
+
lineHeight: '1.2',
|
|
56
|
+
fontWeight: 500,
|
|
57
57
|
},
|
|
58
58
|
],
|
|
59
59
|
// text-heading-3
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
'heading-3': [
|
|
61
|
+
'var(--font-xl)',
|
|
62
62
|
{
|
|
63
|
-
lineHeight:
|
|
64
|
-
fontWeight: 500
|
|
63
|
+
lineHeight: '1.1',
|
|
64
|
+
fontWeight: 500,
|
|
65
65
|
},
|
|
66
66
|
],
|
|
67
67
|
|
|
68
68
|
// text-heading-2
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
'heading-2': [
|
|
70
|
+
'var(--font-2xl)',
|
|
71
71
|
{
|
|
72
|
-
lineHeight:
|
|
73
|
-
fontWeight: 300
|
|
72
|
+
lineHeight: '1',
|
|
73
|
+
fontWeight: 300,
|
|
74
74
|
},
|
|
75
75
|
],
|
|
76
76
|
|
|
77
77
|
// text-heading-1
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
'heading-1': [
|
|
79
|
+
'var(--font-3xl)',
|
|
80
80
|
{
|
|
81
|
-
lineHeight:
|
|
81
|
+
lineHeight: '1',
|
|
82
82
|
},
|
|
83
83
|
],
|
|
84
84
|
},
|
|
@@ -100,15 +100,15 @@ export default {
|
|
|
100
100
|
primary: {
|
|
101
101
|
DEFAULT: 'oklch(var(--primary) / <alpha-value>)',
|
|
102
102
|
foreground: 'oklch(var(--primary-foreground) / <alpha-value>)',
|
|
103
|
-
...tokenRamps('primary')
|
|
103
|
+
...tokenRamps('primary'),
|
|
104
104
|
},
|
|
105
105
|
secondary: {
|
|
106
106
|
DEFAULT: 'oklch(var(--secondary) / <alpha-value>)',
|
|
107
107
|
foreground: 'oklch(var(--secondary-foreground) / <alpha-value>)',
|
|
108
|
-
...tokenRamps('secondary')
|
|
108
|
+
...tokenRamps('secondary'),
|
|
109
109
|
},
|
|
110
110
|
neutral: {
|
|
111
|
-
...tokenRamps('neutral')
|
|
111
|
+
...tokenRamps('neutral'),
|
|
112
112
|
},
|
|
113
113
|
muted: {
|
|
114
114
|
DEFAULT: 'oklch(var(--muted) / <alpha-value>)',
|
|
@@ -121,12 +121,12 @@ export default {
|
|
|
121
121
|
destructive: {
|
|
122
122
|
DEFAULT: 'oklch(var(--destructive) / <alpha-value>)',
|
|
123
123
|
foreground: 'oklch(var(--destructive-foreground) / <alpha-value>)',
|
|
124
|
-
...tokenRamps('destructive')
|
|
124
|
+
...tokenRamps('destructive'),
|
|
125
125
|
},
|
|
126
126
|
success: {
|
|
127
127
|
DEFAULT: 'oklch(var(--success) / <alpha-value>)',
|
|
128
128
|
foreground: 'oklch(var(--success-foreground) / <alpha-value>)',
|
|
129
|
-
...tokenRamps('success')
|
|
129
|
+
...tokenRamps('success'),
|
|
130
130
|
},
|
|
131
131
|
border: 'oklch(var(--border) / <alpha-value>)',
|
|
132
132
|
input: 'oklch(var(--input) / <alpha-value>)',
|
|
@@ -142,42 +142,50 @@ export default {
|
|
|
142
142
|
DEFAULT: 'oklch(var(--sidebar-background) / <alpha-value>)',
|
|
143
143
|
foreground: 'oklch(var(--sidebar-foreground) / <alpha-value>)',
|
|
144
144
|
primary: 'oklch(var(--sidebar-primary) / <alpha-value>)',
|
|
145
|
-
primaryForeground:
|
|
146
|
-
'oklch(var(--sidebar-primary-foreground) / <alpha-value>)',
|
|
145
|
+
primaryForeground: 'oklch(var(--sidebar-primary-foreground) / <alpha-value>)',
|
|
147
146
|
accent: 'oklch(var(--sidebar-accent) / <alpha-value>)',
|
|
148
|
-
accentForeground:
|
|
149
|
-
'oklch(var(--sidebar-accent-foreground) / <alpha-value>)',
|
|
147
|
+
accentForeground: 'oklch(var(--sidebar-accent-foreground) / <alpha-value>)',
|
|
150
148
|
border: 'oklch(var(--sidebar-border) / <alpha-value>)',
|
|
151
149
|
ring: 'oklch(var(--sidebar-ring) / <alpha-value>)',
|
|
152
150
|
},
|
|
153
151
|
},
|
|
154
152
|
extend: {
|
|
155
153
|
gridTemplateColumns: {
|
|
156
|
-
|
|
154
|
+
fluid: 'repeat(auto-fill, minmax(var(--grid-fluid-min), 1fr))',
|
|
157
155
|
},
|
|
158
156
|
keyframes: {
|
|
159
157
|
'accordion-down': {
|
|
160
158
|
from: {
|
|
161
|
-
height: '0'
|
|
159
|
+
height: '0',
|
|
162
160
|
},
|
|
163
161
|
to: {
|
|
164
|
-
height: 'var(--radix-accordion-content-height)'
|
|
165
|
-
}
|
|
162
|
+
height: 'var(--radix-accordion-content-height)',
|
|
163
|
+
},
|
|
166
164
|
},
|
|
167
165
|
'accordion-up': {
|
|
168
166
|
from: {
|
|
169
|
-
height: 'var(--radix-accordion-content-height)'
|
|
167
|
+
height: 'var(--radix-accordion-content-height)',
|
|
170
168
|
},
|
|
171
169
|
to: {
|
|
172
|
-
height: '0'
|
|
173
|
-
}
|
|
174
|
-
}
|
|
170
|
+
height: '0',
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
'collapsible-down': {
|
|
174
|
+
from: { height: '0' },
|
|
175
|
+
to: { height: 'var(--radix-collapsible-content-height)' },
|
|
176
|
+
},
|
|
177
|
+
'collapsible-up': {
|
|
178
|
+
from: { height: 'var(--radix-collapsible-content-height)' },
|
|
179
|
+
to: { height: '0' },
|
|
180
|
+
},
|
|
175
181
|
},
|
|
176
182
|
animation: {
|
|
177
183
|
'accordion-down': 'accordion-down 0.2s ease-out',
|
|
178
|
-
'accordion-up': 'accordion-up 0.2s ease-out'
|
|
184
|
+
'accordion-up': 'accordion-up 0.2s ease-out',
|
|
185
|
+
'collapsible-down': 'collapsible-down 0.2s ease-out',
|
|
186
|
+
'collapsible-up': 'collapsible-up 0.2s ease-out',
|
|
179
187
|
},
|
|
180
|
-
}
|
|
188
|
+
},
|
|
181
189
|
},
|
|
182
190
|
plugins: [require('tailwindcss-animate')], // Include any plugins you need
|
|
183
191
|
} satisfies Config;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { Badge as n } from "../ui/badge.es.js";
|
|
3
|
-
import "../ui/accordion.es.js";
|
|
4
|
-
import "../ui/avatar.es.js";
|
|
5
|
-
import "../ui/breadcrumb.es.js";
|
|
6
|
-
import "../ui/button.es.js";
|
|
7
|
-
import "../ui/calendar.es.js";
|
|
8
|
-
import { Card as c, CardHeader as d, CardTitle as f, CardContent as x } from "../ui/card.es.js";
|
|
9
|
-
import "../ui/chart.es.js";
|
|
10
|
-
import "../ui/checkbox.es.js";
|
|
11
|
-
import "@radix-ui/react-collapsible";
|
|
12
|
-
import "../ui/command.es.js";
|
|
13
|
-
import "../ui/dialog.es.js";
|
|
14
|
-
import "../ui/drawer.es.js";
|
|
15
|
-
import "../ui/dropdown-menu.es.js";
|
|
16
|
-
import "../ui/form.es.js";
|
|
17
|
-
import "../ui/input.es.js";
|
|
18
|
-
import "../ui/input-otp.es.js";
|
|
19
|
-
import "../ui/label.es.js";
|
|
20
|
-
import "lucide-react";
|
|
21
|
-
import "../ui/mutli-select.es.js";
|
|
22
|
-
import "../ui/navigation-menu.es.js";
|
|
23
|
-
import "../ui/pagination.es.js";
|
|
24
|
-
import "../ui/password-input.es.js";
|
|
25
|
-
import "../ui/popover.es.js";
|
|
26
|
-
import "../ui/radio-group.es.js";
|
|
27
|
-
import "react";
|
|
28
|
-
import "../ui/select.es.js";
|
|
29
|
-
import "../ui/separator.es.js";
|
|
30
|
-
import "../ui/sheet.es.js";
|
|
31
|
-
import "../ui/sidebar.es.js";
|
|
32
|
-
import { Skeleton as u } from "../ui/skeleton.es.js";
|
|
33
|
-
import "sonner";
|
|
34
|
-
import "../ui/table.es.js";
|
|
35
|
-
import "../ui/tabs.es.js";
|
|
36
|
-
import "../ui/tooltip.es.js";
|
|
37
|
-
const Z = ({ data: p, label: s, fields: e }) => {
|
|
38
|
-
const l = (r, t) => {
|
|
39
|
-
if (r.transform)
|
|
40
|
-
return r.transform(t);
|
|
41
|
-
switch (r.type) {
|
|
42
|
-
case "badge":
|
|
43
|
-
return /* @__PURE__ */ o("div", { className: "flex flex-wrap gap-1", children: Array.isArray(t) ? t.map((i, m) => /* @__PURE__ */ o(n, { variant: "secondary", children: typeof i == "object" ? i.name || i.id : i }, m)) : t });
|
|
44
|
-
case "boolean":
|
|
45
|
-
return t.toString();
|
|
46
|
-
default:
|
|
47
|
-
return t ?? "";
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
return /* @__PURE__ */ a(c, { children: [
|
|
51
|
-
/* @__PURE__ */ o(d, { children: /* @__PURE__ */ o(f, { children: s }) }),
|
|
52
|
-
/* @__PURE__ */ o(x, { children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: p ? e.map((r) => {
|
|
53
|
-
const t = r.accessor ? r.accessor.split(".").reduce((i, m) => i == null ? void 0 : i[m], p) : null;
|
|
54
|
-
return /* @__PURE__ */ a(
|
|
55
|
-
"div",
|
|
56
|
-
{
|
|
57
|
-
className: "flex w-full flex-col md:flex-row justify-between first:pt-0 last:pb-0",
|
|
58
|
-
children: [
|
|
59
|
-
/* @__PURE__ */ o("p", { className: "text-sm flex w-full justify-start font-semibold text-muted-foreground col-span-1", children: r.display }),
|
|
60
|
-
/* @__PURE__ */ o("div", { className: "text-sm flex w-full justify-start text-wrap", children: l(r, t) })
|
|
61
|
-
]
|
|
62
|
-
},
|
|
63
|
-
r.display
|
|
64
|
-
);
|
|
65
|
-
}) : e.map((r, t) => /* @__PURE__ */ o(u, { className: "h-12 w-full" }, t)) }) })
|
|
66
|
-
] });
|
|
67
|
-
};
|
|
68
|
-
export {
|
|
69
|
-
Z as InfoCard
|
|
70
|
-
};
|
|
71
|
-
//# sourceMappingURL=info-card.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"info-card.es.js","sources":["../../../lib/components/info-card/info-card.tsx"],"sourcesContent":["import { Badge } from '@/components/ui/badge';\nimport { Card, CardContent, CardHeader, CardTitle, Skeleton } from '@/index';\n\nexport type DisplayField = {\n display: string;\n accessor: string;\n type?: 'text' | 'badge' | 'boolean';\n transform?: (value: any) => React.ReactNode;\n};\n\nexport interface InfoCardProps {\n data: Record<string, any>;\n label: string;\n fields: DisplayField[];\n className?: string;\n}\n\nexport const InfoCard: React.FC<InfoCardProps> = ({ data, label, fields }) => {\n const renderValue = (field: DisplayField, value: any) => {\n // Custom transform if provided\n if (field.transform) {\n return field.transform(value);\n }\n\n // Handle specific types\n switch (field.type) {\n case 'badge':\n return (\n <div className=\"flex flex-wrap gap-1\">\n {Array.isArray(value)\n ? value.map((item, index) => (\n <Badge key={index} variant=\"secondary\">\n {typeof item === 'object' ? item.name || item.id : item}\n </Badge>\n ))\n : value}\n </div>\n );\n\n case 'boolean':\n return value.toString();\n default:\n return value ?? '';\n }\n };\n\n return (\n <Card>\n <CardHeader>\n <CardTitle>{label}</CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"flex flex-col gap-1\">\n {data\n ? fields.map((field) => {\n const value = field.accessor\n ? field.accessor.split('.').reduce((obj, key) => obj?.[key], data)\n : null;\n\n return (\n <div\n key={field.display}\n className=\"flex w-full flex-col md:flex-row justify-between first:pt-0 last:pb-0\"\n >\n <p className=\"text-sm flex w-full justify-start font-semibold text-muted-foreground col-span-1\">\n {field.display}\n </p>\n <div className=\"text-sm flex w-full justify-start text-wrap\">\n {renderValue(field, value)}\n </div>\n </div>\n );\n })\n : fields.map((_, index) => <Skeleton key={index} className=\"h-12 w-full\" />)}\n </div>\n </CardContent>\n </Card>\n );\n};\n"],"names":["InfoCard","data","label","fields","renderValue","field","value","jsx","item","index","Badge","Card","CardHeader","CardTitle","CardContent","obj","key","jsxs","_","Skeleton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBO,MAAMA,IAAoC,CAAC,EAAE,MAAAC,GAAM,OAAAC,GAAO,QAAAC,QAAa;AACtE,QAAAC,IAAc,CAACC,GAAqBC,MAAe;AAEvD,QAAID,EAAM;AACD,aAAAA,EAAM,UAAUC,CAAK;AAI9B,YAAQD,EAAM,MAAM;AAAA,MAClB,KAAK;AACH,eACG,gBAAAE,EAAA,OAAA,EAAI,WAAU,wBACZ,UAAM,MAAA,QAAQD,CAAK,IAChBA,EAAM,IAAI,CAACE,GAAMC,MACf,gBAAAF,EAACG,GAAkB,EAAA,SAAQ,aACxB,UAAA,OAAOF,KAAS,WAAWA,EAAK,QAAQA,EAAK,KAAKA,EADzC,GAAAC,CAEZ,CACD,IACDH,GACN;AAAA,MAGJ,KAAK;AACH,eAAOA,EAAM,SAAS;AAAA,MACxB;AACE,eAAOA,KAAS;AAAA,IAAA;AAAA,EAEtB;AAEA,2BACGK,GACC,EAAA,UAAA;AAAA,IAAA,gBAAAJ,EAACK,GACC,EAAA,UAAA,gBAAAL,EAACM,GAAW,EAAA,UAAAX,EAAM,CAAA,GACpB;AAAA,IACA,gBAAAK,EAACO,GACC,EAAA,UAAA,gBAAAP,EAAC,OAAI,EAAA,WAAU,uBACZ,UACGN,IAAAE,EAAO,IAAI,CAACE,MAAU;AACpB,YAAMC,IAAQD,EAAM,WAChBA,EAAM,SAAS,MAAM,GAAG,EAAE,OAAO,CAACU,GAAKC,MAAQD,KAAA,gBAAAA,EAAMC,IAAMf,CAAI,IAC/D;AAGF,aAAA,gBAAAgB;AAAA,QAAC;AAAA,QAAA;AAAA,UAEC,WAAU;AAAA,UAEV,UAAA;AAAA,YAAA,gBAAAV,EAAC,KAAE,EAAA,WAAU,qFACV,UAAAF,EAAM,SACT;AAAA,8BACC,OAAI,EAAA,WAAU,+CACZ,UAAYD,EAAAC,GAAOC,CAAK,EAC3B,CAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QARKD,EAAM;AAAA,MASb;AAAA,IAEH,CAAA,IACDF,EAAO,IAAI,CAACe,GAAGT,MAAW,gBAAAF,EAAAY,GAAA,EAAqB,WAAU,cAAA,GAAjBV,CAA+B,CAAE,EAC/E,CAAA,EACF,CAAA;AAAA,EAAA,GACF;AAEJ;"}
|