Skip to content

Commit 33685fd

Browse files
authored
Merge pull request xch-dev#657 from dkackman/theme-nft-prep
Theme nft prep
2 parents 724d565 + 271f232 commit 33685fd

File tree

10 files changed

+9
-129
lines changed

10 files changed

+9
-129
lines changed

src/components/ui/data-table.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,7 @@ export function DataTable<TData, TValue>({
8080

8181
return (
8282
<div>
83-
<div
84-
className='border'
85-
style={{ borderRadius: 'var(--table-border-radius, 0.375rem)' }}
86-
>
83+
<div className='border rounded-lg table-theme'>
8784
<Table aria-label='Table' style={{ border: 'none' }}>
8885
<TableHeader>
8986
{table.getHeaderGroups().map((headerGroup) => (

src/components/ui/table.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const Table = React.forwardRef<
1515
<table
1616
ref={ref}
1717
className={cn(
18-
'w-full caption-bottom text-sm table-fixed table-theme',
18+
'w-full caption-bottom text-md table-fixed table-theme',
1919
className,
2020
)}
2121
role='table'
@@ -105,7 +105,7 @@ const TableCell = React.forwardRef<
105105
<td
106106
ref={ref}
107107
className={cn(
108-
'py-2 px-1 md:px-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] overflow-hidden',
108+
'py-2 px-1 md:px-2 align-middle text-lg [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] overflow-hidden',
109109
className,
110110
)}
111111
{...props}

src/index.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,6 @@ body {
817817
.table-theme {
818818
background: var(--table-background);
819819
border: var(--table-border);
820-
border-radius: var(--table-border-radius);
821820
box-shadow: var(--table-box-shadow);
822821
overflow: hidden;
823822
border-collapse: separate;

src/lib/theme.ts

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,6 @@ export function applyTheme(theme: Theme, root: HTMLElement) {
196196
].forEach((cssVar) => {
197197
root.style.removeProperty(cssVar);
198198
});
199-
200-
// Set default table border radius if not specified by theme
201-
root.style.setProperty('--table-border-radius', 'var(--radius)', 'important');
202-
203199
applyThemeVariables(theme, root);
204200

205201
// Apply backdrop-filter variables if defined in colors object
@@ -332,15 +328,7 @@ export function applyTheme(theme: Theme, root: HTMLElement) {
332328
{
333329
obj: theme.tables.header,
334330
prefix: 'table-header',
335-
properties: [
336-
'background',
337-
'color',
338-
'border',
339-
'fontWeight',
340-
'fontSize',
341-
'padding',
342-
'backdropFilter',
343-
],
331+
properties: ['background', 'color', 'border', 'backdropFilter'],
344332
},
345333
{
346334
obj: theme.tables.row,
@@ -360,7 +348,7 @@ export function applyTheme(theme: Theme, root: HTMLElement) {
360348
{
361349
obj: theme.tables.cell,
362350
prefix: 'table-cell',
363-
properties: ['padding', 'border', 'fontSize'],
351+
properties: ['border'],
364352
},
365353
{
366354
obj: theme.tables.footer,
@@ -542,14 +530,10 @@ const backgroundImageVariableNames = [
542530
const tableVariableNames = [
543531
'--table-background',
544532
'--table-border',
545-
'--table-border-radius',
546533
'--table-box-shadow',
547534
'--table-header-background',
548535
'--table-header-color',
549536
'--table-header-border',
550-
'--table-header-font-weight',
551-
'--table-header-font-size',
552-
'--table-header-padding',
553537
'--table-header-backdrop-filter',
554538
'--table-header-backdrop-filter-webkit',
555539
'--table-row-background',
@@ -561,9 +545,7 @@ const tableVariableNames = [
561545
'--table-row-hover-color',
562546
'--table-row-selected-background',
563547
'--table-row-selected-color',
564-
'--table-cell-padding',
565548
'--table-cell-border',
566-
'--table-cell-font-size',
567549
'--table-footer-background',
568550
'--table-footer-color',
569551
'--table-footer-border',

src/lib/theme.type.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,11 @@ export interface Theme {
7575
tables?: {
7676
background?: string;
7777
border?: string;
78-
borderRadius?: string;
7978
boxShadow?: string;
8079
header?: {
8180
background?: string;
8281
color?: string;
8382
border?: string;
84-
fontWeight?: string;
85-
fontSize?: string;
86-
padding?: string;
8783
backdropFilter?: string;
8884
};
8985
row?: {
@@ -101,9 +97,7 @@ export interface Theme {
10197
};
10298
};
10399
cell?: {
104-
padding?: string;
105100
border?: string;
106-
fontSize?: string;
107101
};
108102
footer?: {
109103
background?: string;

src/themes/amiga/theme.json

Lines changed: 0 additions & 56 deletions
This file was deleted.

src/themes/circuit/theme.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,10 @@
6363
"tables": {
6464
"background": "rgba(15, 23, 42, 0.85)",
6565
"border": "1px solid rgba(59, 130, 246, 0.3)",
66-
"borderRadius": "8px",
67-
"boxShadow": "0 4px 6px -1px rgba(14, 165, 233, 0.15)",
66+
"boxShadow": "var(--shadow-lg)",
6867
"header": {
6968
"background": "rgba(14, 165, 233, 0.1)",
70-
"color": "#e0f2fe",
71-
"fontWeight": "600",
72-
"fontSize": "14px"
69+
"color": "#e0f2fe"
7370
},
7471
"row": {
7572
"background": "rgba(15, 23, 42, 0.7)",
@@ -84,9 +81,6 @@
8481
"color": "#ffffff"
8582
}
8683
},
87-
"cell": {
88-
"fontSize": "14px"
89-
},
9084
"footer": {
9185
"background": "rgba(14, 165, 233, 0.05)",
9286
"color": "#93c5fd",

src/themes/glass-dark/theme.json

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,11 @@
6363
"tables": {
6464
"background": "rgba(8, 8, 12, 0.25)",
6565
"border": "1px solid rgba(0,214,255,0.15)",
66-
"borderRadius": "12px",
6766
"boxShadow": "0 12px 30px rgba(0,0,0,0.30)",
6867
"header": {
6968
"background": "rgba(0,0,0,0.85)",
7069
"color": "#cae1f2",
7170
"border": "1px solid rgba(0,214,255,0.15)",
72-
"fontWeight": "600",
73-
"fontSize": "14px",
7471
"backdropFilter": "blur(18px) saturate(160%) brightness(0.9)"
7572
},
7673
"row": {
@@ -87,10 +84,6 @@
8784
"color": "#cae1f2"
8885
}
8986
},
90-
"cell": {
91-
"padding": "12px 16px",
92-
"fontSize": "14px"
93-
},
9487
"footer": {
9588
"background": "rgba(0,0,0,0.85)",
9689
"color": "#e8e8ee",
@@ -192,9 +185,7 @@
192185
}
193186
}
194187
},
195-
"buttonStyles": [
196-
"rounded-buttons"
197-
],
188+
"buttonStyles": ["rounded-buttons"],
198189
"switches": {
199190
"checked": {
200191
"background": "rgba(0,255,255,0.75)"
@@ -218,4 +209,4 @@
218209
"boxShadow": "0 24px 64px rgba(0,0,0,0.50), 0 0 0 1px rgba(10,132,255,0.20), 0 0 40px rgba(10,132,255,0.12)"
219210
}
220211
}
221-
}
212+
}

src/themes/schema.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -717,22 +717,13 @@
717717
"border": {
718718
"type": "string"
719719
},
720-
"borderRadius": {
721-
"type": "string"
722-
},
723720
"boxShadow": {
724721
"type": "string"
725722
},
726723
"cell": {
727724
"properties": {
728725
"border": {
729726
"type": "string"
730-
},
731-
"fontSize": {
732-
"type": "string"
733-
},
734-
"padding": {
735-
"type": "string"
736727
}
737728
},
738729
"type": "object"
@@ -767,15 +758,6 @@
767758
},
768759
"color": {
769760
"type": "string"
770-
},
771-
"fontSize": {
772-
"type": "string"
773-
},
774-
"fontWeight": {
775-
"type": "string"
776-
},
777-
"padding": {
778-
"type": "string"
779761
}
780762
},
781763
"type": "object"

src/themes/win95/theme.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,5 @@
9797
"color": "hsl(240 100% 50%)",
9898
"textShadow": "none"
9999
}
100-
},
101-
"tables": {
102-
"borderRadius": "0px"
103100
}
104101
}

0 commit comments

Comments
 (0)