streamlit-nightly 1.45.1.dev20250502__py3-none-any.whl → 1.45.1.dev20250503__py3-none-any.whl
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.
- streamlit/elements/widgets/camera_input.py +20 -0
- streamlit/elements/widgets/file_uploader.py +23 -0
- streamlit/elements/widgets/text_widgets.py +38 -0
- streamlit/proto/CameraInput_pb2.py +4 -3
- streamlit/proto/CameraInput_pb2.pyi +8 -2
- streamlit/proto/FileUploader_pb2.py +4 -3
- streamlit/proto/FileUploader_pb2.pyi +8 -2
- streamlit/proto/TextArea_pb2.py +4 -3
- streamlit/proto/TextArea_pb2.pyi +9 -2
- streamlit/proto/TextInput_pb2.py +6 -5
- streamlit/proto/TextInput_pb2.pyi +9 -2
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{ErrorOutline.esm.Cyo2PQmw.js → ErrorOutline.esm.Bi4rIKce.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.BzWzjfn-.js → FileDownload.esm.CgcfJ7jp.js} +1 -1
- streamlit/static/static/js/{FileHelper.Bq0bHIQU.js → FileHelper.DNojV8Y-.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.ChH2zw9r.js → FormClearHelper.Dj9cIjIB.js} +1 -1
- streamlit/static/static/js/{Hooks.BX4S_9SH.js → Hooks.BzFUZ6MJ.js} +1 -1
- streamlit/static/static/js/{InputInstructions.gIgCn0KU.js → InputInstructions.CYPXcx5I.js} +1 -1
- streamlit/static/static/js/{ProgressBar.CfPAxQrK.js → ProgressBar.ZaslM_lv.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.2PFuDBNw.js → RenderInPortalIfExists.BuhqVIo4.js} +1 -1
- streamlit/static/static/js/{Toolbar.Buf9GIBa.js → Toolbar.Dh9Ti0Xp.js} +1 -1
- streamlit/static/static/js/{base-input.Bm9shgk4.js → base-input.CWmg0piT.js} +1 -1
- streamlit/static/static/js/{checkbox.a7k2DcAP.js → checkbox.B55PmSuL.js} +1 -1
- streamlit/static/static/js/{createSuper.DCriRkdS.js → createSuper.B_ZYGAdZ.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.DILbTvay.js → data-grid-overlay-editor.BC3_SI0J.js} +1 -1
- streamlit/static/static/js/{downloader.HVIUsQvS.js → downloader.DCVryQ8m.js} +1 -1
- streamlit/static/static/js/{es6.20UTkPH7.js → es6.Dz_yB5z2.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.DysIhKUL.js → iframeResizer.contentWindow.BL9oGsv0.js} +1 -1
- streamlit/static/static/js/{index.B3bE5uB1.js → index.149XmMwk.js} +1 -1
- streamlit/static/static/js/{index.CWQZ6fj2.js → index.B2rrdjSM.js} +1 -1
- streamlit/static/static/js/{index.wrZNg1iJ.js → index.B4dHtLlL.js} +1 -1
- streamlit/static/static/js/{index.BFBmymos.js → index.B6Lkujkg.js} +1 -1
- streamlit/static/static/js/{index.aNlXA-L0.js → index.B71v2qvG.js} +1 -1
- streamlit/static/static/js/{index.Cufx1YWe.js → index.B8bKQXh9.js} +1 -1
- streamlit/static/static/js/{index.Dh2hRWUh.js → index.BKWZKL08.js} +5 -5
- streamlit/static/static/js/{index.C9zP89H9.js → index.BL9ZervX.js} +1 -1
- streamlit/static/static/js/{index.CcMkhkWk.js → index.BTniWQ7k.js} +1 -1
- streamlit/static/static/js/{index.Co9rIAmf.js → index.Bi2P2smS.js} +1 -1
- streamlit/static/static/js/{index.BGeguImE.js → index.Bjv3WjfL.js} +1 -1
- streamlit/static/static/js/{index.CQxpOqNH.js → index.Bkh6Uq46.js} +1 -1
- streamlit/static/static/js/{index.DZYKdc2u.js → index.Bw1GLRoJ.js} +1 -1
- streamlit/static/static/js/{index.BoUSwThS.js → index.C1Onnqgx.js} +34 -34
- streamlit/static/static/js/{index.MS-4hkiz.js → index.C5Bk4I5D.js} +1 -1
- streamlit/static/static/js/{index.DuuM3erk.js → index.C9t2WUik.js} +1 -1
- streamlit/static/static/js/{index.D_JOW5L_.js → index.CEtbVfDc.js} +1 -1
- streamlit/static/static/js/{index.C-XV9rWR.js → index.CKlQXXH5.js} +1 -1
- streamlit/static/static/js/{index.hPo8pssx.js → index.CLm1vyQL.js} +1 -1
- streamlit/static/static/js/{index.FrboqWsl.js → index.CNMeZMWE.js} +1 -1
- streamlit/static/static/js/{index.DYEXGytC.js → index.Cim9S8Ss.js} +1 -1
- streamlit/static/static/js/{index.DtUymdq4.js → index.Clgb-C0M.js} +1 -1
- streamlit/static/static/js/{index.C8opbOI3.js → index.CnBJWuqh.js} +1 -1
- streamlit/static/static/js/{index.DyoIc8Zs.js → index.CqhFhCXO.js} +1 -1
- streamlit/static/static/js/{index.nfYF_n-U.js → index.DB8lzSwd.js} +1 -1
- streamlit/static/static/js/{index.Casjy0w3.js → index.DBjodTv0.js} +1 -1
- streamlit/static/static/js/{index.Cx1FqRGB.js → index.DGQq6N06.js} +1 -1
- streamlit/static/static/js/{index.MnEfEagX.js → index.DJXE7AM9.js} +1 -1
- streamlit/static/static/js/{index._MzojgSv.js → index.DX5LBKpa.js} +1 -1
- streamlit/static/static/js/{index.D4a4MQfL.js → index.DXNwUj37.js} +1 -1
- streamlit/static/static/js/{index.B60sXnAm.js → index.Dk4s-H9g.js} +1 -1
- streamlit/static/static/js/{index.D0zXTb0m.js → index.DsUIRBrE.js} +1 -1
- streamlit/static/static/js/{index.DTDSrcrv.js → index.JBn4qgd8.js} +1 -1
- streamlit/static/static/js/{index.CSU4ypQb.js → index.ZM4hBepQ.js} +1 -1
- streamlit/static/static/js/{index.PpH65WhH.js → index.n-3bctcT.js} +1 -1
- streamlit/static/static/js/{index.Cbix_1J1.js → index.poyxGVIV.js} +1 -1
- streamlit/static/static/js/{index.BcjACxDW.js → index.xXFNtMRp.js} +1 -1
- streamlit/static/static/js/{input.Cb_tvJ_5.js → input.tN5HMxoF.js} +1 -1
- streamlit/static/static/js/{memory.gWLPmyVz.js → memory.CUqn-HRH.js} +1 -1
- streamlit/static/static/js/{mergeWith.DyYsO7xJ.js → mergeWith.DerBQcY2.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.atsI6tTt.js → number-overlay-editor.BU-PumD0.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.k2Tjz93L.js → possibleConstructorReturn.BqXvihmp.js} +1 -1
- streamlit/static/static/js/{sandbox.DZ5kjuSJ.js → sandbox.DEPmvMZ8.js} +1 -1
- streamlit/static/static/js/{textarea.Bd_m3MJ1.js → textarea.DTRZkwAk.js} +1 -1
- streamlit/static/static/js/{timepicker.CrYAvpIP.js → timepicker.BkL0oPvT.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.DTRRsITN.js → toConsumableArray.DtI7t_Vr.js} +1 -1
- streamlit/static/static/js/{uniqueId.Cp20OGew.js → uniqueId.CBIMIugU.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.CkEGHpKC.js → useBasicWidgetState.CBoFkKUi.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.Dnb1JE6q.js → useOnInputChange.B59UtP7h.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.C60s7JiX.js → withFullScreenWrapper.BaWUpTVz.js} +1 -1
- {streamlit_nightly-1.45.1.dev20250502.dist-info → streamlit_nightly-1.45.1.dev20250503.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.45.1.dev20250502.dist-info → streamlit_nightly-1.45.1.dev20250503.dist-info}/RECORD +84 -84
- {streamlit_nightly-1.45.1.dev20250502.dist-info → streamlit_nightly-1.45.1.dev20250503.dist-info}/WHEEL +1 -1
- {streamlit_nightly-1.45.1.dev20250502.data → streamlit_nightly-1.45.1.dev20250503.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.45.1.dev20250502.dist-info → streamlit_nightly-1.45.1.dev20250503.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.45.1.dev20250502.dist-info → streamlit_nightly-1.45.1.dev20250503.dist-info}/top_level.txt +0 -0
@@ -22,6 +22,7 @@ from typing_extensions import TypeAlias
|
|
22
22
|
|
23
23
|
from streamlit.elements.lib.file_uploader_utils import enforce_filename_restriction
|
24
24
|
from streamlit.elements.lib.form_utils import current_form_id
|
25
|
+
from streamlit.elements.lib.layout_utils import validate_width
|
25
26
|
from streamlit.elements.lib.policies import (
|
26
27
|
check_widget_policies,
|
27
28
|
maybe_raise_label_warnings,
|
@@ -37,6 +38,7 @@ from streamlit.elements.widgets.file_uploader import _get_upload_files
|
|
37
38
|
from streamlit.proto.CameraInput_pb2 import CameraInput as CameraInputProto
|
38
39
|
from streamlit.proto.Common_pb2 import FileUploaderState as FileUploaderStateProto
|
39
40
|
from streamlit.proto.Common_pb2 import UploadedFileInfo as UploadedFileInfoProto
|
41
|
+
from streamlit.proto.WidthConfig_pb2 import WidthConfig
|
40
42
|
from streamlit.runtime.metrics_util import gather_metrics
|
41
43
|
from streamlit.runtime.scriptrunner import ScriptRunContext, get_script_run_ctx
|
42
44
|
from streamlit.runtime.state import (
|
@@ -49,6 +51,7 @@ from streamlit.runtime.uploaded_file_manager import DeletedFile, UploadedFile
|
|
49
51
|
|
50
52
|
if TYPE_CHECKING:
|
51
53
|
from streamlit.delta_generator import DeltaGenerator
|
54
|
+
from streamlit.elements.lib.layout_utils import WidthWithoutContent
|
52
55
|
|
53
56
|
SomeUploadedSnapshotFile: TypeAlias = Union[UploadedFile, DeletedFile, None]
|
54
57
|
|
@@ -98,6 +101,7 @@ class CameraInputMixin:
|
|
98
101
|
*, # keyword-only arguments:
|
99
102
|
disabled: bool = False,
|
100
103
|
label_visibility: LabelVisibility = "visible",
|
104
|
+
width: WidthWithoutContent = "stretch",
|
101
105
|
) -> UploadedFile | None:
|
102
106
|
r"""Display a widget that returns pictures from the user's webcam.
|
103
107
|
|
@@ -159,6 +163,11 @@ class CameraInputMixin:
|
|
159
163
|
label, which can help keep the widget alligned with other widgets.
|
160
164
|
If this is ``"collapsed"``, Streamlit displays no label or spacer.
|
161
165
|
|
166
|
+
width : "stretch" or int
|
167
|
+
The width of the camera input widget. If "stretch" (default), the widget
|
168
|
+
will take up the full width of its container. If an integer, the width
|
169
|
+
will be set to that number of pixels.
|
170
|
+
|
162
171
|
Returns
|
163
172
|
-------
|
164
173
|
None or UploadedFile
|
@@ -191,6 +200,7 @@ class CameraInputMixin:
|
|
191
200
|
kwargs=kwargs,
|
192
201
|
disabled=disabled,
|
193
202
|
label_visibility=label_visibility,
|
203
|
+
width=width,
|
194
204
|
ctx=ctx,
|
195
205
|
)
|
196
206
|
|
@@ -205,6 +215,7 @@ class CameraInputMixin:
|
|
205
215
|
*, # keyword-only arguments:
|
206
216
|
disabled: bool = False,
|
207
217
|
label_visibility: LabelVisibility = "visible",
|
218
|
+
width: WidthWithoutContent = "stretch",
|
208
219
|
ctx: ScriptRunContext | None = None,
|
209
220
|
) -> UploadedFile | None:
|
210
221
|
key = to_key(key)
|
@@ -224,6 +235,7 @@ class CameraInputMixin:
|
|
224
235
|
form_id=current_form_id(self.dg),
|
225
236
|
label=label,
|
226
237
|
help=help,
|
238
|
+
width=width,
|
227
239
|
)
|
228
240
|
|
229
241
|
camera_input_proto = CameraInputProto()
|
@@ -238,6 +250,14 @@ class CameraInputMixin:
|
|
238
250
|
if help is not None:
|
239
251
|
camera_input_proto.help = dedent(help)
|
240
252
|
|
253
|
+
validate_width(width)
|
254
|
+
width_config = WidthConfig()
|
255
|
+
if isinstance(width, int):
|
256
|
+
width_config.pixel_width = width
|
257
|
+
else:
|
258
|
+
width_config.use_stretch = True
|
259
|
+
camera_input_proto.width_config.CopyFrom(width_config)
|
260
|
+
|
241
261
|
serde = CameraInputSerde()
|
242
262
|
|
243
263
|
camera_input_state = register_widget(
|
@@ -26,6 +26,7 @@ from streamlit.elements.lib.file_uploader_utils import (
|
|
26
26
|
normalize_upload_file_type,
|
27
27
|
)
|
28
28
|
from streamlit.elements.lib.form_utils import current_form_id
|
29
|
+
from streamlit.elements.lib.layout_utils import WidthWithoutContent, validate_width
|
29
30
|
from streamlit.elements.lib.policies import (
|
30
31
|
check_widget_policies,
|
31
32
|
maybe_raise_label_warnings,
|
@@ -40,6 +41,7 @@ from streamlit.elements.lib.utils import (
|
|
40
41
|
from streamlit.proto.Common_pb2 import FileUploaderState as FileUploaderStateProto
|
41
42
|
from streamlit.proto.Common_pb2 import UploadedFileInfo as UploadedFileInfoProto
|
42
43
|
from streamlit.proto.FileUploader_pb2 import FileUploader as FileUploaderProto
|
44
|
+
from streamlit.proto.WidthConfig_pb2 import WidthConfig
|
43
45
|
from streamlit.runtime.metrics_util import gather_metrics
|
44
46
|
from streamlit.runtime.scriptrunner import ScriptRunContext, get_script_run_ctx
|
45
47
|
from streamlit.runtime.state import (
|
@@ -167,6 +169,7 @@ class FileUploaderMixin:
|
|
167
169
|
*,
|
168
170
|
disabled: bool = False,
|
169
171
|
label_visibility: LabelVisibility = "visible",
|
172
|
+
width: WidthWithoutContent = "stretch",
|
170
173
|
) -> list[UploadedFile] | None: ...
|
171
174
|
|
172
175
|
# 1. type is given as not a keyword-only argument
|
@@ -185,6 +188,7 @@ class FileUploaderMixin:
|
|
185
188
|
*,
|
186
189
|
disabled: bool = False,
|
187
190
|
label_visibility: LabelVisibility = "visible",
|
191
|
+
width: WidthWithoutContent = "stretch",
|
188
192
|
) -> UploadedFile | None: ...
|
189
193
|
|
190
194
|
# The following 2 overloads represent the cases where
|
@@ -208,6 +212,7 @@ class FileUploaderMixin:
|
|
208
212
|
kwargs: WidgetKwargs | None = None,
|
209
213
|
disabled: bool = False,
|
210
214
|
label_visibility: LabelVisibility = "visible",
|
215
|
+
width: WidthWithoutContent = "stretch",
|
211
216
|
) -> list[UploadedFile] | None: ...
|
212
217
|
|
213
218
|
# 1. type is skipped or a keyword argument
|
@@ -226,6 +231,7 @@ class FileUploaderMixin:
|
|
226
231
|
kwargs: WidgetKwargs | None = None,
|
227
232
|
disabled: bool = False,
|
228
233
|
label_visibility: LabelVisibility = "visible",
|
234
|
+
width: WidthWithoutContent = "stretch",
|
229
235
|
) -> UploadedFile | None: ...
|
230
236
|
|
231
237
|
@gather_metrics("file_uploader")
|
@@ -242,6 +248,7 @@ class FileUploaderMixin:
|
|
242
248
|
*, # keyword-only arguments:
|
243
249
|
disabled: bool = False,
|
244
250
|
label_visibility: LabelVisibility = "visible",
|
251
|
+
width: WidthWithoutContent = "stretch",
|
245
252
|
) -> UploadedFile | list[UploadedFile] | None:
|
246
253
|
r"""Display a file uploader widget.
|
247
254
|
By default, uploaded files are limited to 200 MB each. You can
|
@@ -326,6 +333,11 @@ class FileUploaderMixin:
|
|
326
333
|
label, which can help keep the widget alligned with other widgets.
|
327
334
|
If this is ``"collapsed"``, Streamlit displays no label or spacer.
|
328
335
|
|
336
|
+
width : "stretch" or int
|
337
|
+
The width of the file uploader widget. If "stretch" (default), the widget
|
338
|
+
will take up the full width of its container. If an integer, the width
|
339
|
+
will be set to that number of pixels.
|
340
|
+
|
329
341
|
Returns
|
330
342
|
-------
|
331
343
|
None, UploadedFile, or list of UploadedFile
|
@@ -394,6 +406,7 @@ class FileUploaderMixin:
|
|
394
406
|
kwargs=kwargs,
|
395
407
|
disabled=disabled,
|
396
408
|
label_visibility=label_visibility,
|
409
|
+
width=width,
|
397
410
|
ctx=ctx,
|
398
411
|
)
|
399
412
|
|
@@ -411,6 +424,7 @@ class FileUploaderMixin:
|
|
411
424
|
label_visibility: LabelVisibility = "visible",
|
412
425
|
disabled: bool = False,
|
413
426
|
ctx: ScriptRunContext | None = None,
|
427
|
+
width: WidthWithoutContent = "stretch",
|
414
428
|
) -> UploadedFile | list[UploadedFile] | None:
|
415
429
|
key = to_key(key)
|
416
430
|
|
@@ -431,6 +445,7 @@ class FileUploaderMixin:
|
|
431
445
|
type=type,
|
432
446
|
accept_multiple_files=accept_multiple_files,
|
433
447
|
help=help,
|
448
|
+
width=width,
|
434
449
|
)
|
435
450
|
|
436
451
|
normalized_type = normalize_upload_file_type(type) if type else None
|
@@ -470,6 +485,14 @@ class FileUploaderMixin:
|
|
470
485
|
value_type="file_uploader_state_value",
|
471
486
|
)
|
472
487
|
|
488
|
+
validate_width(width)
|
489
|
+
width_config = WidthConfig()
|
490
|
+
if isinstance(width, int):
|
491
|
+
width_config.pixel_width = width
|
492
|
+
else:
|
493
|
+
width_config.use_stretch = True
|
494
|
+
file_uploader_proto.width_config.CopyFrom(width_config)
|
495
|
+
|
473
496
|
self.dg._enqueue("file_uploader", file_uploader_proto)
|
474
497
|
|
475
498
|
if isinstance(widget_state.value, DeletedFile):
|
@@ -19,6 +19,7 @@ from textwrap import dedent
|
|
19
19
|
from typing import TYPE_CHECKING, Literal, cast, overload
|
20
20
|
|
21
21
|
from streamlit.elements.lib.form_utils import current_form_id
|
22
|
+
from streamlit.elements.lib.layout_utils import WidthWithoutContent, validate_width
|
22
23
|
from streamlit.elements.lib.policies import (
|
23
24
|
check_widget_policies,
|
24
25
|
maybe_raise_label_warnings,
|
@@ -33,6 +34,7 @@ from streamlit.elements.lib.utils import (
|
|
33
34
|
from streamlit.errors import StreamlitAPIException
|
34
35
|
from streamlit.proto.TextArea_pb2 import TextArea as TextAreaProto
|
35
36
|
from streamlit.proto.TextInput_pb2 import TextInput as TextInputProto
|
37
|
+
from streamlit.proto.WidthConfig_pb2 import WidthConfig
|
36
38
|
from streamlit.runtime.metrics_util import gather_metrics
|
37
39
|
from streamlit.runtime.scriptrunner import ScriptRunContext, get_script_run_ctx
|
38
40
|
from streamlit.runtime.state import (
|
@@ -91,6 +93,7 @@ class TextWidgetsMixin:
|
|
91
93
|
disabled: bool = False,
|
92
94
|
label_visibility: LabelVisibility = "visible",
|
93
95
|
icon: str | None = None,
|
96
|
+
width: WidthWithoutContent = "stretch",
|
94
97
|
) -> str:
|
95
98
|
pass
|
96
99
|
|
@@ -112,6 +115,7 @@ class TextWidgetsMixin:
|
|
112
115
|
disabled: bool = False,
|
113
116
|
label_visibility: LabelVisibility = "visible",
|
114
117
|
icon: str | None = None,
|
118
|
+
width: WidthWithoutContent = "stretch",
|
115
119
|
) -> str | None:
|
116
120
|
pass
|
117
121
|
|
@@ -133,6 +137,7 @@ class TextWidgetsMixin:
|
|
133
137
|
disabled: bool = False,
|
134
138
|
label_visibility: LabelVisibility = "visible",
|
135
139
|
icon: str | None = None,
|
140
|
+
width: WidthWithoutContent = "stretch",
|
136
141
|
) -> str | None:
|
137
142
|
r"""Display a single-line text input widget.
|
138
143
|
|
@@ -233,6 +238,9 @@ class TextWidgetsMixin:
|
|
233
238
|
<https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=Rounded>`_
|
234
239
|
font library.
|
235
240
|
|
241
|
+
width : WidthWithoutContent
|
242
|
+
The width of the text input. Defaults to "stretch".
|
243
|
+
|
236
244
|
Returns
|
237
245
|
-------
|
238
246
|
str or None
|
@@ -267,6 +275,7 @@ class TextWidgetsMixin:
|
|
267
275
|
disabled=disabled,
|
268
276
|
label_visibility=label_visibility,
|
269
277
|
icon=icon,
|
278
|
+
width=width,
|
270
279
|
ctx=ctx,
|
271
280
|
)
|
272
281
|
|
@@ -287,6 +296,7 @@ class TextWidgetsMixin:
|
|
287
296
|
disabled: bool = False,
|
288
297
|
label_visibility: LabelVisibility = "visible",
|
289
298
|
icon: str | None = None,
|
299
|
+
width: WidthWithoutContent = "stretch",
|
290
300
|
ctx: ScriptRunContext | None = None,
|
291
301
|
) -> str | None:
|
292
302
|
key = to_key(key)
|
@@ -298,6 +308,7 @@ class TextWidgetsMixin:
|
|
298
308
|
default_value=None if value == "" else value,
|
299
309
|
)
|
300
310
|
maybe_raise_label_warnings(label, label_visibility)
|
311
|
+
validate_width(width)
|
301
312
|
|
302
313
|
# Make sure value is always string or None:
|
303
314
|
value = str(value) if value is not None else None
|
@@ -314,6 +325,7 @@ class TextWidgetsMixin:
|
|
314
325
|
autocomplete=autocomplete,
|
315
326
|
placeholder=str(placeholder),
|
316
327
|
icon=icon,
|
328
|
+
width=width,
|
317
329
|
)
|
318
330
|
|
319
331
|
session_state = get_session_state().filtered_state
|
@@ -343,6 +355,14 @@ class TextWidgetsMixin:
|
|
343
355
|
if icon is not None:
|
344
356
|
text_input_proto.icon = validate_icon_or_emoji(icon)
|
345
357
|
|
358
|
+
# Set up width configuration
|
359
|
+
width_config = WidthConfig()
|
360
|
+
if isinstance(width, int):
|
361
|
+
width_config.pixel_width = width
|
362
|
+
else:
|
363
|
+
width_config.use_stretch = True
|
364
|
+
text_input_proto.width_config.CopyFrom(width_config)
|
365
|
+
|
346
366
|
if type == "default":
|
347
367
|
text_input_proto.type = TextInputProto.DEFAULT
|
348
368
|
elif type == "password":
|
@@ -396,6 +416,7 @@ class TextWidgetsMixin:
|
|
396
416
|
placeholder: str | None = None,
|
397
417
|
disabled: bool = False,
|
398
418
|
label_visibility: LabelVisibility = "visible",
|
419
|
+
width: WidthWithoutContent = "stretch",
|
399
420
|
) -> str:
|
400
421
|
pass
|
401
422
|
|
@@ -415,6 +436,7 @@ class TextWidgetsMixin:
|
|
415
436
|
placeholder: str | None = None,
|
416
437
|
disabled: bool = False,
|
417
438
|
label_visibility: LabelVisibility = "visible",
|
439
|
+
width: WidthWithoutContent = "stretch",
|
418
440
|
) -> str | None:
|
419
441
|
pass
|
420
442
|
|
@@ -434,6 +456,7 @@ class TextWidgetsMixin:
|
|
434
456
|
placeholder: str | None = None,
|
435
457
|
disabled: bool = False,
|
436
458
|
label_visibility: LabelVisibility = "visible",
|
459
|
+
width: WidthWithoutContent = "stretch",
|
437
460
|
) -> str | None:
|
438
461
|
r"""Display a multi-line text input widget.
|
439
462
|
|
@@ -511,6 +534,9 @@ class TextWidgetsMixin:
|
|
511
534
|
label, which can help keep the widget alligned with other widgets.
|
512
535
|
If this is ``"collapsed"``, Streamlit displays no label or spacer.
|
513
536
|
|
537
|
+
width : WidthWithoutContent
|
538
|
+
The width of the text area. Defaults to "stretch".
|
539
|
+
|
514
540
|
Returns
|
515
541
|
-------
|
516
542
|
str or None
|
@@ -557,6 +583,7 @@ class TextWidgetsMixin:
|
|
557
583
|
placeholder=placeholder,
|
558
584
|
disabled=disabled,
|
559
585
|
label_visibility=label_visibility,
|
586
|
+
width=width,
|
560
587
|
ctx=ctx,
|
561
588
|
)
|
562
589
|
|
@@ -575,6 +602,7 @@ class TextWidgetsMixin:
|
|
575
602
|
placeholder: str | None = None,
|
576
603
|
disabled: bool = False,
|
577
604
|
label_visibility: LabelVisibility = "visible",
|
605
|
+
width: WidthWithoutContent = "stretch",
|
578
606
|
ctx: ScriptRunContext | None = None,
|
579
607
|
) -> str | None:
|
580
608
|
key = to_key(key)
|
@@ -586,6 +614,7 @@ class TextWidgetsMixin:
|
|
586
614
|
default_value=None if value == "" else value,
|
587
615
|
)
|
588
616
|
maybe_raise_label_warnings(label, label_visibility)
|
617
|
+
validate_width(width)
|
589
618
|
|
590
619
|
value = str(value) if value is not None else None
|
591
620
|
|
@@ -599,6 +628,7 @@ class TextWidgetsMixin:
|
|
599
628
|
max_chars=max_chars,
|
600
629
|
help=help,
|
601
630
|
placeholder=str(placeholder),
|
631
|
+
width=width,
|
602
632
|
)
|
603
633
|
|
604
634
|
session_state = get_session_state().filtered_state
|
@@ -628,6 +658,14 @@ class TextWidgetsMixin:
|
|
628
658
|
if placeholder is not None:
|
629
659
|
text_area_proto.placeholder = str(placeholder)
|
630
660
|
|
661
|
+
# Set up width configuration
|
662
|
+
width_config = WidthConfig()
|
663
|
+
if isinstance(width, int):
|
664
|
+
width_config.pixel_width = width
|
665
|
+
else:
|
666
|
+
width_config.use_stretch = True
|
667
|
+
text_area_proto.width_config.CopyFrom(width_config)
|
668
|
+
|
631
669
|
serde = TextAreaSerde(value)
|
632
670
|
widget_state = register_widget(
|
633
671
|
text_area_proto.id,
|
@@ -13,9 +13,10 @@ _sym_db = _symbol_database.Default()
|
|
13
13
|
|
14
14
|
|
15
15
|
from streamlit.proto import LabelVisibilityMessage_pb2 as streamlit_dot_proto_dot_LabelVisibilityMessage__pb2
|
16
|
+
from streamlit.proto import WidthConfig_pb2 as streamlit_dot_proto_dot_WidthConfig__pb2
|
16
17
|
|
17
18
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!streamlit/proto/CameraInput.proto\x1a,streamlit/proto/LabelVisibilityMessage.proto\"\
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!streamlit/proto/CameraInput.proto\x1a,streamlit/proto/LabelVisibilityMessage.proto\x1a!streamlit/proto/WidthConfig.proto\"\xd0\x01\n\x0b\x43\x61meraInput\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12\x0c\n\x04help\x18\x03 \x01(\t\x12\x0f\n\x07\x66orm_id\x18\x04 \x01(\t\x12\x10\n\x08\x64isabled\x18\x05 \x01(\x08\x12\x31\n\x10label_visibility\x18\x06 \x01(\x0b\x32\x17.LabelVisibilityMessage\x12\x31\n\x0cwidth_config\x18\x07 \x01(\x0b\x32\x16.streamlit.WidthConfigH\x00\x88\x01\x01\x42\x0f\n\r_width_configB0\n\x1c\x63om.snowflake.apps.streamlitB\x10\x43\x61meraInputProtob\x06proto3')
|
19
20
|
|
20
21
|
_globals = globals()
|
21
22
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -23,6 +24,6 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.CameraInput
|
|
23
24
|
if not _descriptor._USE_C_DESCRIPTORS:
|
24
25
|
_globals['DESCRIPTOR']._loaded_options = None
|
25
26
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\020CameraInputProto'
|
26
|
-
_globals['_CAMERAINPUT']._serialized_start=
|
27
|
-
_globals['_CAMERAINPUT']._serialized_end=
|
27
|
+
_globals['_CAMERAINPUT']._serialized_start=119
|
28
|
+
_globals['_CAMERAINPUT']._serialized_end=327
|
28
29
|
# @@protoc_insertion_point(module_scope)
|
@@ -21,6 +21,7 @@ import builtins
|
|
21
21
|
import google.protobuf.descriptor
|
22
22
|
import google.protobuf.message
|
23
23
|
import streamlit.proto.LabelVisibilityMessage_pb2
|
24
|
+
import streamlit.proto.WidthConfig_pb2
|
24
25
|
import typing
|
25
26
|
|
26
27
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
@@ -35,6 +36,7 @@ class CameraInput(google.protobuf.message.Message):
|
|
35
36
|
FORM_ID_FIELD_NUMBER: builtins.int
|
36
37
|
DISABLED_FIELD_NUMBER: builtins.int
|
37
38
|
LABEL_VISIBILITY_FIELD_NUMBER: builtins.int
|
39
|
+
WIDTH_CONFIG_FIELD_NUMBER: builtins.int
|
38
40
|
id: builtins.str
|
39
41
|
label: builtins.str
|
40
42
|
help: builtins.str
|
@@ -42,6 +44,8 @@ class CameraInput(google.protobuf.message.Message):
|
|
42
44
|
disabled: builtins.bool
|
43
45
|
@property
|
44
46
|
def label_visibility(self) -> streamlit.proto.LabelVisibilityMessage_pb2.LabelVisibilityMessage: ...
|
47
|
+
@property
|
48
|
+
def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig: ...
|
45
49
|
def __init__(
|
46
50
|
self,
|
47
51
|
*,
|
@@ -51,8 +55,10 @@ class CameraInput(google.protobuf.message.Message):
|
|
51
55
|
form_id: builtins.str = ...,
|
52
56
|
disabled: builtins.bool = ...,
|
53
57
|
label_visibility: streamlit.proto.LabelVisibilityMessage_pb2.LabelVisibilityMessage | None = ...,
|
58
|
+
width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
|
54
59
|
) -> None: ...
|
55
|
-
def HasField(self, field_name: typing.Literal["label_visibility", b"label_visibility"]) -> builtins.bool: ...
|
56
|
-
def ClearField(self, field_name: typing.Literal["disabled", b"disabled", "form_id", b"form_id", "help", b"help", "id", b"id", "label", b"label", "label_visibility", b"label_visibility"]) -> None: ...
|
60
|
+
def HasField(self, field_name: typing.Literal["_width_config", b"_width_config", "label_visibility", b"label_visibility", "width_config", b"width_config"]) -> builtins.bool: ...
|
61
|
+
def ClearField(self, field_name: typing.Literal["_width_config", b"_width_config", "disabled", b"disabled", "form_id", b"form_id", "help", b"help", "id", b"id", "label", b"label", "label_visibility", b"label_visibility", "width_config", b"width_config"]) -> None: ...
|
62
|
+
def WhichOneof(self, oneof_group: typing.Literal["_width_config", b"_width_config"]) -> typing.Literal["width_config"] | None: ...
|
57
63
|
|
58
64
|
global___CameraInput = CameraInput
|
@@ -13,9 +13,10 @@ _sym_db = _symbol_database.Default()
|
|
13
13
|
|
14
14
|
|
15
15
|
from streamlit.proto import LabelVisibilityMessage_pb2 as streamlit_dot_proto_dot_LabelVisibilityMessage__pb2
|
16
|
+
from streamlit.proto import WidthConfig_pb2 as streamlit_dot_proto_dot_WidthConfig__pb2
|
16
17
|
|
17
18
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"streamlit/proto/FileUploader.proto\x1a,streamlit/proto/LabelVisibilityMessage.proto\"\
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\"streamlit/proto/FileUploader.proto\x1a,streamlit/proto/LabelVisibilityMessage.proto\x1a!streamlit/proto/WidthConfig.proto\"\x99\x02\n\x0c\x46ileUploader\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x03(\t\x12\x1a\n\x12max_upload_size_mb\x18\x04 \x01(\x05\x12\x16\n\x0emultiple_files\x18\x06 \x01(\x08\x12\x0c\n\x04help\x18\x07 \x01(\t\x12\x0f\n\x07\x66orm_id\x18\x08 \x01(\t\x12\x10\n\x08\x64isabled\x18\t \x01(\x08\x12\x31\n\x10label_visibility\x18\n \x01(\x0b\x32\x17.LabelVisibilityMessage\x12\x31\n\x0cwidth_config\x18\x0b \x01(\x0b\x32\x16.streamlit.WidthConfigH\x00\x88\x01\x01\x42\x0f\n\r_width_configJ\x04\x08\x05\x10\x06\x42\x31\n\x1c\x63om.snowflake.apps.streamlitB\x11\x46ileUploaderProtob\x06proto3')
|
19
20
|
|
20
21
|
_globals = globals()
|
21
22
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -23,6 +24,6 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.FileUploade
|
|
23
24
|
if not _descriptor._USE_C_DESCRIPTORS:
|
24
25
|
_globals['DESCRIPTOR']._loaded_options = None
|
25
26
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\021FileUploaderProto'
|
26
|
-
_globals['_FILEUPLOADER']._serialized_start=
|
27
|
-
_globals['_FILEUPLOADER']._serialized_end=
|
27
|
+
_globals['_FILEUPLOADER']._serialized_start=120
|
28
|
+
_globals['_FILEUPLOADER']._serialized_end=401
|
28
29
|
# @@protoc_insertion_point(module_scope)
|
@@ -23,6 +23,7 @@ import google.protobuf.descriptor
|
|
23
23
|
import google.protobuf.internal.containers
|
24
24
|
import google.protobuf.message
|
25
25
|
import streamlit.proto.LabelVisibilityMessage_pb2
|
26
|
+
import streamlit.proto.WidthConfig_pb2
|
26
27
|
import typing
|
27
28
|
|
28
29
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
@@ -42,6 +43,7 @@ class FileUploader(google.protobuf.message.Message):
|
|
42
43
|
FORM_ID_FIELD_NUMBER: builtins.int
|
43
44
|
DISABLED_FIELD_NUMBER: builtins.int
|
44
45
|
LABEL_VISIBILITY_FIELD_NUMBER: builtins.int
|
46
|
+
WIDTH_CONFIG_FIELD_NUMBER: builtins.int
|
45
47
|
id: builtins.str
|
46
48
|
"""The widget id"""
|
47
49
|
label: builtins.str
|
@@ -59,6 +61,8 @@ class FileUploader(google.protobuf.message.Message):
|
|
59
61
|
|
60
62
|
@property
|
61
63
|
def label_visibility(self) -> streamlit.proto.LabelVisibilityMessage_pb2.LabelVisibilityMessage: ...
|
64
|
+
@property
|
65
|
+
def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig: ...
|
62
66
|
def __init__(
|
63
67
|
self,
|
64
68
|
*,
|
@@ -71,8 +75,10 @@ class FileUploader(google.protobuf.message.Message):
|
|
71
75
|
form_id: builtins.str = ...,
|
72
76
|
disabled: builtins.bool = ...,
|
73
77
|
label_visibility: streamlit.proto.LabelVisibilityMessage_pb2.LabelVisibilityMessage | None = ...,
|
78
|
+
width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
|
74
79
|
) -> None: ...
|
75
|
-
def HasField(self, field_name: typing.Literal["label_visibility", b"label_visibility"]) -> builtins.bool: ...
|
76
|
-
def ClearField(self, field_name: typing.Literal["disabled", b"disabled", "form_id", b"form_id", "help", b"help", "id", b"id", "label", b"label", "label_visibility", b"label_visibility", "max_upload_size_mb", b"max_upload_size_mb", "multiple_files", b"multiple_files", "type", b"type"]) -> None: ...
|
80
|
+
def HasField(self, field_name: typing.Literal["_width_config", b"_width_config", "label_visibility", b"label_visibility", "width_config", b"width_config"]) -> builtins.bool: ...
|
81
|
+
def ClearField(self, field_name: typing.Literal["_width_config", b"_width_config", "disabled", b"disabled", "form_id", b"form_id", "help", b"help", "id", b"id", "label", b"label", "label_visibility", b"label_visibility", "max_upload_size_mb", b"max_upload_size_mb", "multiple_files", b"multiple_files", "type", b"type", "width_config", b"width_config"]) -> None: ...
|
82
|
+
def WhichOneof(self, oneof_group: typing.Literal["_width_config", b"_width_config"]) -> typing.Literal["width_config"] | None: ...
|
77
83
|
|
78
84
|
global___FileUploader = FileUploader
|
streamlit/proto/TextArea_pb2.py
CHANGED
@@ -13,9 +13,10 @@ _sym_db = _symbol_database.Default()
|
|
13
13
|
|
14
14
|
|
15
15
|
from streamlit.proto import LabelVisibilityMessage_pb2 as streamlit_dot_proto_dot_LabelVisibilityMessage__pb2
|
16
|
+
from streamlit.proto import WidthConfig_pb2 as streamlit_dot_proto_dot_WidthConfig__pb2
|
16
17
|
|
17
18
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1estreamlit/proto/TextArea.proto\x1a,streamlit/proto/LabelVisibilityMessage.proto\"\
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1estreamlit/proto/TextArea.proto\x1a,streamlit/proto/LabelVisibilityMessage.proto\x1a!streamlit/proto/WidthConfig.proto\"\xd8\x02\n\x08TextArea\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x0e\n\x06height\x18\x04 \x01(\r\x12\x11\n\tmax_chars\x18\x05 \x01(\r\x12\x0c\n\x04help\x18\x06 \x01(\t\x12\x0f\n\x07\x66orm_id\x18\x07 \x01(\t\x12\x12\n\x05value\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x11\n\tset_value\x18\t \x01(\x08\x12\x13\n\x0bplaceholder\x18\n \x01(\t\x12\x10\n\x08\x64isabled\x18\x0b \x01(\x08\x12\x31\n\x10label_visibility\x18\x0c \x01(\x0b\x32\x17.LabelVisibilityMessage\x12\x31\n\x0cwidth_config\x18\r \x01(\x0b\x32\x16.streamlit.WidthConfigH\x02\x88\x01\x01\x42\n\n\x08_defaultB\x08\n\x06_valueB\x0f\n\r_width_configB-\n\x1c\x63om.snowflake.apps.streamlitB\rTextAreaProtob\x06proto3')
|
19
20
|
|
20
21
|
_globals = globals()
|
21
22
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -23,6 +24,6 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.TextArea_pb
|
|
23
24
|
if not _descriptor._USE_C_DESCRIPTORS:
|
24
25
|
_globals['DESCRIPTOR']._loaded_options = None
|
25
26
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\rTextAreaProto'
|
26
|
-
_globals['_TEXTAREA']._serialized_start=
|
27
|
-
_globals['_TEXTAREA']._serialized_end=
|
27
|
+
_globals['_TEXTAREA']._serialized_start=116
|
28
|
+
_globals['_TEXTAREA']._serialized_end=460
|
28
29
|
# @@protoc_insertion_point(module_scope)
|
streamlit/proto/TextArea_pb2.pyi
CHANGED
@@ -21,6 +21,7 @@ import builtins
|
|
21
21
|
import google.protobuf.descriptor
|
22
22
|
import google.protobuf.message
|
23
23
|
import streamlit.proto.LabelVisibilityMessage_pb2
|
24
|
+
import streamlit.proto.WidthConfig_pb2
|
24
25
|
import typing
|
25
26
|
|
26
27
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
@@ -41,6 +42,7 @@ class TextArea(google.protobuf.message.Message):
|
|
41
42
|
PLACEHOLDER_FIELD_NUMBER: builtins.int
|
42
43
|
DISABLED_FIELD_NUMBER: builtins.int
|
43
44
|
LABEL_VISIBILITY_FIELD_NUMBER: builtins.int
|
45
|
+
WIDTH_CONFIG_FIELD_NUMBER: builtins.int
|
44
46
|
id: builtins.str
|
45
47
|
label: builtins.str
|
46
48
|
default: builtins.str
|
@@ -54,6 +56,8 @@ class TextArea(google.protobuf.message.Message):
|
|
54
56
|
disabled: builtins.bool
|
55
57
|
@property
|
56
58
|
def label_visibility(self) -> streamlit.proto.LabelVisibilityMessage_pb2.LabelVisibilityMessage: ...
|
59
|
+
@property
|
60
|
+
def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig: ...
|
57
61
|
def __init__(
|
58
62
|
self,
|
59
63
|
*,
|
@@ -69,12 +73,15 @@ class TextArea(google.protobuf.message.Message):
|
|
69
73
|
placeholder: builtins.str = ...,
|
70
74
|
disabled: builtins.bool = ...,
|
71
75
|
label_visibility: streamlit.proto.LabelVisibilityMessage_pb2.LabelVisibilityMessage | None = ...,
|
76
|
+
width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
|
72
77
|
) -> None: ...
|
73
|
-
def HasField(self, field_name: typing.Literal["_default", b"_default", "_value", b"_value", "default", b"default", "label_visibility", b"label_visibility", "value", b"value"]) -> builtins.bool: ...
|
74
|
-
def ClearField(self, field_name: typing.Literal["_default", b"_default", "_value", b"_value", "default", b"default", "disabled", b"disabled", "form_id", b"form_id", "height", b"height", "help", b"help", "id", b"id", "label", b"label", "label_visibility", b"label_visibility", "max_chars", b"max_chars", "placeholder", b"placeholder", "set_value", b"set_value", "value", b"value"]) -> None: ...
|
78
|
+
def HasField(self, field_name: typing.Literal["_default", b"_default", "_value", b"_value", "_width_config", b"_width_config", "default", b"default", "label_visibility", b"label_visibility", "value", b"value", "width_config", b"width_config"]) -> builtins.bool: ...
|
79
|
+
def ClearField(self, field_name: typing.Literal["_default", b"_default", "_value", b"_value", "_width_config", b"_width_config", "default", b"default", "disabled", b"disabled", "form_id", b"form_id", "height", b"height", "help", b"help", "id", b"id", "label", b"label", "label_visibility", b"label_visibility", "max_chars", b"max_chars", "placeholder", b"placeholder", "set_value", b"set_value", "value", b"value", "width_config", b"width_config"]) -> None: ...
|
75
80
|
@typing.overload
|
76
81
|
def WhichOneof(self, oneof_group: typing.Literal["_default", b"_default"]) -> typing.Literal["default"] | None: ...
|
77
82
|
@typing.overload
|
78
83
|
def WhichOneof(self, oneof_group: typing.Literal["_value", b"_value"]) -> typing.Literal["value"] | None: ...
|
84
|
+
@typing.overload
|
85
|
+
def WhichOneof(self, oneof_group: typing.Literal["_width_config", b"_width_config"]) -> typing.Literal["width_config"] | None: ...
|
79
86
|
|
80
87
|
global___TextArea = TextArea
|
streamlit/proto/TextInput_pb2.py
CHANGED
@@ -13,9 +13,10 @@ _sym_db = _symbol_database.Default()
|
|
13
13
|
|
14
14
|
|
15
15
|
from streamlit.proto import LabelVisibilityMessage_pb2 as streamlit_dot_proto_dot_LabelVisibilityMessage__pb2
|
16
|
+
from streamlit.proto import WidthConfig_pb2 as streamlit_dot_proto_dot_WidthConfig__pb2
|
16
17
|
|
17
18
|
|
18
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fstreamlit/proto/TextInput.proto\x1a,streamlit/proto/LabelVisibilityMessage.proto\"\
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fstreamlit/proto/TextInput.proto\x1a,streamlit/proto/LabelVisibilityMessage.proto\x1a!streamlit/proto/WidthConfig.proto\"\xaf\x03\n\tTextInput\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x04type\x18\x04 \x01(\x0e\x32\x0f.TextInput.Type\x12\x11\n\tmax_chars\x18\x05 \x01(\r\x12\x0c\n\x04help\x18\x06 \x01(\t\x12\x0f\n\x07\x66orm_id\x18\x07 \x01(\t\x12\x12\n\x05value\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x11\n\tset_value\x18\t \x01(\x08\x12\x14\n\x0c\x61utocomplete\x18\n \x01(\t\x12\x13\n\x0bplaceholder\x18\x0b \x01(\t\x12\x10\n\x08\x64isabled\x18\x0c \x01(\x08\x12\x31\n\x10label_visibility\x18\r \x01(\x0b\x32\x17.LabelVisibilityMessage\x12\x0c\n\x04icon\x18\x0e \x01(\t\x12\x31\n\x0cwidth_config\x18\x0f \x01(\x0b\x32\x16.streamlit.WidthConfigH\x02\x88\x01\x01\"!\n\x04Type\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\x0c\n\x08PASSWORD\x10\x01\x42\n\n\x08_defaultB\x08\n\x06_valueB\x0f\n\r_width_configB.\n\x1c\x63om.snowflake.apps.streamlitB\x0eTextInputProtob\x06proto3')
|
19
20
|
|
20
21
|
_globals = globals()
|
21
22
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -23,8 +24,8 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.TextInput_p
|
|
23
24
|
if not _descriptor._USE_C_DESCRIPTORS:
|
24
25
|
_globals['DESCRIPTOR']._loaded_options = None
|
25
26
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\016TextInputProto'
|
26
|
-
_globals['_TEXTINPUT']._serialized_start=
|
27
|
-
_globals['_TEXTINPUT']._serialized_end=
|
28
|
-
_globals['_TEXTINPUT_TYPE']._serialized_start=
|
29
|
-
_globals['_TEXTINPUT_TYPE']._serialized_end=
|
27
|
+
_globals['_TEXTINPUT']._serialized_start=117
|
28
|
+
_globals['_TEXTINPUT']._serialized_end=548
|
29
|
+
_globals['_TEXTINPUT_TYPE']._serialized_start=476
|
30
|
+
_globals['_TEXTINPUT_TYPE']._serialized_end=509
|
30
31
|
# @@protoc_insertion_point(module_scope)
|
@@ -22,6 +22,7 @@ import google.protobuf.descriptor
|
|
22
22
|
import google.protobuf.internal.enum_type_wrapper
|
23
23
|
import google.protobuf.message
|
24
24
|
import streamlit.proto.LabelVisibilityMessage_pb2
|
25
|
+
import streamlit.proto.WidthConfig_pb2
|
25
26
|
import sys
|
26
27
|
import typing
|
27
28
|
|
@@ -67,6 +68,7 @@ class TextInput(google.protobuf.message.Message):
|
|
67
68
|
DISABLED_FIELD_NUMBER: builtins.int
|
68
69
|
LABEL_VISIBILITY_FIELD_NUMBER: builtins.int
|
69
70
|
ICON_FIELD_NUMBER: builtins.int
|
71
|
+
WIDTH_CONFIG_FIELD_NUMBER: builtins.int
|
70
72
|
id: builtins.str
|
71
73
|
label: builtins.str
|
72
74
|
default: builtins.str
|
@@ -82,6 +84,8 @@ class TextInput(google.protobuf.message.Message):
|
|
82
84
|
icon: builtins.str
|
83
85
|
@property
|
84
86
|
def label_visibility(self) -> streamlit.proto.LabelVisibilityMessage_pb2.LabelVisibilityMessage: ...
|
87
|
+
@property
|
88
|
+
def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig: ...
|
85
89
|
def __init__(
|
86
90
|
self,
|
87
91
|
*,
|
@@ -99,12 +103,15 @@ class TextInput(google.protobuf.message.Message):
|
|
99
103
|
disabled: builtins.bool = ...,
|
100
104
|
label_visibility: streamlit.proto.LabelVisibilityMessage_pb2.LabelVisibilityMessage | None = ...,
|
101
105
|
icon: builtins.str = ...,
|
106
|
+
width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
|
102
107
|
) -> None: ...
|
103
|
-
def HasField(self, field_name: typing.Literal["_default", b"_default", "_value", b"_value", "default", b"default", "label_visibility", b"label_visibility", "value", b"value"]) -> builtins.bool: ...
|
104
|
-
def ClearField(self, field_name: typing.Literal["_default", b"_default", "_value", b"_value", "autocomplete", b"autocomplete", "default", b"default", "disabled", b"disabled", "form_id", b"form_id", "help", b"help", "icon", b"icon", "id", b"id", "label", b"label", "label_visibility", b"label_visibility", "max_chars", b"max_chars", "placeholder", b"placeholder", "set_value", b"set_value", "type", b"type", "value", b"value"]) -> None: ...
|
108
|
+
def HasField(self, field_name: typing.Literal["_default", b"_default", "_value", b"_value", "_width_config", b"_width_config", "default", b"default", "label_visibility", b"label_visibility", "value", b"value", "width_config", b"width_config"]) -> builtins.bool: ...
|
109
|
+
def ClearField(self, field_name: typing.Literal["_default", b"_default", "_value", b"_value", "_width_config", b"_width_config", "autocomplete", b"autocomplete", "default", b"default", "disabled", b"disabled", "form_id", b"form_id", "help", b"help", "icon", b"icon", "id", b"id", "label", b"label", "label_visibility", b"label_visibility", "max_chars", b"max_chars", "placeholder", b"placeholder", "set_value", b"set_value", "type", b"type", "value", b"value", "width_config", b"width_config"]) -> None: ...
|
105
110
|
@typing.overload
|
106
111
|
def WhichOneof(self, oneof_group: typing.Literal["_default", b"_default"]) -> typing.Literal["default"] | None: ...
|
107
112
|
@typing.overload
|
108
113
|
def WhichOneof(self, oneof_group: typing.Literal["_value", b"_value"]) -> typing.Literal["value"] | None: ...
|
114
|
+
@typing.overload
|
115
|
+
def WhichOneof(self, oneof_group: typing.Literal["_width_config", b"_width_config"]) -> typing.Literal["width_config"] | None: ...
|
109
116
|
|
110
117
|
global___TextInput = TextInput
|
streamlit/static/index.html
CHANGED
@@ -51,7 +51,7 @@
|
|
51
51
|
<script>
|
52
52
|
window.prerenderReady = false
|
53
53
|
</script>
|
54
|
-
<script type="module" crossorigin src="./static/js/index.
|
54
|
+
<script type="module" crossorigin src="./static/js/index.C1Onnqgx.js"></script>
|
55
55
|
<link rel="stylesheet" crossorigin href="./static/css/index.C6rq3aMZ.css">
|
56
56
|
</head>
|
57
57
|
<body>
|
@@ -1 +1 @@
|
|
1
|
-
import{r,E as a,_ as n}from"./index.
|
1
|
+
import{r,E as a,_ as n}from"./index.C1Onnqgx.js";var i=r.forwardRef(function(e,t){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(a,n({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),r.createElement("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))});i.displayName="ErrorOutline";export{i as E};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,E as n,_ as a}from"./index.
|
1
|
+
import{r as e,E as n,_ as a}from"./index.C1Onnqgx.js";var o=e.forwardRef(function(t,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),e.createElement("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"}))});o.displayName="Delete";var i=e.forwardRef(function(t,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),e.createElement("rect",{width:24,height:24,fill:"none"}),e.createElement("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4l-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z"}))});i.displayName="FileDownload";export{o as D,i as F};
|