* feat(filter,choose): allow UI to be padded
* feat: --padding everywhere
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* fix: unrelated lint issue
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* fix: filter
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* fix: use ordered.Clamp
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Christian Rocha <christian@rocha.is>
Lipgloss applies aligning on the string as given to it, and ascii art
usually contain left whitespaces to align things.
This adds an option to trim space on all lines of the input, before
giving it to lipgloss, so aligning use only non-whitespace content.
Instead of needing to run the commands manually in main.go, we can implement the `Run(...) error` method to satisfy the command interface so that `kong` can Run our commands for us.
This commit uses the embedded style struct for styling in all components. The most notable example is `gum write` where there are many styles that are used and composed for each component of the command.
Style provides a shell script interface for Lip Gloss. It allows you to
use Lip Gloss to style text without needing to use Go. All of the
styling options are available as flags.
Let's make some text glamorous using bash:
```
gum style \
--foreground "#FF06B7" --border "double" \
--margin 2 --padding "2 4" --width 50 \
"And oh gosh, how delicious the fabulous frizzy frobscottle" \
"was! It was sweet and refreshing. It tasted of vanilla and" \
"cream, with just the faintest trace of raspberries on the" \
"edge of the flavour. And the bubbles were wonderful."
```
Output:
```
╔══════════════════════════════════════════════════╗
║ ║
║ ║
║ And oh gosh, how delicious the fabulous ║
║ frizzy frobscottle was It was sweet and ║
║ refreshing. It tasted of vanilla and ║
║ cream, with just the faintest trace of ║
║ raspberries on the edge of the flavour. ║
║ And the bubbles were wonderful. ║
║ ║
║ ║
╚══════════════════════════════════════════════════╝
```