@pablozaiden/webapp 0.3.0 → 0.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pablozaiden/webapp",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Opinionated Bun + React webapp framework for single-server apps",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -30,6 +30,10 @@ export function Badge({ variant = "default", className = "", children, ...props
30
30
  return <span {...props} className={`wapp-badge wapp-badge-${variant} ${className}`}>{children}</span>;
31
31
  }
32
32
 
33
+ export function Page({ className = "", children, ...props }: HTMLAttributes<HTMLDivElement> & { children: ReactNode }) {
34
+ return <div {...props} className={`wapp-page ${className}`}>{children}</div>;
35
+ }
36
+
33
37
  export function Panel({ title, description, actions, children, className = "" }: { title?: string; description?: string; actions?: ReactNode; children?: ReactNode; className?: string }) {
34
38
  return (
35
39
  <section className={`wapp-panel ${className}`}>
@@ -1,6 +1,6 @@
1
1
  :root {
2
2
  color-scheme: light;
3
- --wapp-bg: #f3f4f6;
3
+ --wapp-bg: var(--wapp-shell-bg);
4
4
  --wapp-shell-bg: rgb(249 250 251 / 0.95);
5
5
  --wapp-surface: #ffffff;
6
6
  --wapp-surface-muted: #f9fafb;
@@ -18,7 +18,7 @@
18
18
 
19
19
  :root.dark {
20
20
  color-scheme: dark;
21
- --wapp-bg: #0a0a0a;
21
+ --wapp-bg: var(--wapp-shell-bg);
22
22
  --wapp-shell-bg: rgb(23 23 23 / 0.95);
23
23
  --wapp-surface: #262626;
24
24
  --wapp-surface-muted: #171717;
@@ -550,6 +550,12 @@ textarea::placeholder {
550
550
  min-height: 0;
551
551
  overflow: auto;
552
552
  overflow-x: hidden;
553
+ padding: 0;
554
+ }
555
+
556
+ .wapp-page {
557
+ width: 100%;
558
+ min-width: 0;
553
559
  padding: 1.5rem 2rem 2rem;
554
560
  }
555
561
 
@@ -1765,11 +1771,14 @@ textarea::placeholder {
1765
1771
  }
1766
1772
 
1767
1773
  .wapp-main-content {
1768
- padding: 1rem;
1769
1774
  overflow: auto;
1770
1775
  overflow-x: hidden;
1771
1776
  }
1772
1777
 
1778
+ .wapp-page {
1779
+ padding: 1rem;
1780
+ }
1781
+
1773
1782
  .wapp-panel-header,
1774
1783
  .wapp-entity-header {
1775
1784
  flex-wrap: wrap;