FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
pythonnative/src/pythonnative/components/__init__.py at v0.43.1 · pythonnative/pythonnative · GitHub
pythonnative
pythonnative
Repository navigation
Code
Issues
11
(11)
Pull requests
4
(4)
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
pythonnative
/
src
/
pythonnative
/
components
/
__init__.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
108 lines (100 loc) · 2.68 KB
Breadcrumbs
pythonnative
/
src
/
pythonnative
/
components
/
__init__.py
Copy path
File metadata and controls
108 lines (100 loc) · 2.68 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
"""Built-in element factories.
Each factory function (``Text``, ``Button``, …) is a fully-typed thin
wrapper that builds an [`Element`][pythonnative.Element] through the
shared ``_make_element`` helper, so style resolution, ``ref``
attachment, ``None``-default dropping, and forced overrides (e.g.
``Column``'s fixed ``flex_direction``) live in exactly one place. The
factory signatures themselves are the canonical prop schemas: editors
and type checkers validate calls directly against them.
The factories are grouped by concern into submodules (``text``,
``media``, ``controls``, ``layout``, ``pressable``, ``overlays``,
``structural``, ``lists``); everything public is re-exported here, so
``from pythonnative.components import Text`` keeps working.
Example:
```python
import pythonnative as pn
pn.Column(
pn.Text("Hello", style=pn.style(font_size=18)),
pn.Button("Tap", on_press=lambda: print("tapped")),
style=pn.style(spacing=12, padding=16),
)
```
"""
from
.
_base
import
_SPAN_STYLE_KEYS
,
_flatten_text_spans
,
_make_element
# noqa: F401
from
.
controls
import
(
ActivityIndicator
,
Checkbox
,
DatePicker
,
Picker
,
ProgressBar
,
RefreshControl
,
SegmentedControl
,
Slider
,
StatusBar
,
Switch
,
)
from
.
layout
import
(
# noqa: F401
_SAFE_AREA_EDGES
,
Column
,
KeyboardAvoidingView
,
Row
,
SafeAreaView
,
ScrollView
,
Spacer
,
View
,
_KeyboardAvoidingContainer
,
_numeric_edge_padding
,
_SafeAreaContainer
,
)
from
.
lists
import
(
# noqa: F401
_DEFAULT_ROW_EXTENT
,
FlatList
,
ListController
,
SectionList
,
_NativeList
,
_RowSpec
,
)
from
.
media
import
Image
,
ImageBackground
,
WebView
from
.
overlays
import
Modal
,
Portal
from
.
pressable
import
Pressable
,
TouchableOpacity
,
_StatefulPressable
# noqa: F401
from
.
structural
import
ErrorBoundary
,
Fragment
,
Suspense
from
.
text
import
Button
,
Text
,
TextInput
__all__
=
[
"ActivityIndicator"
,
"Button"
,
"Checkbox"
,
"Column"
,
"DatePicker"
,
"ErrorBoundary"
,
"FlatList"
,
"Fragment"
,
"Image"
,
"ImageBackground"
,
"KeyboardAvoidingView"
,
"ListController"
,
"Modal"
,
"Picker"
,
"Portal"
,
"Pressable"
,
"ProgressBar"
,
"RefreshControl"
,
"Row"
,
"SafeAreaView"
,
"ScrollView"
,
"SectionList"
,
"SegmentedControl"
,
"Slider"
,
"Spacer"
,
"StatusBar"
,
"Suspense"
,
"Switch"
,
"Text"
,
"TextInput"
,
"TouchableOpacity"
,
"View"
,
"WebView"
,
]
# Factories are the single source for Python signatures and native contracts.
from
..
sdk
.
builtins
import
install
as
_install_native_contracts
_install_native_contracts
(
globals
())
del
_install_native_contracts
Back
|
FazBrowse Home
|
New Git URL