* fix: border size getters when implicit borders are present
When a border style is set and no borders have been explicitly enabled
or disabled, a border is implicitly applied to all sides of the
block. Prior to this fix border size getters would incorrectly return
0 when an implicit border is set. This revision corrects that behavior.
* refactor: remove redundant conditional check
* Update get.go
* test: add border tests
Co-authored-by: @qualidafial
---------
Co-authored-by: bashbunni <15822994+bashbunni@users.noreply.github.com>
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>
Co-authored-by: bashbunni <bunni@bashbunni.dev>
* test(table): modify test to show bug
* fix(table): account for margin in cell height and width
* test(table): add sizing tests for margins and padding
* test(table): move TestSizing to another branch
* chore: tidy + force truecolor in test
* chore(lint): remove nil check on []string
* fix(render): strip carriage returns from strings
* test(render): add test to reproduce carriage return issues
* feat: replace \r\n with \n instead of removing \r
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>
* test(table): add test for carriage return in cell data
---------
Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>
* docs(example): rainbow string
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: rename
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* fix: update gamut
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
* chore: go mod tidy
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* refactor: change blended colours
---------
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: bashbunni <bunni@bashbunni.dev>
* test(table): show differing styles between first row and headers
* fix(table): remove overlapping indices for styling rows and headers
* test(table): remove TestTableShrink; it's fixed on another branch
* docs(table): add godoc for HeaderRow const
* fix(test): use HeaderRow for table header styling
* feat: only display rows within table height
This will remove excess rows. This does not affect the height that is
set by headers, borders, etc.
* feat: draw ellipsis for overflow
* fix: only display overflow when data exists
* fix: only display overflow when data exists
* test: define height for existing tabel unit tests
* test: add table height unit tests
* fix: handle negative available rows to render
* fix: handle height shrink with offset
* test: add table unit test
* feat: use auto table height by default
* test: remove unnecesary height from table def
* refactor(table): use … instead of ... + remove TODOs
---------
Co-authored-by: bashbunni <bunni@bashbunni.dev>
* feat: support any type for list Root func
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* feat: move tree to root
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* feat: more cleanup
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
* docs(examples): bring back tree examples
* docs(examples): add tree toggle example
* docs(examples): fix toggle tree hierarchy; as bashbunni metadata
* fix(tree): stylize whitespace when vertically joining tree elements
* docs: get started with trees
* feat: add RootStyle with example
* test: add test for RootStyle func
* docs(godoc): replace list mentions in tree package
* refactor(examples): use Root shorthand instead of tree.New where applicable
---------
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: bashbunni <bunni@bashbunni.dev>
Co-authored-by: Christian Rocha <christian@rocha.is>