streamlit-nightly 1.45.1.dev20250503__py3-none-any.whl → 1.45.1.dev20250504__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.
Files changed (79) hide show
  1. streamlit/elements/widgets/number_input.py +23 -5
  2. streamlit/elements/widgets/selectbox.py +25 -0
  3. streamlit/proto/NumberInput_pb2.py +6 -5
  4. streamlit/proto/NumberInput_pb2.pyi +9 -2
  5. streamlit/proto/Selectbox_pb2.py +4 -3
  6. streamlit/proto/Selectbox_pb2.pyi +9 -2
  7. streamlit/static/index.html +1 -1
  8. streamlit/static/static/js/{ErrorOutline.esm.Bi4rIKce.js → ErrorOutline.esm.Bp4VdNOc.js} +1 -1
  9. streamlit/static/static/js/{FileDownload.esm.CgcfJ7jp.js → FileDownload.esm.hVzDDDNS.js} +1 -1
  10. streamlit/static/static/js/{FileHelper.DNojV8Y-.js → FileHelper.BGcyDQ_S.js} +1 -1
  11. streamlit/static/static/js/{FormClearHelper.Dj9cIjIB.js → FormClearHelper.a0IiSXcn.js} +1 -1
  12. streamlit/static/static/js/{Hooks.BzFUZ6MJ.js → Hooks.C2dZkryw.js} +1 -1
  13. streamlit/static/static/js/{InputInstructions.CYPXcx5I.js → InputInstructions.Cn0WICoN.js} +1 -1
  14. streamlit/static/static/js/{ProgressBar.ZaslM_lv.js → ProgressBar.VRmRPHtW.js} +1 -1
  15. streamlit/static/static/js/{RenderInPortalIfExists.BuhqVIo4.js → RenderInPortalIfExists.CZa97lrw.js} +1 -1
  16. streamlit/static/static/js/{Toolbar.Dh9Ti0Xp.js → Toolbar.DJZBBDvl.js} +1 -1
  17. streamlit/static/static/js/{base-input.CWmg0piT.js → base-input.CzerGAEH.js} +1 -1
  18. streamlit/static/static/js/{checkbox.B55PmSuL.js → checkbox.C6Sj4eVw.js} +1 -1
  19. streamlit/static/static/js/{createSuper.B_ZYGAdZ.js → createSuper.C7yhRETi.js} +1 -1
  20. streamlit/static/static/js/{data-grid-overlay-editor.BC3_SI0J.js → data-grid-overlay-editor.DAgcbVks.js} +1 -1
  21. streamlit/static/static/js/{downloader.DCVryQ8m.js → downloader.B8HL-u_1.js} +1 -1
  22. streamlit/static/static/js/{es6.Dz_yB5z2.js → es6.BxAW_jrO.js} +2 -2
  23. streamlit/static/static/js/{iframeResizer.contentWindow.BL9oGsv0.js → iframeResizer.contentWindow.CS8fz-W7.js} +1 -1
  24. streamlit/static/static/js/{index.CEtbVfDc.js → index.6jptdEp6.js} +1 -1
  25. streamlit/static/static/js/{index.CLm1vyQL.js → index.A_t8lw--.js} +1 -1
  26. streamlit/static/static/js/{index.149XmMwk.js → index.B2tTSlE1.js} +1 -1
  27. streamlit/static/static/js/{index.Cim9S8Ss.js → index.B7UKH_JX.js} +1 -1
  28. streamlit/static/static/js/{index.ZM4hBepQ.js → index.BBClg-gm.js} +1 -1
  29. streamlit/static/static/js/{index.CKlQXXH5.js → index.BDzCUpOG.js} +1 -1
  30. streamlit/static/static/js/{index.C5Bk4I5D.js → index.BRtyx04t.js} +1 -1
  31. streamlit/static/static/js/{index.DGQq6N06.js → index.BwlA1Cf_.js} +1 -1
  32. streamlit/static/static/js/{index.Dk4s-H9g.js → index.BwnckS8e.js} +1 -1
  33. streamlit/static/static/js/{index.Bw1GLRoJ.js → index.C4KrRG3c.js} +1 -1
  34. streamlit/static/static/js/{index.DsUIRBrE.js → index.C7t1-CQQ.js} +1 -1
  35. streamlit/static/static/js/{index.BTniWQ7k.js → index.CG2pASlR.js} +1 -1
  36. streamlit/static/static/js/{index.poyxGVIV.js → index.CGzwdjEF.js} +1 -1
  37. streamlit/static/static/js/{index.CqhFhCXO.js → index.CHL4u91M.js} +1 -1
  38. streamlit/static/static/js/{index.B71v2qvG.js → index.CLFopaXS.js} +1 -1
  39. streamlit/static/static/js/{index.DX5LBKpa.js → index.CSAdYIt3.js} +1 -1
  40. streamlit/static/static/js/{index.Bi2P2smS.js → index.CSPC2m_c.js} +1 -1
  41. streamlit/static/static/js/{index.B4dHtLlL.js → index.CgzjjllY.js} +1 -1
  42. streamlit/static/static/js/{index.B8bKQXh9.js → index.ChOkUAuD.js} +1 -1
  43. streamlit/static/static/js/{index.Bkh6Uq46.js → index.Cr1JUXmf.js} +1 -1
  44. streamlit/static/static/js/{index.BKWZKL08.js → index.Cxp7siQJ.js} +5 -5
  45. streamlit/static/static/js/{index.DB8lzSwd.js → index.D6KElXAI.js} +1 -1
  46. streamlit/static/static/js/{index.xXFNtMRp.js → index.DDCep3pE.js} +1 -1
  47. streamlit/static/static/js/{index.Bjv3WjfL.js → index.DG9Swsby.js} +1 -1
  48. streamlit/static/static/js/{index.CNMeZMWE.js → index.DIZcktIN.js} +1 -1
  49. streamlit/static/static/js/{index.C1Onnqgx.js → index.DR2lTx8N.js} +5 -5
  50. streamlit/static/static/js/{index.B2rrdjSM.js → index.DWb5kgxt.js} +1 -1
  51. streamlit/static/static/js/{index.C9t2WUik.js → index.D_0HKLRm.js} +1 -1
  52. streamlit/static/static/js/{index.n-3bctcT.js → index.DgOrPDFa.js} +1 -1
  53. streamlit/static/static/js/{index.CnBJWuqh.js → index.Dt0FtS-M.js} +1 -1
  54. streamlit/static/static/js/{index.JBn4qgd8.js → index.DtY8dAVN.js} +1 -1
  55. streamlit/static/static/js/{index.Clgb-C0M.js → index.QdRaJV_a.js} +1 -1
  56. streamlit/static/static/js/{index.DBjodTv0.js → index.aBgCjIEX.js} +1 -1
  57. streamlit/static/static/js/{index.B6Lkujkg.js → index.o12m2E2P.js} +1 -1
  58. streamlit/static/static/js/{index.BL9ZervX.js → index.qMnAjj-G.js} +1 -1
  59. streamlit/static/static/js/{index.DJXE7AM9.js → index.uOOdkOMl.js} +1 -1
  60. streamlit/static/static/js/{index.DXNwUj37.js → index.vdE-PayY.js} +1 -1
  61. streamlit/static/static/js/{input.tN5HMxoF.js → input.qNZgmgfK.js} +1 -1
  62. streamlit/static/static/js/{memory.CUqn-HRH.js → memory.DifcSUze.js} +1 -1
  63. streamlit/static/static/js/{mergeWith.DerBQcY2.js → mergeWith.Bykfc0n-.js} +1 -1
  64. streamlit/static/static/js/{number-overlay-editor.BU-PumD0.js → number-overlay-editor.D_L9PQiU.js} +1 -1
  65. streamlit/static/static/js/{possibleConstructorReturn.BqXvihmp.js → possibleConstructorReturn.Cyeph4pU.js} +1 -1
  66. streamlit/static/static/js/{sandbox.DEPmvMZ8.js → sandbox.DT6zcSKI.js} +1 -1
  67. streamlit/static/static/js/{textarea.DTRZkwAk.js → textarea.C46FrViu.js} +1 -1
  68. streamlit/static/static/js/{timepicker.BkL0oPvT.js → timepicker.N6lFakQJ.js} +1 -1
  69. streamlit/static/static/js/{toConsumableArray.DtI7t_Vr.js → toConsumableArray.DwaNiLbv.js} +1 -1
  70. streamlit/static/static/js/{uniqueId.CBIMIugU.js → uniqueId.bNZuA9Mz.js} +1 -1
  71. streamlit/static/static/js/{useBasicWidgetState.CBoFkKUi.js → useBasicWidgetState.qUuCVRZV.js} +1 -1
  72. streamlit/static/static/js/{useOnInputChange.B59UtP7h.js → useOnInputChange.CylEhpc7.js} +1 -1
  73. streamlit/static/static/js/{withFullScreenWrapper.BaWUpTVz.js → withFullScreenWrapper.BQay_j7X.js} +1 -1
  74. {streamlit_nightly-1.45.1.dev20250503.dist-info → streamlit_nightly-1.45.1.dev20250504.dist-info}/METADATA +1 -1
  75. {streamlit_nightly-1.45.1.dev20250503.dist-info → streamlit_nightly-1.45.1.dev20250504.dist-info}/RECORD +79 -79
  76. {streamlit_nightly-1.45.1.dev20250503.dist-info → streamlit_nightly-1.45.1.dev20250504.dist-info}/WHEEL +1 -1
  77. {streamlit_nightly-1.45.1.dev20250503.data → streamlit_nightly-1.45.1.dev20250504.data}/scripts/streamlit.cmd +0 -0
  78. {streamlit_nightly-1.45.1.dev20250503.dist-info → streamlit_nightly-1.45.1.dev20250504.dist-info}/entry_points.txt +0 -0
  79. {streamlit_nightly-1.45.1.dev20250503.dist-info → streamlit_nightly-1.45.1.dev20250504.dist-info}/top_level.txt +0 -0
@@ -23,6 +23,7 @@ from typing_extensions import TypeAlias
23
23
 
24
24
  from streamlit.elements.lib.form_utils import current_form_id
25
25
  from streamlit.elements.lib.js_number import JSNumber, JSNumberBoundsException
26
+ from streamlit.elements.lib.layout_utils import WidthWithoutContent, validate_width
26
27
  from streamlit.elements.lib.policies import (
27
28
  check_widget_policies,
28
29
  maybe_raise_label_warnings,
@@ -42,6 +43,7 @@ from streamlit.errors import (
42
43
  StreamlitValueBelowMinError,
43
44
  )
44
45
  from streamlit.proto.NumberInput_pb2 import NumberInput as NumberInputProto
46
+ from streamlit.proto.WidthConfig_pb2 import WidthConfig
45
47
  from streamlit.runtime.metrics_util import gather_metrics
46
48
  from streamlit.runtime.scriptrunner import ScriptRunContext, get_script_run_ctx
47
49
  from streamlit.runtime.state import (
@@ -96,7 +98,7 @@ class NumberInputMixin:
96
98
  max_value: int | None = None,
97
99
  value: IntOrNone | Literal["min"] = "min",
98
100
  step: int | None = None,
99
- format: str | None = None, key: Key | None = None, help: str | None = None, on_change: WidgetCallback | None = None, args: WidgetArgs | None = None, kwargs: WidgetKwargs | None = None, *, placeholder: str | None = None, disabled: bool = False, label_visibility: LabelVisibility = "visible", icon: str | None = None
101
+ format: str | None = None, key: Key | None = None, help: str | None = None, on_change: WidgetCallback | None = None, args: WidgetArgs | None = None, kwargs: WidgetKwargs | None = None, *, placeholder: str | None = None, disabled: bool = False, label_visibility: LabelVisibility = "visible", icon: str | None = None, width: WidthWithoutContent = "stretch"
100
102
  ) -> int | IntOrNone:
101
103
  ...
102
104
 
@@ -113,7 +115,7 @@ class NumberInputMixin:
113
115
  max_value: int,
114
116
  value: IntOrNone | Literal["min"] = "min",
115
117
  step: int | None = None,
116
- format: str | None = None, key: Key | None = None, help: str | None = None, on_change: WidgetCallback | None = None, args: WidgetArgs | None = None, kwargs: WidgetKwargs | None = None, placeholder: str | None = None, disabled: bool = False, label_visibility: LabelVisibility = "visible", icon: str | None = None
118
+ format: str | None = None, key: Key | None = None, help: str | None = None, on_change: WidgetCallback | None = None, args: WidgetArgs | None = None, kwargs: WidgetKwargs | None = None, placeholder: str | None = None, disabled: bool = False, label_visibility: LabelVisibility = "visible", icon: str | None = None, width: WidthWithoutContent = "stretch"
117
119
  ) -> int | IntOrNone:
118
120
  ...
119
121
 
@@ -128,7 +130,7 @@ class NumberInputMixin:
128
130
  *,
129
131
  value: int,
130
132
  step: int | None = None,
131
- format: str | None = None, key: Key | None = None, help: str | None = None, on_change: WidgetCallback | None = None, args: WidgetArgs | None = None, kwargs: WidgetKwargs | None = None, placeholder: str | None = None, disabled: bool = False, label_visibility: LabelVisibility = "visible", icon: str | None = None
133
+ format: str | None = None, key: Key | None = None, help: str | None = None, on_change: WidgetCallback | None = None, args: WidgetArgs | None = None, kwargs: WidgetKwargs | None = None, placeholder: str | None = None, disabled: bool = False, label_visibility: LabelVisibility = "visible", icon: str | None = None, width: WidthWithoutContent = "stretch"
132
134
  ) -> int:
133
135
  ...
134
136
 
@@ -145,7 +147,7 @@ class NumberInputMixin:
145
147
  value: IntOrNone | Literal["min"] = "min",
146
148
  *,
147
149
  step: int,
148
- format: str | None = None, key: Key | None = None, help: str | None = None, on_change: WidgetCallback | None = None, args: WidgetArgs | None = None, kwargs: WidgetKwargs | None = None, placeholder: str | None = None, disabled: bool = False, label_visibility: LabelVisibility = "visible", icon: str | None = None
150
+ format: str | None = None, key: Key | None = None, help: str | None = None, on_change: WidgetCallback | None = None, args: WidgetArgs | None = None, kwargs: WidgetKwargs | None = None, placeholder: str | None = None, disabled: bool = False, label_visibility: LabelVisibility = "visible", icon: str | None = None, width: WidthWithoutContent = "stretch"
149
151
  ) -> int | IntOrNone:
150
152
  ...
151
153
 
@@ -161,7 +163,7 @@ class NumberInputMixin:
161
163
  max_value: float | None = None,
162
164
  value: FloatOrNone | Literal["min"] = "min",
163
165
  step: float | None = None,
164
- format: str | None = None, key: Key | None = None, help: str | None = None, on_change: WidgetCallback | None = None, args: WidgetArgs | None = None, kwargs: WidgetKwargs | None = None, *, placeholder: str | None = None, disabled: bool = False, label_visibility: LabelVisibility = "visible", icon: str | None = None
166
+ format: str | None = None, key: Key | None = None, help: str | None = None, on_change: WidgetCallback | None = None, args: WidgetArgs | None = None, kwargs: WidgetKwargs | None = None, *, placeholder: str | None = None, disabled: bool = False, label_visibility: LabelVisibility = "visible", icon: str | None = None, width: WidthWithoutContent = "stretch"
165
167
  ) -> float | FloatOrNone:
166
168
  ...
167
169
  # # fmt: on
@@ -185,6 +187,7 @@ class NumberInputMixin:
185
187
  disabled: bool = False,
186
188
  label_visibility: LabelVisibility = "visible",
187
189
  icon: str | None = None,
190
+ width: WidthWithoutContent = "stretch",
188
191
  ) -> Number | None:
189
192
  r"""Display a numeric input widget.
190
193
 
@@ -307,6 +310,9 @@ class NumberInputMixin:
307
310
  <https://fonts.google.com/icons?icon.set=Material+Symbols&icon.style=Rounded>`_
308
311
  font library.
309
312
 
313
+ width : WidthWithoutContent
314
+ The width of the number input. Can be an integer or "stretch". Defaults to "stretch".
315
+
310
316
  Returns
311
317
  -------
312
318
  int or float or None
@@ -355,6 +361,7 @@ class NumberInputMixin:
355
361
  disabled=disabled,
356
362
  label_visibility=label_visibility,
357
363
  icon=icon,
364
+ width=width,
358
365
  ctx=ctx,
359
366
  )
360
367
 
@@ -376,6 +383,7 @@ class NumberInputMixin:
376
383
  disabled: bool = False,
377
384
  label_visibility: LabelVisibility = "visible",
378
385
  icon: str | None = None,
386
+ width: WidthWithoutContent = "stretch",
379
387
  ctx: ScriptRunContext | None = None,
380
388
  ) -> Number | None:
381
389
  key = to_key(key)
@@ -387,6 +395,7 @@ class NumberInputMixin:
387
395
  default_value=value if value != "min" else None,
388
396
  )
389
397
  maybe_raise_label_warnings(label, label_visibility)
398
+ validate_width(width)
390
399
 
391
400
  element_id = compute_and_register_element_id(
392
401
  "number_input",
@@ -401,6 +410,7 @@ class NumberInputMixin:
401
410
  help=help,
402
411
  placeholder=None if placeholder is None else str(placeholder),
403
412
  icon=icon,
413
+ width=width,
404
414
  )
405
415
 
406
416
  # Ensure that all arguments are of the same type.
@@ -552,6 +562,14 @@ class NumberInputMixin:
552
562
  if icon is not None:
553
563
  number_input_proto.icon = validate_icon_or_emoji(icon)
554
564
 
565
+ # Set up width configuration
566
+ width_config = WidthConfig()
567
+ if isinstance(width, int):
568
+ width_config.pixel_width = width
569
+ else:
570
+ width_config.use_stretch = True
571
+ number_input_proto.width_config.CopyFrom(width_config)
572
+
555
573
  serde = NumberInputSerde(value, data_type)
556
574
  widget_state = register_widget(
557
575
  number_input_proto.id,
@@ -18,6 +18,7 @@ from typing import TYPE_CHECKING, Any, Callable, Generic, Literal, cast, overloa
18
18
 
19
19
  from streamlit.dataframe_util import OptionSequence, convert_anything_to_list
20
20
  from streamlit.elements.lib.form_utils import current_form_id
21
+ from streamlit.elements.lib.layout_utils import WidthWithoutContent, validate_width
21
22
  from streamlit.elements.lib.options_selector_utils import (
22
23
  create_mappings,
23
24
  index_,
@@ -37,6 +38,7 @@ from streamlit.elements.lib.utils import (
37
38
  )
38
39
  from streamlit.errors import StreamlitAPIException
39
40
  from streamlit.proto.Selectbox_pb2 import Selectbox as SelectboxProto
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 (
@@ -147,6 +149,7 @@ class SelectboxMixin:
147
149
  disabled: bool = False,
148
150
  label_visibility: LabelVisibility = "visible",
149
151
  accept_new_options: Literal[False] = False,
152
+ width: WidthWithoutContent = "stretch",
150
153
  ) -> T: ...
151
154
 
152
155
  @overload
@@ -166,6 +169,7 @@ class SelectboxMixin:
166
169
  disabled: bool = False,
167
170
  label_visibility: LabelVisibility = "visible",
168
171
  accept_new_options: Literal[True] = True,
172
+ width: WidthWithoutContent = "stretch",
169
173
  ) -> T | str: ...
170
174
 
171
175
  @overload
@@ -185,6 +189,7 @@ class SelectboxMixin:
185
189
  disabled: bool = False,
186
190
  label_visibility: LabelVisibility = "visible",
187
191
  accept_new_options: Literal[False] = False,
192
+ width: WidthWithoutContent = "stretch",
188
193
  ) -> T | None: ...
189
194
 
190
195
  @overload
@@ -204,6 +209,7 @@ class SelectboxMixin:
204
209
  disabled: bool = False,
205
210
  label_visibility: LabelVisibility = "visible",
206
211
  accept_new_options: Literal[True] = True,
212
+ width: WidthWithoutContent = "stretch",
207
213
  ) -> T | str | None: ...
208
214
 
209
215
  @overload
@@ -223,6 +229,7 @@ class SelectboxMixin:
223
229
  disabled: bool = False,
224
230
  label_visibility: LabelVisibility = "visible",
225
231
  accept_new_options: bool = False,
232
+ width: WidthWithoutContent = "stretch",
226
233
  ) -> T | str | None: ...
227
234
 
228
235
  @gather_metrics("selectbox")
@@ -242,6 +249,7 @@ class SelectboxMixin:
242
249
  disabled: bool = False,
243
250
  label_visibility: LabelVisibility = "visible",
244
251
  accept_new_options: bool = False,
252
+ width: WidthWithoutContent = "stretch",
245
253
  ) -> T | str | None:
246
254
  r"""Display a select widget.
247
255
 
@@ -340,6 +348,11 @@ class SelectboxMixin:
340
348
  Streamlit will use a case-insensitive match from ``options`` before
341
349
  adding a new item.
342
350
 
351
+ width : "stretch" or int
352
+ The width of the selectbox. If "stretch", the selectbox will stretch
353
+ to fill the available space. If a number, the selectbox will have a
354
+ fixed width of that many pixels. Defaults to "stretch".
355
+
343
356
  Returns
344
357
  -------
345
358
  any
@@ -421,6 +434,7 @@ class SelectboxMixin:
421
434
  disabled=disabled,
422
435
  label_visibility=label_visibility,
423
436
  accept_new_options=accept_new_options,
437
+ width=width,
424
438
  ctx=ctx,
425
439
  )
426
440
 
@@ -440,6 +454,7 @@ class SelectboxMixin:
440
454
  disabled: bool = False,
441
455
  label_visibility: LabelVisibility = "visible",
442
456
  accept_new_options: bool = False,
457
+ width: WidthWithoutContent = "stretch",
443
458
  ctx: ScriptRunContext | None = None,
444
459
  ) -> T | str | None:
445
460
  key = to_key(key)
@@ -451,6 +466,7 @@ class SelectboxMixin:
451
466
  default_value=None if index == 0 else index,
452
467
  )
453
468
  maybe_raise_label_warnings(label, label_visibility)
469
+ validate_width(width)
454
470
 
455
471
  opt = convert_anything_to_list(options)
456
472
  check_python_comparable(opt)
@@ -487,6 +503,7 @@ class SelectboxMixin:
487
503
  help=help,
488
504
  placeholder=placeholder,
489
505
  accept_new_options=accept_new_options,
506
+ width=width,
490
507
  )
491
508
 
492
509
  session_state = get_session_state().filtered_state
@@ -510,6 +527,14 @@ class SelectboxMixin:
510
527
  if help is not None:
511
528
  selectbox_proto.help = dedent(help)
512
529
 
530
+ # Set up width configuration
531
+ width_config = WidthConfig()
532
+ if isinstance(width, int):
533
+ width_config.pixel_width = width
534
+ else:
535
+ width_config.use_stretch = True
536
+ selectbox_proto.width_config.CopyFrom(width_config)
537
+
513
538
  serde = SelectboxSerde(
514
539
  opt,
515
540
  formatted_options=formatted_options,
@@ -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/NumberInput.proto\x1a,streamlit/proto/LabelVisibilityMessage.proto\"\xca\x03\n\x0bNumberInput\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12\x0f\n\x07\x66orm_id\x18\x03 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x08 \x01(\t\x12\x0f\n\x07has_min\x18\x0b \x01(\x08\x12\x0f\n\x07has_max\x18\x0c \x01(\x08\x12(\n\tdata_type\x18\r \x01(\x0e\x32\x15.NumberInput.DataType\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x0e \x01(\x01H\x00\x88\x01\x01\x12\x0c\n\x04step\x18\x0f \x01(\x01\x12\x0b\n\x03min\x18\x10 \x01(\x01\x12\x0b\n\x03max\x18\x11 \x01(\x01\x12\x0c\n\x04help\x18\x12 \x01(\t\x12\x12\n\x05value\x18\x13 \x01(\x01H\x01\x88\x01\x01\x12\x11\n\tset_value\x18\x14 \x01(\x08\x12\x10\n\x08\x64isabled\x18\x15 \x01(\x08\x12\x31\n\x10label_visibility\x18\x16 \x01(\x0b\x32\x17.LabelVisibilityMessage\x12\x13\n\x0bplaceholder\x18\x17 \x01(\t\x12\x0c\n\x04icon\x18\x18 \x01(\t\"\x1e\n\x08\x44\x61taType\x12\x07\n\x03INT\x10\x00\x12\t\n\x05\x46LOAT\x10\x01\x42\n\n\x08_defaultB\x08\n\x06_valueJ\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06J\x04\x08\x06\x10\x07J\x04\x08\x07\x10\x08J\x04\x08\t\x10\nJ\x04\x08\n\x10\x0b\x42\x30\n\x1c\x63om.snowflake.apps.streamlitB\x10NumberInputProtob\x06proto3')
19
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!streamlit/proto/NumberInput.proto\x1a,streamlit/proto/LabelVisibilityMessage.proto\x1a!streamlit/proto/WidthConfig.proto\"\x8e\x04\n\x0bNumberInput\x12\n\n\x02id\x18\x01 \x01(\t\x12\r\n\x05label\x18\x02 \x01(\t\x12\x0f\n\x07\x66orm_id\x18\x03 \x01(\t\x12\x0e\n\x06\x66ormat\x18\x08 \x01(\t\x12\x0f\n\x07has_min\x18\x0b \x01(\x08\x12\x0f\n\x07has_max\x18\x0c \x01(\x08\x12(\n\tdata_type\x18\r \x01(\x0e\x32\x15.NumberInput.DataType\x12\x14\n\x07\x64\x65\x66\x61ult\x18\x0e \x01(\x01H\x00\x88\x01\x01\x12\x0c\n\x04step\x18\x0f \x01(\x01\x12\x0b\n\x03min\x18\x10 \x01(\x01\x12\x0b\n\x03max\x18\x11 \x01(\x01\x12\x0c\n\x04help\x18\x12 \x01(\t\x12\x12\n\x05value\x18\x13 \x01(\x01H\x01\x88\x01\x01\x12\x11\n\tset_value\x18\x14 \x01(\x08\x12\x10\n\x08\x64isabled\x18\x15 \x01(\x08\x12\x31\n\x10label_visibility\x18\x16 \x01(\x0b\x32\x17.LabelVisibilityMessage\x12\x13\n\x0bplaceholder\x18\x17 \x01(\t\x12\x0c\n\x04icon\x18\x18 \x01(\t\x12\x31\n\x0cwidth_config\x18\x19 \x01(\x0b\x32\x16.streamlit.WidthConfigH\x02\x88\x01\x01\"\x1e\n\x08\x44\x61taType\x12\x07\n\x03INT\x10\x00\x12\t\n\x05\x46LOAT\x10\x01\x42\n\n\x08_defaultB\x08\n\x06_valueB\x0f\n\r_width_configJ\x04\x08\x04\x10\x05J\x04\x08\x05\x10\x06J\x04\x08\x06\x10\x07J\x04\x08\x07\x10\x08J\x04\x08\t\x10\nJ\x04\x08\n\x10\x0b\x42\x30\n\x1c\x63om.snowflake.apps.streamlitB\x10NumberInputProtob\x06proto3')
19
20
 
20
21
  _globals = globals()
21
22
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -23,8 +24,8 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.NumberInput
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\020NumberInputProto'
26
- _globals['_NUMBERINPUT']._serialized_start=84
27
- _globals['_NUMBERINPUT']._serialized_end=542
28
- _globals['_NUMBERINPUT_DATATYPE']._serialized_start=454
29
- _globals['_NUMBERINPUT_DATATYPE']._serialized_end=484
27
+ _globals['_NUMBERINPUT']._serialized_start=119
28
+ _globals['_NUMBERINPUT']._serialized_end=645
29
+ _globals['_NUMBERINPUT_DATATYPE']._serialized_start=540
30
+ _globals['_NUMBERINPUT_DATATYPE']._serialized_end=570
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
 
@@ -73,6 +74,7 @@ class NumberInput(google.protobuf.message.Message):
73
74
  LABEL_VISIBILITY_FIELD_NUMBER: builtins.int
74
75
  PLACEHOLDER_FIELD_NUMBER: builtins.int
75
76
  ICON_FIELD_NUMBER: builtins.int
77
+ WIDTH_CONFIG_FIELD_NUMBER: builtins.int
76
78
  id: builtins.str
77
79
  label: builtins.str
78
80
  form_id: builtins.str
@@ -92,6 +94,8 @@ class NumberInput(google.protobuf.message.Message):
92
94
  icon: builtins.str
93
95
  @property
94
96
  def label_visibility(self) -> streamlit.proto.LabelVisibilityMessage_pb2.LabelVisibilityMessage: ...
97
+ @property
98
+ def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig: ...
95
99
  def __init__(
96
100
  self,
97
101
  *,
@@ -113,12 +117,15 @@ class NumberInput(google.protobuf.message.Message):
113
117
  label_visibility: streamlit.proto.LabelVisibilityMessage_pb2.LabelVisibilityMessage | None = ...,
114
118
  placeholder: builtins.str = ...,
115
119
  icon: builtins.str = ...,
120
+ width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
116
121
  ) -> None: ...
117
- 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: ...
118
- def ClearField(self, field_name: typing.Literal["_default", b"_default", "_value", b"_value", "data_type", b"data_type", "default", b"default", "disabled", b"disabled", "form_id", b"form_id", "format", b"format", "has_max", b"has_max", "has_min", b"has_min", "help", b"help", "icon", b"icon", "id", b"id", "label", b"label", "label_visibility", b"label_visibility", "max", b"max", "min", b"min", "placeholder", b"placeholder", "set_value", b"set_value", "step", b"step", "value", b"value"]) -> None: ...
122
+ 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: ...
123
+ def ClearField(self, field_name: typing.Literal["_default", b"_default", "_value", b"_value", "_width_config", b"_width_config", "data_type", b"data_type", "default", b"default", "disabled", b"disabled", "form_id", b"form_id", "format", b"format", "has_max", b"has_max", "has_min", b"has_min", "help", b"help", "icon", b"icon", "id", b"id", "label", b"label", "label_visibility", b"label_visibility", "max", b"max", "min", b"min", "placeholder", b"placeholder", "set_value", b"set_value", "step", b"step", "value", b"value", "width_config", b"width_config"]) -> None: ...
119
124
  @typing.overload
120
125
  def WhichOneof(self, oneof_group: typing.Literal["_default", b"_default"]) -> typing.Literal["default"] | None: ...
121
126
  @typing.overload
122
127
  def WhichOneof(self, oneof_group: typing.Literal["_value", b"_value"]) -> typing.Literal["value"] | None: ...
128
+ @typing.overload
129
+ def WhichOneof(self, oneof_group: typing.Literal["_width_config", b"_width_config"]) -> typing.Literal["width_config"] | None: ...
123
130
 
124
131
  global___NumberInput = NumberInput
@@ -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/Selectbox.proto\x1a,streamlit/proto/LabelVisibilityMessage.proto\"\xe5\x02\n\tSelectbox\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(\x05H\x00\x88\x01\x01\x12\x0f\n\x07options\x18\x04 \x03(\t\x12\x0c\n\x04help\x18\x05 \x01(\t\x12\x0f\n\x07\x66orm_id\x18\x06 \x01(\t\x12\x16\n\x05value\x18\x07 \x01(\x05\x42\x02\x18\x01H\x01\x88\x01\x01\x12\x16\n\traw_value\x18\r \x01(\tH\x02\x88\x01\x01\x12\x11\n\tset_value\x18\x08 \x01(\x08\x12\x10\n\x08\x64isabled\x18\t \x01(\x08\x12\x31\n\x10label_visibility\x18\n \x01(\x0b\x32\x17.LabelVisibilityMessage\x12\x13\n\x0bplaceholder\x18\x0b \x01(\t\x12\x1f\n\x12\x61\x63\x63\x65pt_new_options\x18\x0c \x01(\x08H\x03\x88\x01\x01\x42\n\n\x08_defaultB\x08\n\x06_valueB\x0c\n\n_raw_valueB\x15\n\x13_accept_new_optionsB.\n\x1c\x63om.snowflake.apps.streamlitB\x0eSelectboxProtob\x06proto3')
19
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fstreamlit/proto/Selectbox.proto\x1a,streamlit/proto/LabelVisibilityMessage.proto\x1a!streamlit/proto/WidthConfig.proto\"\xa9\x03\n\tSelectbox\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(\x05H\x00\x88\x01\x01\x12\x0f\n\x07options\x18\x04 \x03(\t\x12\x0c\n\x04help\x18\x05 \x01(\t\x12\x0f\n\x07\x66orm_id\x18\x06 \x01(\t\x12\x16\n\x05value\x18\x07 \x01(\x05\x42\x02\x18\x01H\x01\x88\x01\x01\x12\x16\n\traw_value\x18\r \x01(\tH\x02\x88\x01\x01\x12\x11\n\tset_value\x18\x08 \x01(\x08\x12\x10\n\x08\x64isabled\x18\t \x01(\x08\x12\x31\n\x10label_visibility\x18\n \x01(\x0b\x32\x17.LabelVisibilityMessage\x12\x13\n\x0bplaceholder\x18\x0b \x01(\t\x12\x1f\n\x12\x61\x63\x63\x65pt_new_options\x18\x0c \x01(\x08H\x03\x88\x01\x01\x12\x31\n\x0cwidth_config\x18\x0e \x01(\x0b\x32\x16.streamlit.WidthConfigH\x04\x88\x01\x01\x42\n\n\x08_defaultB\x08\n\x06_valueB\x0c\n\n_raw_valueB\x15\n\x13_accept_new_optionsB\x0f\n\r_width_configB.\n\x1c\x63om.snowflake.apps.streamlitB\x0eSelectboxProtob\x06proto3')
19
20
 
20
21
  _globals = globals()
21
22
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -25,6 +26,6 @@ if not _descriptor._USE_C_DESCRIPTORS:
25
26
  _globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\016SelectboxProto'
26
27
  _globals['_SELECTBOX'].fields_by_name['value']._loaded_options = None
27
28
  _globals['_SELECTBOX'].fields_by_name['value']._serialized_options = b'\030\001'
28
- _globals['_SELECTBOX']._serialized_start=82
29
- _globals['_SELECTBOX']._serialized_end=439
29
+ _globals['_SELECTBOX']._serialized_start=117
30
+ _globals['_SELECTBOX']._serialized_end=542
30
31
  # @@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
@@ -44,6 +45,7 @@ class Selectbox(google.protobuf.message.Message):
44
45
  LABEL_VISIBILITY_FIELD_NUMBER: builtins.int
45
46
  PLACEHOLDER_FIELD_NUMBER: builtins.int
46
47
  ACCEPT_NEW_OPTIONS_FIELD_NUMBER: builtins.int
48
+ WIDTH_CONFIG_FIELD_NUMBER: builtins.int
47
49
  id: builtins.str
48
50
  label: builtins.str
49
51
  default: builtins.int
@@ -62,6 +64,8 @@ class Selectbox(google.protobuf.message.Message):
62
64
  def options(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
63
65
  @property
64
66
  def label_visibility(self) -> streamlit.proto.LabelVisibilityMessage_pb2.LabelVisibilityMessage: ...
67
+ @property
68
+ def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig: ...
65
69
  def __init__(
66
70
  self,
67
71
  *,
@@ -78,9 +82,10 @@ class Selectbox(google.protobuf.message.Message):
78
82
  label_visibility: streamlit.proto.LabelVisibilityMessage_pb2.LabelVisibilityMessage | None = ...,
79
83
  placeholder: builtins.str = ...,
80
84
  accept_new_options: builtins.bool | None = ...,
85
+ width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
81
86
  ) -> None: ...
82
- def HasField(self, field_name: typing.Literal["_accept_new_options", b"_accept_new_options", "_default", b"_default", "_raw_value", b"_raw_value", "_value", b"_value", "accept_new_options", b"accept_new_options", "default", b"default", "label_visibility", b"label_visibility", "raw_value", b"raw_value", "value", b"value"]) -> builtins.bool: ...
83
- def ClearField(self, field_name: typing.Literal["_accept_new_options", b"_accept_new_options", "_default", b"_default", "_raw_value", b"_raw_value", "_value", b"_value", "accept_new_options", b"accept_new_options", "default", b"default", "disabled", b"disabled", "form_id", b"form_id", "help", b"help", "id", b"id", "label", b"label", "label_visibility", b"label_visibility", "options", b"options", "placeholder", b"placeholder", "raw_value", b"raw_value", "set_value", b"set_value", "value", b"value"]) -> None: ...
87
+ def HasField(self, field_name: typing.Literal["_accept_new_options", b"_accept_new_options", "_default", b"_default", "_raw_value", b"_raw_value", "_value", b"_value", "_width_config", b"_width_config", "accept_new_options", b"accept_new_options", "default", b"default", "label_visibility", b"label_visibility", "raw_value", b"raw_value", "value", b"value", "width_config", b"width_config"]) -> builtins.bool: ...
88
+ def ClearField(self, field_name: typing.Literal["_accept_new_options", b"_accept_new_options", "_default", b"_default", "_raw_value", b"_raw_value", "_value", b"_value", "_width_config", b"_width_config", "accept_new_options", b"accept_new_options", "default", b"default", "disabled", b"disabled", "form_id", b"form_id", "help", b"help", "id", b"id", "label", b"label", "label_visibility", b"label_visibility", "options", b"options", "placeholder", b"placeholder", "raw_value", b"raw_value", "set_value", b"set_value", "value", b"value", "width_config", b"width_config"]) -> None: ...
84
89
  @typing.overload
85
90
  def WhichOneof(self, oneof_group: typing.Literal["_accept_new_options", b"_accept_new_options"]) -> typing.Literal["accept_new_options"] | None: ...
86
91
  @typing.overload
@@ -89,5 +94,7 @@ class Selectbox(google.protobuf.message.Message):
89
94
  def WhichOneof(self, oneof_group: typing.Literal["_raw_value", b"_raw_value"]) -> typing.Literal["raw_value"] | None: ...
90
95
  @typing.overload
91
96
  def WhichOneof(self, oneof_group: typing.Literal["_value", b"_value"]) -> typing.Literal["value"] | None: ...
97
+ @typing.overload
98
+ def WhichOneof(self, oneof_group: typing.Literal["_width_config", b"_width_config"]) -> typing.Literal["width_config"] | None: ...
92
99
 
93
100
  global___Selectbox = Selectbox
@@ -51,7 +51,7 @@
51
51
  <script>
52
52
  window.prerenderReady = false
53
53
  </script>
54
- <script type="module" crossorigin src="./static/js/index.C1Onnqgx.js"></script>
54
+ <script type="module" crossorigin src="./static/js/index.DR2lTx8N.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.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
+ import{r,E as a,_ as n}from"./index.DR2lTx8N.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.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};
1
+ import{r as e,E as n,_ as a}from"./index.DR2lTx8N.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};