@pablozaiden/webapp 0.7.0 → 1.0.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.
@@ -44,7 +44,8 @@ Use these first:
44
44
  | `Panel` | Cards/sections; use `actions` for a top-right menu/action area |
45
45
  | `ActionMenu` | Three-line action menu for secondary surfaces; entity-level shell menus should usually come from `SidebarNode.actions` so the framework renders them in the sidebar context menu and fixed title bar |
46
46
  | `Button` / `IconButton` | Form submission and true inline controls; prefer action menus for entity/app commands |
47
- | `Badge` | Status/count labels; sidebar badges render as compact colored dots to preserve sidebar width |
47
+ | `Badge` | Generic status/count labels; preserves the supplied text casing |
48
+ | `StatusBadge` | Status labels with the shared uppercase and letter-spacing treatment |
48
49
  | `EntityHeader` | Main-content entity title/description/actions |
49
50
  | `DataList` / `DataListRow` | Lists with title, description, metadata, badge and actions |
50
51
  | `TextField`, `TextAreaField`, `SelectField` | Forms |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pablozaiden/webapp",
3
- "version": "0.7.0",
3
+ "version": "1.0.0",
4
4
  "description": "Opinionated Bun + React webapp framework for single-server apps",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -32,17 +32,27 @@ export function IconButton({
32
32
 
33
33
  export type BadgeSize = "sm" | "md";
34
34
 
35
+ export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
36
+ variant?: BadgeVariant;
37
+ size?: BadgeSize;
38
+ children: ReactNode;
39
+ }
40
+
35
41
  export function Badge({
36
42
  variant = "default",
37
43
  size = "sm",
38
44
  className = "",
39
45
  children,
40
46
  ...props
41
- }: HTMLAttributes<HTMLSpanElement> & { variant?: BadgeVariant; size?: BadgeSize; children: ReactNode }) {
47
+ }: BadgeProps) {
42
48
  const sizeClass = size === "md" ? "wapp-badge-md" : "";
43
49
  return <span {...props} className={["wapp-badge", `wapp-badge-${variant}`, sizeClass, className].filter(Boolean).join(" ")}>{children}</span>;
44
50
  }
45
51
 
52
+ export function StatusBadge({ className = "", ...props }: BadgeProps) {
53
+ return <Badge {...props} className={["wapp-status-badge", className].filter(Boolean).join(" ")} />;
54
+ }
55
+
46
56
  export type PageLayout = "padded" | "full";
47
57
 
48
58
  export function Page({
@@ -1284,6 +1284,11 @@ textarea::placeholder {
1284
1284
  padding: 0.25rem 0.625rem;
1285
1285
  }
1286
1286
 
1287
+ .wapp-status-badge {
1288
+ text-transform: uppercase;
1289
+ letter-spacing: 0.05em;
1290
+ }
1291
+
1287
1292
  .wapp-sidebar-badge {
1288
1293
  flex: 0 0 auto;
1289
1294
  width: 0.625rem;