@cryptlex/web-components 1.3.4 → 1.4.0
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 -3
- 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 +112 -95
- 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 +20 -15
- package/dist/components/data-table/table-content.es.js.map +1 -1
- package/dist/components/data-table/table-filter.es.js +264 -0
- package/dist/components/data-table/table-filter.es.js.map +1 -0
- package/dist/components/data-table/table-utils/constants.es.js +20 -6
- package/dist/components/data-table/table-utils/constants.es.js.map +1 -1
- package/dist/components/data-table/table-utils/link-display.es.js +4 -4
- package/dist/components/data-table/table-utils/link-display.es.js.map +1 -1
- package/dist/components/key-value-card/key-value-card.es.js +87 -0
- package/dist/components/key-value-card/key-value-card.es.js.map +1 -0
- package/dist/components/sidebar/app-layout.es.js +41 -47
- package/dist/components/sidebar/app-layout.es.js.map +1 -1
- package/dist/components/sidebar/breadcrumb.es.js +58 -0
- package/dist/components/sidebar/breadcrumb.es.js.map +1 -0
- package/dist/components/sidebar/nav-main.es.js +65 -51
- package/dist/components/sidebar/nav-main.es.js.map +1 -1
- package/dist/components/static-data-table/data-table.es.js +8 -8
- package/dist/components/static-data-table/data-table.es.js.map +1 -1
- package/dist/components/ui/avatar.es.js +1 -1
- package/dist/components/ui/avatar.es.js.map +1 -1
- package/dist/components/ui/badge.es.js +1 -1
- package/dist/components/ui/badge.es.js.map +1 -1
- package/dist/components/ui/button.es.js +15 -14
- package/dist/components/ui/button.es.js.map +1 -1
- package/dist/components/ui/calendar.es.js +3 -3
- package/dist/components/ui/chart.es.js +16 -16
- package/dist/components/ui/chart.es.js.map +1 -1
- package/dist/components/ui/checkbox.es.js +1 -1
- package/dist/components/ui/checkbox.es.js.map +1 -1
- package/dist/components/ui/command.es.js +28 -28
- package/dist/components/ui/command.es.js.map +1 -1
- package/dist/components/ui/copy-button.es.js +76 -0
- package/dist/components/ui/copy-button.es.js.map +1 -0
- package/dist/components/ui/dialog.es.js +8 -8
- package/dist/components/ui/dialog.es.js.map +1 -1
- package/dist/components/ui/drawer.es.js +18 -21
- package/dist/components/ui/drawer.es.js.map +1 -1
- package/dist/components/ui/dropdown-menu.es.js +38 -38
- package/dist/components/ui/dropdown-menu.es.js.map +1 -1
- package/dist/components/ui/form.es.js +4 -4
- package/dist/components/ui/input-otp.es.js +2 -2
- package/dist/components/ui/input-otp.es.js.map +1 -1
- package/dist/components/ui/input.es.js +7 -7
- package/dist/components/ui/input.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 +17 -15
- package/dist/components/ui/mutli-select.es.js.map +1 -1
- package/dist/components/ui/navigation-menu.es.js +3 -3
- package/dist/components/ui/navigation-menu.es.js.map +1 -1
- package/dist/components/ui/password-input.es.js +10 -10
- package/dist/components/ui/password-input.es.js.map +1 -1
- package/dist/components/ui/popover.es.js +1 -1
- package/dist/components/ui/popover.es.js.map +1 -1
- package/dist/components/ui/radio-group.es.js +7 -7
- package/dist/components/ui/radio-group.es.js.map +1 -1
- package/dist/components/ui/select.es.js +20 -20
- package/dist/components/ui/select.es.js.map +1 -1
- package/dist/components/ui/sheet.es.js +8 -8
- package/dist/components/ui/sheet.es.js.map +1 -1
- package/dist/components/ui/sidebar.es.js +76 -76
- package/dist/components/ui/sidebar.es.js.map +1 -1
- package/dist/components/ui/table-page-layout.es.js +8 -8
- package/dist/components/ui/table-page-layout.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/tabs.es.js +11 -11
- package/dist/components/ui/tabs.es.js.map +1 -1
- package/dist/index.es.d.ts +54 -21
- package/dist/index.es.js +231 -226
- 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/lib/index.css +15 -87
- package/lib/tailwind.preset.css +220 -0
- package/lib/tokens.css +54 -54
- package/package.json +9 -8
- 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 +0 -183
package/lib/index.css
CHANGED
|
@@ -1,62 +1,9 @@
|
|
|
1
1
|
@import url('tokens.css');
|
|
2
|
-
@
|
|
3
|
-
@tailwind
|
|
4
|
-
@tailwind utilities;
|
|
2
|
+
@import 'tailwindcss';
|
|
3
|
+
@import './tailwind.preset.css';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
--background: var(--neutral-1);
|
|
9
|
-
--foreground: var(--neutral-10);
|
|
10
|
-
|
|
11
|
-
--card: var(--neutral-2);
|
|
12
|
-
--card-foreground: var(--foreground);
|
|
13
|
-
--popover: var(--background);
|
|
14
|
-
--popover-foreground: var(--foreground);
|
|
15
|
-
|
|
16
|
-
--primary: var(--primary-8);
|
|
17
|
-
--primary-foreground: var(--primary-2);
|
|
18
|
-
|
|
19
|
-
--secondary: var(--secondary-8);
|
|
20
|
-
--secondary-foreground: var(--secondary-2);
|
|
21
|
-
|
|
22
|
-
--muted: var(--neutral-7);
|
|
23
|
-
--muted-foreground: var(--neutral-4);
|
|
24
|
-
|
|
25
|
-
--accent: var(--neutral-7);
|
|
26
|
-
--accent-foreground: var(--neutral-4);
|
|
27
|
-
|
|
28
|
-
--destructive: var(--destructive-8);
|
|
29
|
-
--destructive-foreground: var(--destructive-2);
|
|
30
|
-
|
|
31
|
-
--success: var(--success-8);
|
|
32
|
-
--succcess-foreground: var(--success-2);
|
|
33
|
-
|
|
34
|
-
--border: var(--neutral-3);
|
|
35
|
-
--input: var(--border);
|
|
36
|
-
--ring: var(--neutral-5);
|
|
37
|
-
|
|
38
|
-
--chart-1: var(--primary-5);
|
|
39
|
-
--chart-2: var(--primary-4);
|
|
40
|
-
--chart-3: var(--secondary-5);
|
|
41
|
-
--chart-4: var(--secondary-4);
|
|
42
|
-
--chart-5: var(--secondary-2);
|
|
43
|
-
|
|
44
|
-
--radius: 0.25rem;
|
|
45
|
-
|
|
46
|
-
--sidebar-background: var(--background);
|
|
47
|
-
--sidebar-foreground: var(--foreground);
|
|
48
|
-
|
|
49
|
-
--sidebar-primary: 240 5.9% 10%;
|
|
50
|
-
--sidebar-primary-foreground: 0 0% 98%;
|
|
51
|
-
|
|
52
|
-
--sidebar-accent: 240 4.8% 95.9%;
|
|
53
|
-
--sidebar-accent-foreground: 240 5.9% 10%;
|
|
54
|
-
|
|
55
|
-
--sidebar-border: 220 13% 91%;
|
|
56
|
-
--sidebar-ring: 217.2 91.2% 59.8%;
|
|
57
|
-
|
|
58
|
-
/** Grid Tokens */
|
|
59
|
-
--grid-fluid-min: 16rem;
|
|
5
|
+
@utility link {
|
|
6
|
+
@apply text-primary underline hover:underline-offset-2 hover:text-primary/70;
|
|
60
7
|
}
|
|
61
8
|
|
|
62
9
|
@layer base {
|
|
@@ -68,42 +15,23 @@
|
|
|
68
15
|
@apply link;
|
|
69
16
|
}
|
|
70
17
|
|
|
71
|
-
|
|
72
|
-
@apply text-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
h2 {
|
|
76
|
-
@apply text-heading-2;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
h3 {
|
|
80
|
-
@apply text-heading-3;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
h4 {
|
|
84
|
-
@apply text-heading-4;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
h5 {
|
|
88
|
-
@apply text-heading-5;
|
|
18
|
+
body {
|
|
19
|
+
@apply bg-background/50 text-foreground;
|
|
89
20
|
}
|
|
90
21
|
|
|
91
|
-
|
|
92
|
-
|
|
22
|
+
*::-webkit-scrollbar {
|
|
23
|
+
width: 6px;
|
|
24
|
+
height: 6px;
|
|
93
25
|
}
|
|
94
26
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
body {
|
|
100
|
-
@apply bg-background text-foreground;
|
|
27
|
+
*::-webkit-scrollbar-track {
|
|
28
|
+
background: white;
|
|
29
|
+
border-radius: 2px;
|
|
101
30
|
}
|
|
102
31
|
|
|
103
|
-
|
|
32
|
+
*::-webkit-scrollbar-thumb {
|
|
33
|
+
background-color: gray;
|
|
104
34
|
|
|
105
|
-
|
|
106
|
-
.link {
|
|
107
|
-
@apply text-primary underline hover:underline-offset-2 hover:text-primary/70;
|
|
35
|
+
border: 3px solid gray;
|
|
108
36
|
}
|
|
109
37
|
}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
/** https://tailwindcss.com/docs/theme#theme-variable-namespaces */
|
|
2
|
+
|
|
3
|
+
@plugin "tailwindcss-animate";
|
|
4
|
+
|
|
5
|
+
@theme {
|
|
6
|
+
/* Radius */
|
|
7
|
+
--radius: 0.25rem;
|
|
8
|
+
--radius-lg: var(--radius);
|
|
9
|
+
--radius-md: calc(var(--radius) - 2px);
|
|
10
|
+
--radius-sm: calc(var(--radius) - 4px);
|
|
11
|
+
|
|
12
|
+
/* Text Sizes */
|
|
13
|
+
--text-sm: 0.875rem;
|
|
14
|
+
--text-base: 1rem;
|
|
15
|
+
--text-md: 1.125rem;
|
|
16
|
+
--text-lg: 1.25rem;
|
|
17
|
+
--text-xl: 1.5rem;
|
|
18
|
+
--text-2xl: 1.75rem;
|
|
19
|
+
--text-3xl: 2rem;
|
|
20
|
+
|
|
21
|
+
/* Colors */
|
|
22
|
+
--color-*: initial;
|
|
23
|
+
--color-primary-1: var(--primary-1);
|
|
24
|
+
--color-primary-2: var(--primary-2);
|
|
25
|
+
--color-primary-3: var(--primary-3);
|
|
26
|
+
--color-primary-4: var(--primary-4);
|
|
27
|
+
--color-primary-5: var(--primary-5);
|
|
28
|
+
--color-primary-6: var(--primary-6);
|
|
29
|
+
--color-primary-7: var(--primary-7);
|
|
30
|
+
--color-primary-8: var(--primary-8);
|
|
31
|
+
--color-primary-9: var(--primary-9);
|
|
32
|
+
--color-primary-10: var(--primary-10);
|
|
33
|
+
|
|
34
|
+
--color-secondary-1: var(--secondary-1);
|
|
35
|
+
--color-secondary-2: var(--secondary-2);
|
|
36
|
+
--color-secondary-3: var(--secondary-3);
|
|
37
|
+
--color-secondary-4: var(--secondary-4);
|
|
38
|
+
--color-secondary-5: var(--secondary-5);
|
|
39
|
+
--color-secondary-6: var(--secondary-6);
|
|
40
|
+
--color-secondary-7: var(--secondary-7);
|
|
41
|
+
--color-secondary-8: var(--secondary-8);
|
|
42
|
+
--color-secondary-9: var(--secondary-9);
|
|
43
|
+
--color-secondary-10: var(--secondary-10);
|
|
44
|
+
|
|
45
|
+
--color-neutral-1: var(--neutral-1);
|
|
46
|
+
--color-neutral-2: var(--neutral-2);
|
|
47
|
+
--color-neutral-3: var(--neutral-3);
|
|
48
|
+
--color-neutral-4: var(--neutral-4);
|
|
49
|
+
--color-neutral-5: var(--neutral-5);
|
|
50
|
+
--color-neutral-6: var(--neutral-6);
|
|
51
|
+
--color-neutral-7: var(--neutral-7);
|
|
52
|
+
--color-neutral-8: var(--neutral-8);
|
|
53
|
+
--color-neutral-9: var(--neutral-9);
|
|
54
|
+
--color-neutral-10: var(--neutral-10);
|
|
55
|
+
|
|
56
|
+
--color-destructive-1: var(--destructive-1);
|
|
57
|
+
--color-destructive-2: var(--destructive-2);
|
|
58
|
+
--color-destructive-3: var(--destructive-3);
|
|
59
|
+
--color-destructive-4: var(--destructive-4);
|
|
60
|
+
--color-destructive-5: var(--destructive-5);
|
|
61
|
+
--color-destructive-6: var(--destructive-6);
|
|
62
|
+
--color-destructive-7: var(--destructive-7);
|
|
63
|
+
--color-destructive-8: var(--destructive-8);
|
|
64
|
+
--color-destructive-9: var(--destructive-9);
|
|
65
|
+
--color-destructive-10: var(--destructive-10);
|
|
66
|
+
|
|
67
|
+
--color-success-1: var(--success-1);
|
|
68
|
+
--color-success-2: var(--success-2);
|
|
69
|
+
--color-success-3: var(--success-3);
|
|
70
|
+
--color-success-4: var(--success-4);
|
|
71
|
+
--color-success-5: var(--success-5);
|
|
72
|
+
--color-success-6: var(--success-6);
|
|
73
|
+
--color-success-7: var(--success-7);
|
|
74
|
+
--color-success-8: var(--success-8);
|
|
75
|
+
--color-success-9: var(--success-9);
|
|
76
|
+
--color-success-10: var(--success-10);
|
|
77
|
+
|
|
78
|
+
--color-background: var(--color-neutral-2);
|
|
79
|
+
--color-foreground: var(--color-neutral-10);
|
|
80
|
+
|
|
81
|
+
--color-card: var(--color-neutral-2);
|
|
82
|
+
--color-card-foreground: var(--color-foreground);
|
|
83
|
+
|
|
84
|
+
--color-popover: var(--color-background);
|
|
85
|
+
--color-popover-foreground: var(--color-foreground);
|
|
86
|
+
|
|
87
|
+
--color-primary: var(--color-primary-8);
|
|
88
|
+
--color-primary-foreground: var(--color-primary-2);
|
|
89
|
+
--color-secondary: var(--color-secondary-8);
|
|
90
|
+
--color-secondary-foreground: var(--color-secondary-2);
|
|
91
|
+
--color-muted: var(--color-neutral-7);
|
|
92
|
+
--color-muted-foreground: var(--color-neutral-4);
|
|
93
|
+
--color-accent: var(--color-neutral-7);
|
|
94
|
+
--color-accent-foreground: var(--color-neutral-4);
|
|
95
|
+
--color-destructive: var(--color-destructive-8);
|
|
96
|
+
--color-destructive-foreground: var(--color-destructive-2);
|
|
97
|
+
--color-success: var(--color-success-8);
|
|
98
|
+
--color-success-foreground: var(--color-success-2);
|
|
99
|
+
|
|
100
|
+
--color-border: var(--color-neutral-3);
|
|
101
|
+
--color-input: var(--color-border);
|
|
102
|
+
--color-ring: var(--color-neutral-5);
|
|
103
|
+
|
|
104
|
+
--color-chart-1: var(--color-primary-5);
|
|
105
|
+
--color-chart-2: var(--color-primary-4);
|
|
106
|
+
--color-chart-3: var(--color-secondary-5);
|
|
107
|
+
--color-chart-4: var(--color-secondary-4);
|
|
108
|
+
--color-chart-5: var(--color-secondary-2);
|
|
109
|
+
|
|
110
|
+
--color-sidebar-background: var(--color-background);
|
|
111
|
+
--color-sidebar-foreground: var(--color-foreground);
|
|
112
|
+
/* // TODO */
|
|
113
|
+
--color-sidebar-primary: 240 5.9% 10%;
|
|
114
|
+
--color-sidebar-primary-foreground: 0 0% 98%;
|
|
115
|
+
|
|
116
|
+
--color-sidebar-accent: 240 4.8% 95.9%;
|
|
117
|
+
--color-sidebar-accent-foreground: 240 5.9% 10%;
|
|
118
|
+
|
|
119
|
+
--color-sidebar-border: var(--color-border);
|
|
120
|
+
--color-sidebar-ring: var(--color-ring);
|
|
121
|
+
|
|
122
|
+
/** TODO Grid Tokens */
|
|
123
|
+
/* --grid-fluid-min: 16rem;
|
|
124
|
+
gridTemplateColumns: {
|
|
125
|
+
fluid: 'repeat(auto-fill, minmax(var(--grid-fluid-min), 1fr))',
|
|
126
|
+
}, */
|
|
127
|
+
|
|
128
|
+
--animate-accordion-down: accordion-down 0.2s ease-out;
|
|
129
|
+
|
|
130
|
+
@keyframes accordion-down {
|
|
131
|
+
from {
|
|
132
|
+
height: 0;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
to {
|
|
136
|
+
height: var(--radix-accordion-content-height);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
--animate-accordion-up: accordion-up 0.2s ease-out;
|
|
141
|
+
|
|
142
|
+
@keyframes accordion-up {
|
|
143
|
+
from {
|
|
144
|
+
height: var(--radix-accordion-content-height);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
to {
|
|
148
|
+
height: 0;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
--animate-collapsible-down: collapsible-down 0.2s ease-out;
|
|
153
|
+
|
|
154
|
+
@keyframes collapsible-down {
|
|
155
|
+
from {
|
|
156
|
+
height: 0;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
to {
|
|
160
|
+
height: var(--radix-collapsible-content-height);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
--animate-collapsible-up: collapsible-up 0.2s ease-out;
|
|
165
|
+
|
|
166
|
+
@keyframes collapsible-up {
|
|
167
|
+
from {
|
|
168
|
+
height: var(--radix-collapsible-content-height);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
to {
|
|
172
|
+
height: 0;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@utility text-caption {
|
|
178
|
+
@apply text-sm;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
@utility text-body {
|
|
183
|
+
@apply text-base;
|
|
184
|
+
/* lineHeight: '1.6', */
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@utility text-heading-6 {
|
|
188
|
+
@apply text-base;
|
|
189
|
+
/* fontWeight: 700, */
|
|
190
|
+
/* lineHeight: '1.2', */
|
|
191
|
+
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
@utility text-heading-5 {
|
|
195
|
+
@apply text-md;
|
|
196
|
+
/* lineHeight: '1.2', */
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@utility text-heading-4 {
|
|
200
|
+
@apply text-lg;
|
|
201
|
+
/* lineHeight: '1.2', */
|
|
202
|
+
/* fontWeight: 500, */
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
@utlility text-heading-3 {
|
|
206
|
+
@apply text-xl;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
@utility text-heading-2 {
|
|
210
|
+
@apply text-2xl;
|
|
211
|
+
/* lineHeight: '1', */
|
|
212
|
+
/* fontWeight: 300, */
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
@utility text-heading-1 {
|
|
216
|
+
@apply text-3xl;
|
|
217
|
+
/* lineHeight: '1', */
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
@layer components {}
|
package/lib/tokens.css
CHANGED
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
*/
|
|
5
5
|
:root {
|
|
6
6
|
--primary-hue: 240;
|
|
7
|
-
--xprimary-1: 0.99 0.01 var(--primary-hue);
|
|
8
|
-
--xprimary-2: 0.97 0.03 var(--primary-hue);
|
|
9
|
-
--xprimary-3: 0.9 0.04 var(--primary-hue);
|
|
10
|
-
--xprimary-4: 0.72 0.13 var(--primary-hue);
|
|
11
|
-
--xprimary-5: 0.67 0.13 var(--primary-hue);
|
|
12
|
-
--xprimary-6: 0.5 0.13 var(--primary-hue);
|
|
13
|
-
--xprimary-7: 0.35 0.13 var(--primary-hue);
|
|
14
|
-
--xprimary-8: 0.25 0.13 var(--primary-hue);
|
|
15
|
-
--xprimary-9: 0.
|
|
16
|
-
--xprimary-10: 0.
|
|
7
|
+
--xprimary-1: oklch(0.99 0.01 var(--primary-hue));
|
|
8
|
+
--xprimary-2: oklch(0.97 0.03 var(--primary-hue));
|
|
9
|
+
--xprimary-3: oklch(0.9 0.04 var(--primary-hue));
|
|
10
|
+
--xprimary-4: oklch(0.72 0.13 var(--primary-hue));
|
|
11
|
+
--xprimary-5: oklch(0.67 0.13 var(--primary-hue));
|
|
12
|
+
--xprimary-6: oklch(0.5 0.13 var(--primary-hue));
|
|
13
|
+
--xprimary-7: oklch(0.35 0.13 var(--primary-hue));
|
|
14
|
+
--xprimary-8: oklch(0.25 0.13 var(--primary-hue));
|
|
15
|
+
--xprimary-9: oklch(0.2 0.09 var(--primary-hue));
|
|
16
|
+
--xprimary-10: oklch(0.1 0.03 var(--primary-hue));
|
|
17
17
|
--primary-1: var(--xprimary-1);
|
|
18
18
|
--primary-2: var(--xprimary-2);
|
|
19
19
|
--primary-3: var(--xprimary-3);
|
|
@@ -24,17 +24,17 @@
|
|
|
24
24
|
--primary-8: var(--xprimary-8);
|
|
25
25
|
--primary-9: var(--xprimary-9);
|
|
26
26
|
--primary-10: var(--xprimary-10);
|
|
27
|
-
--secondary-hue: calc(var(--primary-hue) +
|
|
28
|
-
--xsecondary-1: 0.99 0.01 var(--secondary-hue);
|
|
29
|
-
--xsecondary-2: 0.97 0.03 var(--secondary-hue);
|
|
30
|
-
--xsecondary-3: 0.9 0.04 var(--secondary-hue);
|
|
31
|
-
--xsecondary-4: 0.72 0.13 var(--secondary-hue);
|
|
32
|
-
--xsecondary-5: 0.67 0.13 var(--secondary-hue);
|
|
33
|
-
--xsecondary-6: 0.5 0.13 var(--secondary-hue);
|
|
34
|
-
--xsecondary-7: 0.35 0.13 var(--secondary-hue);
|
|
35
|
-
--xsecondary-8: 0.25 0.13 var(--secondary-hue);
|
|
36
|
-
--xsecondary-9: 0.
|
|
37
|
-
--xsecondary-10: 0.
|
|
27
|
+
--secondary-hue: calc(var(--primary-hue) + 30);
|
|
28
|
+
--xsecondary-1: oklch(0.99 0.01 var(--secondary-hue));
|
|
29
|
+
--xsecondary-2: oklch(0.97 0.03 var(--secondary-hue));
|
|
30
|
+
--xsecondary-3: oklch(0.9 0.04 var(--secondary-hue));
|
|
31
|
+
--xsecondary-4: oklch(0.72 0.13 var(--secondary-hue));
|
|
32
|
+
--xsecondary-5: oklch(0.67 0.13 var(--secondary-hue));
|
|
33
|
+
--xsecondary-6: oklch(0.5 0.13 var(--secondary-hue));
|
|
34
|
+
--xsecondary-7: oklch(0.35 0.13 var(--secondary-hue));
|
|
35
|
+
--xsecondary-8: oklch(0.25 0.13 var(--secondary-hue));
|
|
36
|
+
--xsecondary-9: oklch(0.2 0.09 var(--secondary-hue));
|
|
37
|
+
--xsecondary-10: oklch(0.1 0.03 var(--secondary-hue));
|
|
38
38
|
--secondary-1: var(--xsecondary-1);
|
|
39
39
|
--secondary-2: var(--xsecondary-2);
|
|
40
40
|
--secondary-3: var(--xsecondary-3);
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
--secondary-8: var(--xsecondary-8);
|
|
46
46
|
--secondary-9: var(--xsecondary-9);
|
|
47
47
|
--secondary-10: var(--xsecondary-10);
|
|
48
|
-
--destructive-hue:
|
|
49
|
-
--xdestructive-1: 0.99 0.01 var(--destructive-hue);
|
|
50
|
-
--xdestructive-2: 0.97 0.03 var(--destructive-hue);
|
|
51
|
-
--xdestructive-3: 0.9 0.04 var(--destructive-hue);
|
|
52
|
-
--xdestructive-4: 0.72 0.13 var(--destructive-hue);
|
|
53
|
-
--xdestructive-5: 0.67 0.13 var(--destructive-hue);
|
|
54
|
-
--xdestructive-6: 0.5 0.13 var(--destructive-hue);
|
|
55
|
-
--xdestructive-7: 0.35 0.13 var(--destructive-hue);
|
|
56
|
-
--xdestructive-8: 0.25 0.13 var(--destructive-hue);
|
|
57
|
-
--xdestructive-9: 0.
|
|
58
|
-
--xdestructive-10: 0.
|
|
48
|
+
--destructive-hue: calc(var(--primary-hue) - 230);
|
|
49
|
+
--xdestructive-1: oklch(0.99 0.01 var(--destructive-hue));
|
|
50
|
+
--xdestructive-2: oklch(0.97 0.03 var(--destructive-hue));
|
|
51
|
+
--xdestructive-3: oklch(0.9 0.04 var(--destructive-hue));
|
|
52
|
+
--xdestructive-4: oklch(0.72 0.13 var(--destructive-hue));
|
|
53
|
+
--xdestructive-5: oklch(0.67 0.13 var(--destructive-hue));
|
|
54
|
+
--xdestructive-6: oklch(0.5 0.13 var(--destructive-hue));
|
|
55
|
+
--xdestructive-7: oklch(0.35 0.13 var(--destructive-hue));
|
|
56
|
+
--xdestructive-8: oklch(0.25 0.13 var(--destructive-hue));
|
|
57
|
+
--xdestructive-9: oklch(0.2 0.09 var(--destructive-hue));
|
|
58
|
+
--xdestructive-10: oklch(0.1 0.03 var(--destructive-hue));
|
|
59
59
|
--destructive-1: var(--xdestructive-1);
|
|
60
60
|
--destructive-2: var(--xdestructive-2);
|
|
61
61
|
--destructive-3: var(--xdestructive-3);
|
|
@@ -66,17 +66,17 @@
|
|
|
66
66
|
--destructive-8: var(--xdestructive-8);
|
|
67
67
|
--destructive-9: var(--xdestructive-9);
|
|
68
68
|
--destructive-10: var(--xdestructive-10);
|
|
69
|
-
--success-hue:
|
|
70
|
-
--xsuccess-1: 0.99 0.01 var(--success-hue);
|
|
71
|
-
--xsuccess-2: 0.97 0.03 var(--success-hue);
|
|
72
|
-
--xsuccess-3: 0.9 0.04 var(--success-hue);
|
|
73
|
-
--xsuccess-4: 0.72 0.13 var(--success-hue);
|
|
74
|
-
--xsuccess-5: 0.67 0.13 var(--success-hue);
|
|
75
|
-
--xsuccess-6: 0.5 0.13 var(--success-hue);
|
|
76
|
-
--xsuccess-7: 0.35 0.13 var(--success-hue);
|
|
77
|
-
--xsuccess-8: 0.25 0.13 var(--success-hue);
|
|
78
|
-
--xsuccess-9: 0.
|
|
79
|
-
--xsuccess-10: 0.
|
|
69
|
+
--success-hue: calc(var(--primary-hue) - 90);
|
|
70
|
+
--xsuccess-1: oklch(0.99 0.01 var(--success-hue));
|
|
71
|
+
--xsuccess-2: oklch(0.97 0.03 var(--success-hue));
|
|
72
|
+
--xsuccess-3: oklch(0.9 0.04 var(--success-hue));
|
|
73
|
+
--xsuccess-4: oklch(0.72 0.13 var(--success-hue));
|
|
74
|
+
--xsuccess-5: oklch(0.67 0.13 var(--success-hue));
|
|
75
|
+
--xsuccess-6: oklch(0.5 0.13 var(--success-hue));
|
|
76
|
+
--xsuccess-7: oklch(0.35 0.13 var(--success-hue));
|
|
77
|
+
--xsuccess-8: oklch(0.25 0.13 var(--success-hue));
|
|
78
|
+
--xsuccess-9: oklch(0.2 0.09 var(--success-hue));
|
|
79
|
+
--xsuccess-10: oklch(0.1 0.03 var(--success-hue));
|
|
80
80
|
--success-1: var(--xsuccess-1);
|
|
81
81
|
--success-2: var(--xsuccess-2);
|
|
82
82
|
--success-3: var(--xsuccess-3);
|
|
@@ -88,17 +88,17 @@
|
|
|
88
88
|
--success-9: var(--xsuccess-9);
|
|
89
89
|
--success-10: var(--xsuccess-10);
|
|
90
90
|
--neutral-hue: var(--primary-hue);
|
|
91
|
-
--neutral-s: 0.
|
|
92
|
-
--xneutral-1: 0.
|
|
93
|
-
--xneutral-2: 0.97 var(--neutral-s) var(--neutral-hue);
|
|
94
|
-
--xneutral-3: 0.
|
|
95
|
-
--xneutral-4: 0.
|
|
96
|
-
--xneutral-5: 0.
|
|
97
|
-
--xneutral-6: 0.
|
|
98
|
-
--xneutral-7: 0.
|
|
99
|
-
--xneutral-8: 0.35 var(--neutral-s) var(--neutral-hue);
|
|
100
|
-
--xneutral-9: 0.
|
|
101
|
-
--xneutral-10: 0.
|
|
91
|
+
--neutral-s: 0.005;
|
|
92
|
+
--xneutral-1: oklch(0.985 var(--neutral-s) var(--neutral-hue));
|
|
93
|
+
--xneutral-2: oklch(0.97 var(--neutral-s) var(--neutral-hue));
|
|
94
|
+
--xneutral-3: oklch(0.922 var(--neutral-s) var(--neutral-hue));
|
|
95
|
+
--xneutral-4: oklch(0.87 var(--neutral-s) var(--neutral-hue));
|
|
96
|
+
--xneutral-5: oklch(0.708 var(--neutral-s) var(--neutral-hue));
|
|
97
|
+
--xneutral-6: oklch(0.556 var(--neutral-s) var(--neutral-hue));
|
|
98
|
+
--xneutral-7: oklch(0.439 var(--neutral-s) var(--neutral-hue));
|
|
99
|
+
--xneutral-8: oklch(0.35 var(--neutral-s) var(--neutral-hue));
|
|
100
|
+
--xneutral-9: oklch(0.269 var(--neutral-s) var(--neutral-hue));
|
|
101
|
+
--xneutral-10: oklch(0.205 var(--neutral-s) var(--neutral-hue));
|
|
102
102
|
--neutral-1: var(--xneutral-1);
|
|
103
103
|
--neutral-2: var(--xneutral-2);
|
|
104
104
|
--neutral-3: var(--xneutral-3);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cryptlex/web-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "React component library for Cryptlex web applications",
|
|
5
5
|
"author": "Cryptlex",
|
|
6
6
|
"type": "module",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
},
|
|
16
16
|
"./index.css": "./lib/index.css",
|
|
17
17
|
"./tokens.css": "./lib/tokens.css",
|
|
18
|
-
"./tailwind
|
|
18
|
+
"./tailwind.preset.css": "./lib/tailwind.preset.css"
|
|
19
19
|
},
|
|
20
20
|
"files": [
|
|
21
21
|
"dist",
|
|
22
|
-
"tailwind.preset.
|
|
22
|
+
"lib/tailwind.preset.css",
|
|
23
23
|
"lib/tokens.css",
|
|
24
24
|
"lib/index.css"
|
|
25
25
|
],
|
|
@@ -58,28 +58,31 @@
|
|
|
58
58
|
"@radix-ui/react-slot": "^1.1.0",
|
|
59
59
|
"@radix-ui/react-tabs": "^1.1.1",
|
|
60
60
|
"@radix-ui/react-tooltip": "^1.1.3",
|
|
61
|
+
"@tailwindcss/vite": "^4.0.6",
|
|
61
62
|
"@tanstack/react-query": "^5.62.3",
|
|
62
63
|
"@tanstack/react-router": "^1.87.1",
|
|
63
64
|
"@tanstack/react-table": "^8.20.5",
|
|
64
65
|
"class-variance-authority": "^0.7.0",
|
|
65
|
-
"openapi-fetch": ">=0.13.3",
|
|
66
66
|
"clsx": "^2.1.1",
|
|
67
67
|
"cmdk": "1.0.0",
|
|
68
68
|
"date-fns": "^3.0.0",
|
|
69
69
|
"input-otp": "^1.4.1",
|
|
70
70
|
"lodash-es": "^4.17.21",
|
|
71
71
|
"lucide-react": "^0.453.0",
|
|
72
|
+
"openapi-fetch": ">=0.13.3",
|
|
72
73
|
"react": "^18.3.1",
|
|
73
74
|
"react-day-picker": "8.10.1",
|
|
74
75
|
"react-dom": "^18.3.1",
|
|
75
76
|
"react-hook-form": "^7.53.1",
|
|
76
77
|
"recharts": "^2.13.0",
|
|
78
|
+
"rollup-preserve-directives": "^1.1.3",
|
|
77
79
|
"sonner": "^1.7.0",
|
|
78
|
-
"tailwindcss": "^
|
|
80
|
+
"tailwindcss": "^4.0.6",
|
|
79
81
|
"tailwindcss-animate": "^1.0.7",
|
|
80
82
|
"use-debounce": "^10.0.4",
|
|
81
83
|
"vaul": "^1.1.1",
|
|
82
|
-
"
|
|
84
|
+
"zod": "^3.24.1",
|
|
85
|
+
"@hookform/resolvers": "^4.0.0"
|
|
83
86
|
},
|
|
84
87
|
"dependencies": {
|
|
85
88
|
"@cryptlex/web-api-types": "^1.17.0"
|
|
@@ -100,13 +103,11 @@
|
|
|
100
103
|
"@types/react": "^18.3.10",
|
|
101
104
|
"@types/react-dom": "^18.3.0",
|
|
102
105
|
"@vitejs/plugin-react": "^4.3.2",
|
|
103
|
-
"autoprefixer": "^10.4.20",
|
|
104
106
|
"eslint": "^9.11.1",
|
|
105
107
|
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
|
|
106
108
|
"eslint-plugin-react-refresh": "^0.4.12",
|
|
107
109
|
"eslint-plugin-storybook": "^0.11.0",
|
|
108
110
|
"globals": "^15.9.0",
|
|
109
|
-
"postcss": "^8.4.47",
|
|
110
111
|
"sass": "^1.80.6",
|
|
111
112
|
"storybook": "^8.4.2",
|
|
112
113
|
"typescript": "^5.5.3",
|
|
@@ -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;"}
|