jsonforms-nuxt-ui-renderers 0.2.0 → 0.2.2

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 CHANGED
@@ -66,18 +66,50 @@ This package is intentionally small and opinionated: it ships a **single** rende
66
66
 
67
67
  ## Theming
68
68
 
69
- The package uses semantic class names (`jf-*`) for layout and typography. Override via:
69
+ The package uses semantic class names (`jf-*`) for layout and typography. Two ways to customize:
70
70
 
71
- 1. **CSS variables** Customize defaults by overriding variables in `:root` (see `styles.css`).
72
- 2. **Theme overrides** – Pass custom classes to `createNuxtUiRenderers`:
71
+ ### Option 1: Default styles + CSS variables
72
+
73
+ Import the default stylesheet and override variables in your app:
74
+
75
+ ```ts
76
+ import 'jsonforms-nuxt-ui-renderers/styles.css'
77
+ ```
78
+
79
+ CSS variables (in `styles.css`) you can override in `:root`:
80
+
81
+ | Variable | Default | Description |
82
+ |----------|---------|-------------|
83
+ | `--jf-panel-border` | `1px solid rgba(0,0,0,0.06)` | Panel border |
84
+ | `--jf-panel-border-radius` | `0.25rem` | Panel corner radius |
85
+ | `--jf-panel-padding` | `0.75rem` | Panel padding |
86
+ | `--jf-gap` | `0.75rem` | Layout gap |
87
+ | `--jf-gap-wide` | `1.5rem` | Wide layout gap |
88
+ | `--jf-label-section-size` | `0.875rem` | Label font size |
89
+ | `--jf-label-section-weight` | `600` | Label font weight |
90
+ | `--jf-text-muted-color` | `rgb(107 114 128)` | Muted text (light) |
91
+ | `--jf-text-muted-color-dark` | `rgb(156 163 175)` | Muted text (dark) |
92
+ | `--jf-text-item-title-color` | `rgb(55 65 81)` | Item title (light) |
93
+ | `--jf-text-item-title-color-dark` | `rgb(229 231 235)` | Item title (dark) |
94
+ | `--jf-text-label-color` | `rgb(75 85 99)` | Label (light) |
95
+ | `--jf-text-label-color-dark` | `rgb(209 213 219)` | Label (dark) |
96
+
97
+ ### Option 2: Theme overrides (e.g. Tailwind)
98
+
99
+ Pass custom classes to match your app. You can omit `styles.css` when using full overrides:
73
100
 
74
101
  ```ts
75
102
  import { createNuxtUiRenderers } from 'jsonforms-nuxt-ui-renderers'
76
103
 
77
104
  const renderers = createNuxtUiRenderers({
78
105
  theme: {
79
- panel: 'rounded border border-gray-200 p-3', // Tailwind
106
+ panel: 'rounded border border-default bg-muted/40 p-3',
107
+ groupNested: 'rounded bg-muted/20 p-3',
80
108
  layoutVertical: 'flex flex-col gap-3',
109
+ layoutHorizontal: 'flex flex-col gap-3 md:flex-row md:flex-wrap',
110
+ labelSection: 'text-sm font-semibold',
111
+ textMuted: 'text-sm text-muted',
112
+ // ... see NuxtUiRenderersTheme for all keys
81
113
  },
82
114
  })
83
115
  ```