flexablelib-components 3.7.6__tar.gz → 3.7.7__tar.gz

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.
Files changed (22) hide show
  1. {flexablelib_components-3.7.6/flexablelib_components.egg-info → flexablelib_components-3.7.7}/PKG-INFO +3 -3
  2. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7}/flexablelib_components/__init__.py +1 -1
  3. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7}/flexablelib_components/navigation.py +9 -3
  4. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7/flexablelib_components.egg-info}/PKG-INFO +3 -3
  5. flexablelib_components-3.7.7/flexablelib_components.egg-info/requires.txt +2 -0
  6. flexablelib_components-3.7.6/flexablelib_components.egg-info/requires.txt +0 -2
  7. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7}/LICENSE +0 -0
  8. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7}/MANIFEST.in +0 -0
  9. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7}/README.md +0 -0
  10. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7}/flexablelib_components/base.py +0 -0
  11. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7}/flexablelib_components/data.py +0 -0
  12. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7}/flexablelib_components/dates.py +0 -0
  13. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7}/flexablelib_components/display.py +0 -0
  14. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7}/flexablelib_components/inputs.py +0 -0
  15. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7}/flexablelib_components/media.py +0 -0
  16. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7}/flexablelib_components/overlays.py +0 -0
  17. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7}/flexablelib_components/py.typed +0 -0
  18. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7}/flexablelib_components.egg-info/SOURCES.txt +0 -0
  19. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7}/flexablelib_components.egg-info/dependency_links.txt +0 -0
  20. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7}/flexablelib_components.egg-info/top_level.txt +0 -0
  21. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7}/setup.cfg +0 -0
  22. {flexablelib_components-3.7.6 → flexablelib_components-3.7.7}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flexablelib-components
3
- Version: 3.7.6
3
+ Version: 3.7.7
4
4
  Summary: Interactive terminal components for flexablelib: inputs, dates, tables, forms, menus, tabs, dialogs and more.
5
5
  Home-page: https://github.com/Opus-Perpetuus/flexablelib
6
6
  Author: Benjamin Ramirez
@@ -17,8 +17,8 @@ Classifier: Topic :: Software Development :: User Interfaces
17
17
  Requires-Python: >=3.8
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: LICENSE
20
- Requires-Dist: flexablelib>=3.7.6
21
- Requires-Dist: flexablelib-tui>=3.7.6
20
+ Requires-Dist: flexablelib>=3.7.7
21
+ Requires-Dist: flexablelib-tui>=3.7.7
22
22
  Dynamic: author
23
23
  Dynamic: author-email
24
24
  Dynamic: classifier
@@ -18,7 +18,7 @@ keys to the focused component) and also renders on its own with
18
18
  ``render(width)``. See docs/COMPONENTS.md.
19
19
  """
20
20
 
21
- __version__ = '3.7.6'
21
+ __version__ = '3.7.7'
22
22
 
23
23
  from .base import Theme, DEFAULT_THEME, Input, Box, Button, frame
24
24
  from .inputs import (TextInput, PasswordInput, NumberInput, ExpressionInput,
@@ -6,7 +6,8 @@ the application shell that wires them together.
6
6
  """
7
7
 
8
8
  from flexablelib import _frames as _fx
9
- from flexablelib.layout import _accepts_height, _natural_width, _render_child
9
+ from flexablelib.layout import (_accepts_height, _natural_width, _one_line,
10
+ _render_child)
10
11
 
11
12
  from flexablelib_tui import Key
12
13
 
@@ -1752,8 +1753,13 @@ class GridView(_Themed):
1752
1753
 
1753
1754
  def draw(self, width, height):
1754
1755
  out = []
1755
- if self.title:
1756
- out.append(self.paint(self.title, 'bold'))
1756
+ if self.title and (height is None or height > 1):
1757
+ # One line no wider than the grid: a newline or a long title
1758
+ # would push the stack past its height or width.
1759
+ title = _one_line(self.title)
1760
+ if _fx.visible_width(title) > width:
1761
+ title = _fx.truncate(title, max(1, width), '\u2026')
1762
+ out.append(self.paint(title, 'bold'))
1757
1763
  room = None if height is None else max(1, height - len(out))
1758
1764
  grid = self.grid()
1759
1765
  text = grid.render(width=width, height=room) if room else \
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flexablelib-components
3
- Version: 3.7.6
3
+ Version: 3.7.7
4
4
  Summary: Interactive terminal components for flexablelib: inputs, dates, tables, forms, menus, tabs, dialogs and more.
5
5
  Home-page: https://github.com/Opus-Perpetuus/flexablelib
6
6
  Author: Benjamin Ramirez
@@ -17,8 +17,8 @@ Classifier: Topic :: Software Development :: User Interfaces
17
17
  Requires-Python: >=3.8
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: LICENSE
20
- Requires-Dist: flexablelib>=3.7.6
21
- Requires-Dist: flexablelib-tui>=3.7.6
20
+ Requires-Dist: flexablelib>=3.7.7
21
+ Requires-Dist: flexablelib-tui>=3.7.7
22
22
  Dynamic: author
23
23
  Dynamic: author-email
24
24
  Dynamic: classifier
@@ -0,0 +1,2 @@
1
+ flexablelib>=3.7.7
2
+ flexablelib-tui>=3.7.7
@@ -1,2 +0,0 @@
1
- flexablelib>=3.7.6
2
- flexablelib-tui>=3.7.6