@cryptlex/web-components 1.3.3 → 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 +15 -17
- package/dist/components/data-table/column-picker.es.js.map +1 -1
- package/dist/components/data-table/data-table.es.js +60 -57
- package/dist/components/data-table/data-table.es.js.map +1 -1
- package/dist/components/data-table/table-actions.es.js +19 -23
- package/dist/components/data-table/table-actions.es.js.map +1 -1
- package/dist/components/data-table/table-commons.es.js +21 -24
- package/dist/components/data-table/table-commons.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/data-table/table-utils/createTableFetchFn.es.js +8 -9
- package/dist/components/data-table/table-utils/createTableFetchFn.es.js.map +1 -1
- package/dist/components/data-table/table-utils/types.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 +14 -27
- 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/avatar.es.js +12 -14
- package/dist/components/ui/avatar.es.js.map +1 -1
- package/dist/components/ui/button.es.js +11 -10
- package/dist/components/ui/button.es.js.map +1 -1
- package/dist/components/ui/chart.es.js +48 -59
- package/dist/components/ui/chart.es.js.map +1 -1
- package/dist/components/ui/collapsible.es.js +1 -0
- package/dist/components/ui/collapsible.es.js.map +1 -1
- 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/dialog.es.js +23 -22
- package/dist/components/ui/dialog.es.js.map +1 -1
- package/dist/components/ui/drawer.es.js +21 -57
- package/dist/components/ui/drawer.es.js.map +1 -1
- package/dist/components/ui/form.es.js +28 -29
- package/dist/components/ui/form.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 +15 -15
- package/dist/components/ui/mutli-select.es.js.map +1 -1
- package/dist/components/ui/pagination.es.js +20 -20
- package/dist/components/ui/password-input.es.js +9 -8
- package/dist/components/ui/password-input.es.js.map +1 -1
- package/dist/components/ui/search-input.es.js +5 -4
- package/dist/components/ui/search-input.es.js.map +1 -1
- package/dist/components/ui/select.es.js +17 -22
- package/dist/components/ui/select.es.js.map +1 -1
- package/dist/components/ui/separator.es.js +17 -18
- package/dist/components/ui/separator.es.js.map +1 -1
- package/dist/components/ui/sheet.es.js +1 -0
- package/dist/components/ui/sheet.es.js.map +1 -1
- package/dist/components/ui/sonner.es.js +3 -2
- package/dist/components/ui/sonner.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/components/ui/tooltip.es.js +9 -8
- package/dist/components/ui/tooltip.es.js.map +1 -1
- package/dist/index.es.d.ts +55 -82
- package/dist/index.es.js +215 -220
- package/dist/utils/index.es.js +19 -14
- package/dist/utils/index.es.js.map +1 -1
- package/package.json +10 -6
- package/tailwind.preset.ts +55 -47
- package/dist/components/data-table/table-utils/fetch.es.js +0 -40
- package/dist/components/data-table/table-utils/fetch.es.js.map +0 -1
- package/dist/components/info-card/info-card.es.js +0 -74
- package/dist/components/info-card/info-card.es.js.map +0 -1
- package/dist/components/ui/dynamic-input.es.js +0 -141
- package/dist/components/ui/dynamic-input.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,40 +0,0 @@
|
|
|
1
|
-
import i from "openapi-fetch";
|
|
2
|
-
const c = "AT";
|
|
3
|
-
function n() {
|
|
4
|
-
return localStorage.getItem(c);
|
|
5
|
-
}
|
|
6
|
-
const a = localStorage.getItem("apiBaseUrl") ?? "https://api.dev.cryptlex.com", h = async (t, s, o) => {
|
|
7
|
-
const e = await fetch(`${a}${t}`, {
|
|
8
|
-
method: s,
|
|
9
|
-
headers: {
|
|
10
|
-
"Content-Type": "application/json",
|
|
11
|
-
Authorization: `Bearer ${n()}`
|
|
12
|
-
},
|
|
13
|
-
body: o ? JSON.stringify(o) : null
|
|
14
|
-
});
|
|
15
|
-
if (e.ok) return await e.json();
|
|
16
|
-
throw await e.json();
|
|
17
|
-
}, r = i({
|
|
18
|
-
baseUrl: a
|
|
19
|
-
// TODO Telemetry signal
|
|
20
|
-
// headers: {}
|
|
21
|
-
}), l = {
|
|
22
|
-
async onRequest(t) {
|
|
23
|
-
return t.headers.set("Authorization", `Bearer ${n()}`), t;
|
|
24
|
-
}
|
|
25
|
-
}, u = {
|
|
26
|
-
async onResponse(t) {
|
|
27
|
-
if (!t.ok)
|
|
28
|
-
throw await t.json();
|
|
29
|
-
return t;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
r.use(l);
|
|
33
|
-
r.use(u);
|
|
34
|
-
export {
|
|
35
|
-
a as US_BASE_URL,
|
|
36
|
-
r as ctxClient,
|
|
37
|
-
h as fetchClient,
|
|
38
|
-
n as getAccessToken
|
|
39
|
-
};
|
|
40
|
-
//# sourceMappingURL=fetch.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.es.js","sources":["../../../../lib/components/data-table/table-utils/fetch.ts"],"sourcesContent":["import type { paths } from '@cryptlex/web-api-types';\nimport createClient, { Middleware } from 'openapi-fetch';\nconst ACCESS_TOKEN = 'AT';\n\nexport function getAccessToken() {\n return localStorage.getItem(ACCESS_TOKEN);\n}\n// TODO: Use different urls for diff envs\nexport const US_BASE_URL = localStorage.getItem('apiBaseUrl') ?? 'https://api.dev.cryptlex.com';\ntype Methods = 'GET' | 'POST' | 'PATCH' | 'PUT';\n/**\n *\n * @param url\n * @param method\n * @param body\n * @returns\n */\nexport const fetchClient = async (url: string, method: Methods, body?: any) => {\n const response = await fetch(`${US_BASE_URL}${url}`, {\n method,\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${getAccessToken()}`,\n },\n body: body ? JSON.stringify(body) : null,\n });\n if (response.ok) return await response.json();\n throw await response.json();\n};\n\nexport const ctxClient = createClient<paths>({\n baseUrl: US_BASE_URL,\n // TODO Telemetry signal\n // headers: {}\n});\n\nconst authMiddleware: Middleware = {\n async onRequest(req) {\n req.headers.set('Authorization', `Bearer ${getAccessToken()}`);\n return req;\n },\n};\n\nconst errorMiddleware: Middleware = {\n async onResponse(res) {\n if (!res.ok) {\n throw await res.json();\n }\n return res;\n },\n};\n\nctxClient.use(authMiddleware);\nctxClient.use(errorMiddleware);\n"],"names":["ACCESS_TOKEN","getAccessToken","US_BASE_URL","fetchClient","url","method","body","response","ctxClient","createClient","authMiddleware","req","errorMiddleware","res"],"mappings":";AAEA,MAAMA,IAAe;AAEd,SAASC,IAAiB;AACxB,SAAA,aAAa,QAAQD,CAAY;AAC1C;AAEO,MAAME,IAAc,aAAa,QAAQ,YAAY,KAAK,gCASpDC,IAAc,OAAOC,GAAaC,GAAiBC,MAAe;AAC7E,QAAMC,IAAW,MAAM,MAAM,GAAGL,CAAW,GAAGE,CAAG,IAAI;AAAA,IACnD,QAAAC;AAAA,IACA,SAAS;AAAA,MACP,gBAAgB;AAAA,MAChB,eAAiB,UAAUJ,GAAgB;AAAA,IAC7C;AAAA,IACA,MAAMK,IAAO,KAAK,UAAUA,CAAI,IAAI;AAAA,EAAA,CACrC;AACD,MAAIC,EAAS,GAAW,QAAA,MAAMA,EAAS,KAAK;AACtC,QAAA,MAAMA,EAAS,KAAK;AAC5B,GAEaC,IAAYC,EAAoB;AAAA,EAC3C,SAASP;AAAA;AAAA;AAGX,CAAC,GAEKQ,IAA6B;AAAA,EACjC,MAAM,UAAUC,GAAK;AACnB,WAAAA,EAAI,QAAQ,IAAI,iBAAiB,UAAUV,EAAgB,CAAA,EAAE,GACtDU;AAAA,EAAA;AAEX,GAEMC,IAA8B;AAAA,EAClC,MAAM,WAAWC,GAAK;AAChB,QAAA,CAACA,EAAI;AACD,YAAA,MAAMA,EAAI,KAAK;AAEhB,WAAAA;AAAA,EAAA;AAEX;AAEAL,EAAU,IAAIE,CAAc;AAC5BF,EAAU,IAAII,CAAe;"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { Badge as l } 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 u } 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 x } 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
|
-
import "@tanstack/react-query";
|
|
38
|
-
import "cmdk";
|
|
39
|
-
import "use-debounce";
|
|
40
|
-
const tr = ({ data: p, label: s, fields: e }) => {
|
|
41
|
-
const n = (r, t) => {
|
|
42
|
-
if (r.transform)
|
|
43
|
-
return r.transform(t);
|
|
44
|
-
switch (r.type) {
|
|
45
|
-
case "badge":
|
|
46
|
-
return /* @__PURE__ */ o("div", { className: "flex flex-wrap gap-1", children: Array.isArray(t) ? t.map((i, m) => /* @__PURE__ */ o(l, { variant: "secondary", children: typeof i == "object" ? i.name || i.id : i }, m)) : t });
|
|
47
|
-
case "boolean":
|
|
48
|
-
return t.toString();
|
|
49
|
-
default:
|
|
50
|
-
return t ?? "";
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
return /* @__PURE__ */ a(c, { children: [
|
|
54
|
-
/* @__PURE__ */ o(d, { children: /* @__PURE__ */ o(f, { children: s }) }),
|
|
55
|
-
/* @__PURE__ */ o(u, { children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: p ? e.map((r) => {
|
|
56
|
-
const t = r.accessor ? r.accessor.split(".").reduce((i, m) => i == null ? void 0 : i[m], p) : null;
|
|
57
|
-
return /* @__PURE__ */ a(
|
|
58
|
-
"div",
|
|
59
|
-
{
|
|
60
|
-
className: "flex w-full justify-between first:pt-0 last:pb-0",
|
|
61
|
-
children: [
|
|
62
|
-
/* @__PURE__ */ o("p", { className: "text-sm flex w-full justify-start font-semibold text-muted-foreground col-span-1", children: r.display }),
|
|
63
|
-
/* @__PURE__ */ o("div", { className: "text-sm flex w-full justify-start text-wrap overflow-auto", children: n(r, t) })
|
|
64
|
-
]
|
|
65
|
-
},
|
|
66
|
-
r.display
|
|
67
|
-
);
|
|
68
|
-
}) : e.map((r, t) => /* @__PURE__ */ o(x, { className: "h-12 w-full" }, t)) }) })
|
|
69
|
-
] });
|
|
70
|
-
};
|
|
71
|
-
export {
|
|
72
|
-
tr as InfoCard
|
|
73
|
-
};
|
|
74
|
-
//# 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 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 overflow-auto\">\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,KAAoC,CAAC,EAAE,MAAAC,GAAM,OAAAC,GAAO,QAAAC,QAAa;AACtE,QAAAC,IAAc,CAACC,GAAqBC,MAAe;AAEvD,QAAID,EAAM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ACF;AAEJ;"}
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import "./accordion.es.js";
|
|
3
|
-
import "./avatar.es.js";
|
|
4
|
-
import "./badge.es.js";
|
|
5
|
-
import "./breadcrumb.es.js";
|
|
6
|
-
import { Button as N } from "./button.es.js";
|
|
7
|
-
import "./calendar.es.js";
|
|
8
|
-
import "./card.es.js";
|
|
9
|
-
import "./chart.es.js";
|
|
10
|
-
import "./checkbox.es.js";
|
|
11
|
-
import "@radix-ui/react-collapsible";
|
|
12
|
-
import "./command.es.js";
|
|
13
|
-
import "./dialog.es.js";
|
|
14
|
-
import "./drawer.es.js";
|
|
15
|
-
import "./dropdown-menu.es.js";
|
|
16
|
-
import "./form.es.js";
|
|
17
|
-
import "./input.es.js";
|
|
18
|
-
import "./input-otp.es.js";
|
|
19
|
-
import "./label.es.js";
|
|
20
|
-
import { cn as f } from "../../utils/index.es.js";
|
|
21
|
-
import { ChevronsUpDown as v, Command as g, Loader as w, Check as x } from "lucide-react";
|
|
22
|
-
import "./mutli-select.es.js";
|
|
23
|
-
import "./navigation-menu.es.js";
|
|
24
|
-
import "./pagination.es.js";
|
|
25
|
-
import "./password-input.es.js";
|
|
26
|
-
import { Popover as T, PopoverTrigger as b, PopoverContent as I } from "./popover.es.js";
|
|
27
|
-
import "./radio-group.es.js";
|
|
28
|
-
import * as h from "react";
|
|
29
|
-
import "./select.es.js";
|
|
30
|
-
import "./separator.es.js";
|
|
31
|
-
import "./sheet.es.js";
|
|
32
|
-
import "./sidebar.es.js";
|
|
33
|
-
import "sonner";
|
|
34
|
-
import "./table.es.js";
|
|
35
|
-
import "./tabs.es.js";
|
|
36
|
-
import "./tooltip.es.js";
|
|
37
|
-
import { useQuery as E } from "@tanstack/react-query";
|
|
38
|
-
import { CommandInput as R, CommandList as O, CommandItem as P } from "cmdk";
|
|
39
|
-
import { useDebounce as A } from "use-debounce";
|
|
40
|
-
import { DYNAMIC_INPUT_TARGET as y } from "../data-table/table-utils/types.es.js";
|
|
41
|
-
import { ctxClient as d } from "../data-table/table-utils/fetch.es.js";
|
|
42
|
-
const C = "w-[250px]";
|
|
43
|
-
function ve({ onChange: r, target: i, placeholder: p }) {
|
|
44
|
-
const [a, s] = h.useState(!1), [n, o] = h.useState(), c = h.useCallback(
|
|
45
|
-
(t) => {
|
|
46
|
-
o(t), r(t.id);
|
|
47
|
-
},
|
|
48
|
-
[r]
|
|
49
|
-
), m = n ? n.name : `Select ${y[i].toLocaleLowerCase()} `;
|
|
50
|
-
return /* @__PURE__ */ l(T, { open: a, onOpenChange: s, children: [
|
|
51
|
-
/* @__PURE__ */ e(b, { asChild: !0, children: /* @__PURE__ */ l(N, { variant: "outline", role: "combobox", className: f("justify-between", C), children: [
|
|
52
|
-
m,
|
|
53
|
-
/* @__PURE__ */ e(v, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
54
|
-
] }) }),
|
|
55
|
-
/* @__PURE__ */ e(I, { side: "bottom", className: f("p-0", C), children: /* @__PURE__ */ e(
|
|
56
|
-
D,
|
|
57
|
-
{
|
|
58
|
-
target: i,
|
|
59
|
-
selectedResult: n,
|
|
60
|
-
onSelectResult: c,
|
|
61
|
-
placeholder: p
|
|
62
|
-
}
|
|
63
|
-
) })
|
|
64
|
-
] });
|
|
65
|
-
}
|
|
66
|
-
function D({ selectedResult: r, onSelectResult: i, target: p, placeholder: a }) {
|
|
67
|
-
const [s, n] = h.useState("");
|
|
68
|
-
return /* @__PURE__ */ l(g, { className: "h-auto rounded-lg border border-b-0 shadow-md", children: [
|
|
69
|
-
/* @__PURE__ */ e(R, { value: s, onValueChange: (m) => {
|
|
70
|
-
n(m);
|
|
71
|
-
}, placeholder: a }),
|
|
72
|
-
/* @__PURE__ */ e(
|
|
73
|
-
G,
|
|
74
|
-
{
|
|
75
|
-
target: p,
|
|
76
|
-
query: s,
|
|
77
|
-
selectedResult: r,
|
|
78
|
-
onSelectResult: (m) => {
|
|
79
|
-
i(m);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
)
|
|
83
|
-
] });
|
|
84
|
-
}
|
|
85
|
-
function G({ query: r, selectedResult: i, onSelectResult: p, target: a }) {
|
|
86
|
-
const s = async () => a === y.USER ? await d.GET("/v3/users", {
|
|
87
|
-
params: {
|
|
88
|
-
query: {
|
|
89
|
-
page: 1,
|
|
90
|
-
limit: 30,
|
|
91
|
-
query: r,
|
|
92
|
-
userType: "user"
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}).then((t) => t.data) : a === y.ORGANIZATION ? await d.GET("/v3/organizations", {
|
|
96
|
-
params: {
|
|
97
|
-
query: {
|
|
98
|
-
page: 1,
|
|
99
|
-
limit: 30,
|
|
100
|
-
query: r
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}).then((t) => t.data) : await d.GET("/v3/resellers", {
|
|
104
|
-
params: {
|
|
105
|
-
query: {
|
|
106
|
-
page: 1,
|
|
107
|
-
limit: 30,
|
|
108
|
-
query: r,
|
|
109
|
-
userType: "user"
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}).then((t) => t.data), [n] = A(r, 300), { data: o, isLoading: c, isError: m } = E({
|
|
113
|
-
queryKey: ["search", n],
|
|
114
|
-
queryFn: s
|
|
115
|
-
});
|
|
116
|
-
return /* @__PURE__ */ l(O, { children: [
|
|
117
|
-
/* @__PURE__ */ e("div", { className: "flex justify-center", children: c && /* @__PURE__ */ e(w, { className: "my-4" }) }),
|
|
118
|
-
!m && !c && !(o != null && o.length) && /* @__PURE__ */ e("div", { className: "p-4 text-sm text-center", children: "No Match" }),
|
|
119
|
-
m && /* @__PURE__ */ e("div", { className: "p-4 text-sm text-center", children: "Something went wrong" }),
|
|
120
|
-
o == null ? void 0 : o.map((t) => {
|
|
121
|
-
const { id: u, name: S } = t;
|
|
122
|
-
return /* @__PURE__ */ l(P, { onSelect: () => p({ id: u, name: S }), value: `${u}`, children: [
|
|
123
|
-
/* @__PURE__ */ e(
|
|
124
|
-
x,
|
|
125
|
-
{
|
|
126
|
-
className: f(
|
|
127
|
-
"mr-2 h-4 w-4",
|
|
128
|
-
(i == null ? void 0 : i.id) === u ? "opacity-100" : "opacity-0"
|
|
129
|
-
)
|
|
130
|
-
}
|
|
131
|
-
),
|
|
132
|
-
S
|
|
133
|
-
] }, u);
|
|
134
|
-
})
|
|
135
|
-
] });
|
|
136
|
-
}
|
|
137
|
-
export {
|
|
138
|
-
ve as DynamicInput,
|
|
139
|
-
D as Search
|
|
140
|
-
};
|
|
141
|
-
//# sourceMappingURL=dynamic-input.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-input.es.js","sources":["../../../lib/components/ui/dynamic-input.tsx"],"sourcesContent":["import { DYNAMIC_INPUT_TARGET, ctxClient } from '@/components/data-table';\nimport { Button, Popover, PopoverContent, PopoverTrigger } from '@/index';\nimport { cn } from '@/utils';\nimport type { components } from '@cryptlex/web-api-types';\nimport { useQuery } from '@tanstack/react-query';\nimport { CommandInput, CommandItem, CommandList } from 'cmdk';\nimport { Check, ChevronsUpDown, Command, Loader } from 'lucide-react';\nimport * as React from 'react';\nimport { useDebounce } from 'use-debounce';\n\ntype UserDto = components['schemas']['UserDto'] & { organizationId?: string };\ntype OrganizationDto = components['schemas']['OrganizationDto'];\ntype ResellerDto = components['schemas']['ResellerDto'];\n// width for properly viewing the popover\nconst POPOVER_WIDTH = 'w-[250px]';\n\n/**\n *\n * @param onChange\n * @param target fthis is used to make the component generic and reusble for differnt use cases\n * @param placeholder placeholder to be showing in the input for searching\n * @returns return id of the seleced value, can be customized to return full selected value\n */\ninterface DynamicInputProps {\n onChange: (id: any) => void;\n target: DYNAMIC_INPUT_TARGET;\n placeholder: string;\n}\nexport function DynamicInput({ onChange, target, placeholder }: DynamicInputProps) {\n const [open, setOpen] = React.useState(false);\n // select option\n const [selected, setSelected] = React.useState<\n Partial<UserDto> | Partial<OrganizationDto> | Partial<ResellerDto> | undefined\n >();\n\n const handleSetActive = React.useCallback(\n (dto: Partial<UserDto> | Partial<OrganizationDto> | Partial<ResellerDto>) => {\n setSelected(dto);\n onChange(dto.id);\n },\n [onChange],\n );\n // display selected option with its name\n const displayName = selected\n ? selected.name\n : `Select ${DYNAMIC_INPUT_TARGET[target].toLocaleLowerCase()} `;\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n {/* Button to show the selected option */}\n <PopoverTrigger asChild>\n <Button variant=\"outline\" role=\"combobox\" className={cn('justify-between', POPOVER_WIDTH)}>\n {displayName}\n <ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </Button>\n </PopoverTrigger>\n\n <PopoverContent side=\"bottom\" className={cn('p-0', POPOVER_WIDTH)}>\n {/*Search input */}\n <Search\n target={target}\n selectedResult={selected}\n onSelectResult={handleSetActive}\n placeholder={placeholder}\n />\n </PopoverContent>\n </Popover>\n );\n}\n\ninterface SearchProps {\n selectedResult?: Partial<UserDto> | Partial<OrganizationDto> | Partial<ResellerDto>;\n onSelectResult: (dto: Partial<UserDto> | Partial<OrganizationDto> | Partial<ResellerDto>) => void;\n target: DYNAMIC_INPUT_TARGET;\n placeholder: string;\n}\n\nexport function Search({ selectedResult, onSelectResult, target, placeholder }: SearchProps) {\n const [searchQuery, setSearchQuery] = React.useState('');\n const handleSelectResult = (\n dto: Partial<UserDto> | Partial<OrganizationDto> | Partial<ResellerDto>,\n ) => {\n onSelectResult(dto);\n };\n\n const handleChange = (value: string) => {\n setSearchQuery(value);\n };\n\n return (\n <Command className=\"h-auto rounded-lg border border-b-0 shadow-md\">\n <CommandInput value={searchQuery} onValueChange={handleChange} placeholder={placeholder} />\n\n <SearchResults\n target={target}\n query={searchQuery}\n selectedResult={selectedResult}\n onSelectResult={handleSelectResult}\n />\n </Command>\n );\n}\n\ninterface SearchResultsProps {\n query: string;\n selectedResult: SearchProps['selectedResult'];\n onSelectResult: SearchProps['onSelectResult'];\n target: DYNAMIC_INPUT_TARGET;\n}\n\nfunction SearchResults({ query, selectedResult, onSelectResult, target }: SearchResultsProps) {\n // fetch function that targets different end points based on the DYNAMIC_INPUT_TARGET which can be license USER, ORGANIZATION or RESELLER\n const fetchFn = async () => {\n if (target === DYNAMIC_INPUT_TARGET.USER) {\n return await ctxClient\n .GET('/v3/users', {\n params: {\n query: {\n page: 1,\n limit: 30,\n query,\n userType: 'user',\n },\n },\n })\n .then((res) => res.data);\n } else if (target === DYNAMIC_INPUT_TARGET.ORGANIZATION) {\n return await ctxClient\n .GET('/v3/organizations', {\n params: {\n query: {\n page: 1,\n limit: 30,\n query,\n },\n },\n })\n .then((res) => res.data);\n } else {\n return await ctxClient\n .GET('/v3/resellers', {\n params: {\n query: {\n page: 1,\n limit: 30,\n query,\n userType: 'user',\n },\n },\n })\n .then((res) => res.data);\n }\n };\n //https://github.com/TanStack/query/issues/293#issuecomment-1368066935\n //https://github.com/TanStack/query/issues/293\n const [debouncedQuery] = useDebounce(query, 300);\n const { data, isLoading, isError } = useQuery({\n queryKey: ['search', debouncedQuery],\n queryFn: fetchFn,\n });\n\n return (\n <CommandList>\n <div className=\"flex justify-center\">{isLoading && <Loader className=\"my-4\" />}</div>\n\n {!isError && !isLoading && !data?.length && (\n <div className=\"p-4 text-sm text-center\">No Match</div>\n )}\n {isError && <div className=\"p-4 text-sm text-center\">Something went wrong</div>}\n {data?.map((d) => {\n const { id, name } = d;\n return (\n <CommandItem key={id} onSelect={() => onSelectResult({ id, name })} value={`${id}`}>\n <Check\n className={cn(\n 'mr-2 h-4 w-4',\n selectedResult?.id === id ? 'opacity-100' : 'opacity-0',\n )}\n />\n {name}\n </CommandItem>\n );\n })}\n </CommandList>\n );\n}\n"],"names":["POPOVER_WIDTH","DynamicInput","onChange","target","placeholder","open","setOpen","React","selected","setSelected","handleSetActive","dto","displayName","DYNAMIC_INPUT_TARGET","jsxs","Popover","jsx","PopoverTrigger","Button","cn","ChevronsUpDown","PopoverContent","Search","selectedResult","onSelectResult","searchQuery","setSearchQuery","Command","CommandInput","value","SearchResults","query","fetchFn","ctxClient","res","debouncedQuery","useDebounce","data","isLoading","isError","useQuery","CommandList","Loader","d","id","name","CommandItem","Check"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,MAAMA,IAAgB;AAcf,SAASC,GAAa,EAAE,UAAAC,GAAU,QAAAC,GAAQ,aAAAC,KAAkC;AACjF,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAM,SAAS,EAAK,GAEtC,CAACC,GAAUC,CAAW,IAAIF,EAAM,SAEpC,GAEIG,IAAkBH,EAAM;AAAA,IAC5B,CAACI,MAA4E;AAC3E,MAAAF,EAAYE,CAAG,GACfT,EAASS,EAAI,EAAE;AAAA,IACjB;AAAA,IACA,CAACT,CAAQ;AAAA,EACX,GAEMU,IAAcJ,IAChBA,EAAS,OACT,UAAUK,EAAqBV,CAAM,EAAE,kBAAA,CAAmB;AAE9D,SACG,gBAAAW,EAAAC,GAAA,EAAQ,MAAAV,GAAY,cAAcC,GAEjC,UAAA;AAAA,IAAA,gBAAAU,EAACC,GAAe,EAAA,SAAO,IACrB,UAAA,gBAAAH,EAACI,GAAO,EAAA,SAAQ,WAAU,MAAK,YAAW,WAAWC,EAAG,mBAAmBnB,CAAa,GACrF,UAAA;AAAA,MAAAY;AAAA,MACD,gBAAAI,EAACI,GAAe,EAAA,WAAU,mCAAmC,CAAA;AAAA,IAAA,EAAA,CAC/D,EACF,CAAA;AAAA,IAEA,gBAAAJ,EAACK,KAAe,MAAK,UAAS,WAAWF,EAAG,OAAOnB,CAAa,GAE9D,UAAA,gBAAAgB;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,QAAAnB;AAAA,QACA,gBAAgBK;AAAA,QAChB,gBAAgBE;AAAA,QAChB,aAAAN;AAAA,MAAA;AAAA,IAAA,EAEJ,CAAA;AAAA,EAAA,GACF;AAEJ;AASO,SAASkB,EAAO,EAAE,gBAAAC,GAAgB,gB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