Commit Graph

23 Commits

Author SHA1 Message Date
Lutetium-Vanadium
2e5ef595b1 Add gif, update macro implementation and fix few errors 2022-09-01 17:29:03 +05:30
NovaliX-Dev
09c9a0b7fc added snapshots 2022-09-01 13:01:29 +02:00
Lutetium-Vanadium
ebe87f88bc update the way indices are showin in RawSelect 2022-08-27 18:37:09 +05:30
Lutetium-Vanadium
d58f4903c0 Allow setting custom symbol sets and prepare for 0.4.0 2022-06-04 13:36:39 +05:30
Lutetium-Vanadium
c1505bf21f Fix #7 and prepare to publish v0.3.0 2022-01-18 19:06:56 +08:00
Lutetium-Vanadium
aa1d2cb54b Add support for handling abort with Esc
Earlier, when the user pressed the `Esc` key, nothing would happen as
`ui::Input` would just pass the event on to the prompt. Now 2 other
actions can be specified.

`OnEsc::Terminate`: returns an `Err` which will propagate upwards,
essentially cancelling the `PromptModule`

`OnEsc::SkipQuestion`: returns `None`, showing that the question has
been skipped

Implements #6
2022-01-18 18:33:13 +08:00
Lutetium-Vanadium
4e2dc9bdfa Allow using right arrow key to autocomplete default 2022-01-15 19:52:50 +08:00
Lutetium-Vanadium
911dd36aad Change rendering of the default value in input, int and float
Earlier, the default value would just be shown on the side at all times.
This is even if the default will not be selected which can be
misleading. This change shows the default as greyed out text in the
input itself. It also allows pressing 'Tab' to make the current input
the default if the current input value is the start of the default.

Implements #4
2021-12-30 15:58:41 +08:00
Lutetium-Vanadium
1d5fadad23 Add the validate_on_key option
`validate_on_key` is a function that can be supplied by the library user
to show the input in red if the it doesn't pass some validation. It
works for the input, int, float and password prompts.

Implements #5.
2021-12-27 17:35:46 +08:00
Lutetium-Vanadium
732dc1e9d9 rename to requestty 2021-07-15 17:05:17 +05:30
Lutetium-Vanadium
1f271ec2ef Fix ci errors 2021-07-14 20:11:30 +05:30
Lutetium-Vanadium
a2bf64ad4a Rename Checkbox to MultiSelect 2021-07-07 16:13:38 +05:30
Lutetium-Vanadium
291d26eeb5 expand: changed unexpand explanation arrow to look nicer 2021-06-30 17:02:02 +05:30
Lutetium-Vanadium
03e3c2234f return Text<String> instead of just String for multiline errors 2021-06-30 16:54:41 +05:30
Lutetium-Vanadium
7774ef3c29 added tests for raw select 2021-06-28 18:02:32 +05:30
Lutetium-Vanadium
68c5c214f4 added tests for select 2021-06-28 14:14:03 +05:30
Lutetium-Vanadium
893037fbfe added tests for password 2021-06-24 17:05:03 +05:30
Lutetium-Vanadium
43eb1531cd added tests for input 2021-06-24 16:28:28 +05:30
Lutetium-Vanadium
d8905971cd added tests for int & float 2021-06-23 19:27:43 +05:30
Lutetium-Vanadium
bffe9505e6 Fix reversed foreground to use Color::Black if it is Color::Reset 2021-06-23 19:22:54 +05:30
Lutetium-Vanadium
34351e420f added expand tests 2021-06-22 18:14:40 +05:30
Lutetium-Vanadium
5970c13f89 added tests for confirm 2021-06-21 19:52:47 +05:30
Lutetium-Vanadium
3123937e14 added tests for checkbox
Also made every event type required by generic over any Iterator
2021-06-20 20:46:12 +05:30