@rokkit/forms 1.0.5 → 1.1.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": "@rokkit/forms",
3
- "version": "1.0.5",
3
+ "version": "1.1.1",
4
4
  "description": "Form building components for Rokkit applications",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,6 +18,16 @@
18
18
  onchange,
19
19
  id,
20
20
  renderers,
21
+ /**
22
+ * Field layout — controls how the label and input are arranged.
23
+ *
24
+ * - `stacked` (default) — label above input. Best for form pages
25
+ * with full-width inputs and long labels.
26
+ * - `inline` — label and input on the same row (label takes a
27
+ * fixed leading column). Best for compact control panels —
28
+ * playground knob rows, settings dialogs, tweak editors.
29
+ */
30
+ variant = 'stacked',
21
31
  ...restProps
22
32
  } = $props()
23
33
 
@@ -41,6 +51,7 @@
41
51
  data-field-dirty={dirty || undefined}
42
52
  data-field-empty={value === null || value === undefined}
43
53
  data-has-icon={icon !== null && icon !== undefined}
54
+ data-field-layout={variant}
44
55
  >
45
56
  <div data-field aria-label={description ?? label ?? name}>
46
57
  {#if label && !nolabel}