bare-tui-form 0.0.2 → 0.0.3

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/fields/select.js CHANGED
@@ -35,7 +35,9 @@ class SelectField extends Field {
35
35
  }
36
36
 
37
37
  controlView() {
38
- return this.control.view()
38
+ const view = this.control.view()
39
+ if (this.control.open) return view
40
+ return view + '\n' + this.theme.help(' space to open')
39
41
  }
40
42
  }
41
43
 
package/form.js CHANGED
@@ -915,12 +915,9 @@ class Form {
915
915
  }
916
916
  if (this.submitted) return [t.help(' ✓ submitted')]
917
917
  const chord = (a) => (a && a[0]) || ''
918
- const parts = [
919
- `${chord(this.keys.next)} move`,
920
- `${chord(this.keys.confirm)} confirm`,
921
- `${chord(this.keys.submit)} submit`,
922
- `${chord(this.keys.cancel)} cancel`
923
- ]
918
+ const parts = []
919
+ if (this.ring.items.length > 1) parts.push(`${chord(this.keys.next)} move`)
920
+ parts.push(`${chord(this.keys.submit)} submit`, `${chord(this.keys.cancel)} cancel`)
924
921
  if (scrollable) parts.push('↕ scroll')
925
922
  return [t.help(' ' + parts.join(' · '))]
926
923
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-tui-form",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "A declarative form builder for bare-tui",
5
5
  "main": "index.js",
6
6
  "exports": {