cynx-ui 1.2.19 → 1.2.21

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.
Files changed (2) hide show
  1. package/components/Card.jsx +62 -62
  2. package/package.json +1 -1
@@ -1,62 +1,62 @@
1
- import { Pagination } from './Pagination';
2
-
3
- export function PageShell({ title, children }) {
4
- return (
5
- <div style={{ padding: '20px 24px' }}>
6
- {children}
7
- </div>
8
- );
9
- }
10
-
11
- export function TableCard({ children }) {
12
- return <div style={{ flex: 1, overflow: 'hidden', display: 'flex', flexDirection: 'column', minHeight: 0 }}>{children}</div>;
13
- }
14
- export function TableCardFilters({ children }) {
15
- return <div style={{ display: 'flex', alignItems: 'center', gap: 8, padding: '8px 0', borderBottom: '1px solid var(--border-light, #ebebf0)' }}>{children}</div>;
16
- }
17
- export function TableCardBody({ children }) {
18
- return <div style={{ flex: 1, overflowY: 'auto', minHeight: 0, scrollbarWidth: 'thin', scrollbarColor: 'var(--grey-2, #d7d8e0) transparent' }}>{children}</div>;
19
- }
20
- export function TableCardFooter({ total, page, limit, pages, onChange }) {
21
- const from = total === 0 ? 0 : (page - 1) * limit + 1;
22
- const to = Math.min(page * limit, total);
23
- return (
24
- <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: '10px 0', borderTop: '1px solid var(--border-light, #ebebf0)', fontSize: '.78rem', color: 'var(--muted, #9b9daa)' }}>
25
- <span>
26
- {total === 0 ? 'No records' : `${from}–${to} of ${total}`}
27
- </span>
28
- <Pagination page={page} pages={pages} onChange={onChange} />
29
- </div>
30
- );
31
- }
32
-
33
- export function CardHdr({ title, icon: Icon, tabs, children }) {
34
- return (
35
- <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: '13px 0', borderBottom: '1px solid var(--border-light, #ebebf0)' }}>
36
- <div style={{ display: 'flex', alignItems: 'center', gap: 6, fontSize: '.85rem', fontWeight: 600, color: 'var(--primary-text, #0f111c)' }}>
37
- {Icon && <Icon size={14} />}
38
- {title}
39
- {tabs && <span style={{ marginLeft: 12 }}>{tabs}</span>}
40
- </div>
41
- {children && <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>{children}</div>}
42
- </div>
43
- );
44
- }
45
-
46
- export function StatCard({ label, value, sub }) {
47
- return (
48
- <div style={{ background: 'var(--surface, #fff)', border: '1px solid var(--border-light, #ebebf0)', borderRadius: 'var(--rads, 8px)', padding: '14px 16px', boxShadow: 'var(--shadow, 0px 1px 3px rgba(20,22,41,.10))' }}>
49
- <div style={{ fontSize: '.62rem', fontWeight: 600, textTransform: 'uppercase', letterSpacing: '.08em', color: 'var(--muted, #9b9daa)', marginBottom: 4 }}>{label}</div>
50
- <div style={{ fontSize: '1.4rem', fontWeight: 700, color: 'var(--primary-text, #0f111c)', lineHeight: 1.2 }}>{value ?? '—'}</div>
51
- {sub && <div style={{ fontSize: '.72rem', color: 'var(--muted, #9b9daa)', marginTop: 2 }}>{sub}</div>}
52
- </div>
53
- );
54
- }
55
- export function StatCardSkeleton() {
56
- return (
57
- <div style={{ background: 'var(--surface, #fff)', border: '1px solid var(--border-light, #ebebf0)', borderRadius: 'var(--rads, 8px)', padding: '14px 16px' }}>
58
- <div className="skeleton skeleton-text" style={{ marginBottom: 10, height: 12, width: '40%', background: 'linear-gradient(90deg, var(--grey-1, #f5f5f8) 25%, var(--border-light, #ebebf0) 50%, var(--grey-1, #f5f5f8) 75%)', backgroundSize: '600px 100%', animation: 'shimmer 1.4s ease infinite', borderRadius: 'var(--radxs, 6px)' }} />
59
- <div className="skeleton skeleton-text" style={{ height: 28, width: '60%', marginBottom: 6, background: 'linear-gradient(90deg, var(--grey-1, #f5f5f8) 25%, var(--border-light, #ebebf0) 50%, var(--grey-1, #f5f5f8) 75%)', backgroundSize: '600px 100%', animation: 'shimmer 1.4s ease infinite', borderRadius: 'var(--radxs, 6px)' }} />
60
- </div>
61
- );
62
- }
1
+ import { Pagination } from './Pagination';
2
+
3
+ export function PageShell({ title, children }) {
4
+ return (
5
+ <div style={{ padding: '20px 24px' }}>
6
+ {children}
7
+ </div>
8
+ );
9
+ }
10
+
11
+ export function TableCard({ children }) {
12
+ return <div style={{ flex: 1, overflow: 'hidden', display: 'flex', flexDirection: 'column', minHeight: 0 }}>{children}</div>;
13
+ }
14
+ export function TableCardFilters({ children }) {
15
+ return <div style={{ display: 'flex', alignItems: 'center', gap: 8, padding: '8px 0', borderBottom: '1px solid var(--border-light, #ebebf0)' }}>{children}</div>;
16
+ }
17
+ export function TableCardBody({ children }) {
18
+ return <div style={{ flex: 1, overflowY: 'auto', minHeight: 0, scrollbarWidth: 'thin', scrollbarColor: 'var(--grey-2, #d7d8e0) transparent' }}>{children}</div>;
19
+ }
20
+ export function TableCardFooter({ total, page, limit, pages, onChange }) {
21
+ const from = total === 0 ? 0 : (page - 1) * limit + 1;
22
+ const to = Math.min(page * limit, total);
23
+ return (
24
+ <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: '10px 0', borderTop: '1px solid var(--border-light, #ebebf0)', fontSize: '.78rem', color: 'var(--muted, #9b9daa)' }}>
25
+ <span>
26
+ {total === 0 ? 'No records' : `${from}–${to} of ${total}`}
27
+ </span>
28
+ <Pagination page={page} pages={pages} onChange={onChange} />
29
+ </div>
30
+ );
31
+ }
32
+
33
+ export function CardHdr({ title, icon: Icon, tabs, children }) {
34
+ return (
35
+ <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', padding: '13px 0', borderBottom: '1px solid var(--border-light, #ebebf0)' }}>
36
+ <div style={{ display: 'flex', alignItems: 'center', gap: 6, fontSize: '.85rem', fontWeight: 600, color: 'var(--primary-text, #0f111c)' }}>
37
+ {Icon && <Icon size={14} />}
38
+ {title}
39
+ {tabs && <span style={{ marginLeft: 12 }}>{tabs}</span>}
40
+ </div>
41
+ {children && <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>{children}</div>}
42
+ </div>
43
+ );
44
+ }
45
+
46
+ export function StatCard({ label, value, sub }) {
47
+ return (
48
+ <div style={{ background: 'var(--surface, #fff)', border: '1px solid var(--border-light, #ebebf0)', borderRadius: 'var(--rads, 8px)', padding: '14px 16px', boxShadow: 'var(--shadow, 0px 1px 3px rgba(20,22,41,.10))' }}>
49
+ <div style={{ fontSize: '.62rem', fontWeight: 600, textTransform: 'uppercase', letterSpacing: '.08em', color: 'var(--muted, #9b9daa)', marginBottom: 4 }}>{label}</div>
50
+ <div style={{ fontSize: '1.4rem', fontWeight: 700, color: 'var(--primary-text, #0f111c)', lineHeight: 1.2 }}>{value ?? '—'}</div>
51
+ {sub && <div style={{ fontSize: '.72rem', color: 'var(--muted, #9b9daa)', marginTop: 2 }}>{sub}</div>}
52
+ </div>
53
+ );
54
+ }
55
+ export function StatCardSkeleton() {
56
+ return (
57
+ <div style={{ background: 'var(--surface, #fff)', border: '1px solid var(--border-light, #ebebf0)', borderRadius: 'var(--rads, 8px)', padding: '14px 16px' }}>
58
+ <div className="skeleton skeleton-text" style={{ marginBottom: 10, height: 12, width: '40%', background: 'linear-gradient(90deg, var(--grey-1, #f5f5f8) 25%, var(--border-light, #ebebf0) 50%, var(--grey-1, #f5f5f8) 75%)', backgroundSize: '600px 100%', animation: 'shimmer 1.4s ease infinite', borderRadius: 'var(--radxs, 6px)' }} />
59
+ <div className="skeleton skeleton-text" style={{ height: 28, width: '60%', marginBottom: 6, background: 'linear-gradient(90deg, var(--grey-1, #f5f5f8) 25%, var(--border-light, #ebebf0) 50%, var(--grey-1, #f5f5f8) 75%)', backgroundSize: '600px 100%', animation: 'shimmer 1.4s ease infinite', borderRadius: 'var(--radxs, 6px)' }} />
60
+ </div>
61
+ );
62
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cynx-ui",
3
- "version": "1.2.19",
3
+ "version": "1.2.21",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js"