streamlit-nightly 1.38.1.dev20240926__py2.py3-none-any.whl → 1.38.1.dev20240927__py2.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 (44) hide show
  1. streamlit/commands/logo.py +22 -14
  2. streamlit/commands/navigation.py +12 -7
  3. streamlit/components/v1/component_registry.py +2 -2
  4. streamlit/components/v1/custom_component.py +2 -2
  5. streamlit/config.py +31 -9
  6. streamlit/elements/arrow.py +11 -9
  7. streamlit/elements/deck_gl_json_chart.py +134 -24
  8. streamlit/elements/empty.py +38 -13
  9. streamlit/elements/form.py +26 -8
  10. streamlit/elements/lib/column_types.py +14 -0
  11. streamlit/elements/plotly_chart.py +7 -7
  12. streamlit/elements/vega_charts.py +8 -8
  13. streamlit/elements/widgets/audio_input.py +13 -9
  14. streamlit/elements/widgets/button.py +25 -11
  15. streamlit/elements/widgets/button_group.py +3 -4
  16. streamlit/elements/widgets/camera_input.py +12 -8
  17. streamlit/elements/widgets/chat.py +3 -3
  18. streamlit/elements/widgets/checkbox.py +4 -6
  19. streamlit/elements/widgets/color_picker.py +3 -4
  20. streamlit/elements/widgets/data_editor.py +5 -4
  21. streamlit/elements/widgets/file_uploader.py +6 -7
  22. streamlit/elements/widgets/multiselect.py +3 -4
  23. streamlit/elements/widgets/number_input.py +3 -4
  24. streamlit/elements/widgets/radio.py +3 -4
  25. streamlit/elements/widgets/select_slider.py +3 -4
  26. streamlit/elements/widgets/selectbox.py +3 -4
  27. streamlit/elements/widgets/slider.py +3 -4
  28. streamlit/elements/widgets/text_widgets.py +6 -8
  29. streamlit/elements/widgets/time_widgets.py +6 -8
  30. streamlit/navigation/page.py +7 -5
  31. streamlit/runtime/state/common.py +0 -51
  32. streamlit/runtime/state/widgets.py +17 -53
  33. streamlit/static/asset-manifest.json +3 -3
  34. streamlit/static/index.html +1 -1
  35. streamlit/static/static/css/{5711.c24b25fa.chunk.css → 5711.a29b5d98.chunk.css} +1 -1
  36. streamlit/static/static/js/{main.45415ac9.js → main.db770de6.js} +2 -2
  37. streamlit/testing/v1/app_test.py +2 -2
  38. {streamlit_nightly-1.38.1.dev20240926.dist-info → streamlit_nightly-1.38.1.dev20240927.dist-info}/METADATA +1 -1
  39. {streamlit_nightly-1.38.1.dev20240926.dist-info → streamlit_nightly-1.38.1.dev20240927.dist-info}/RECORD +44 -44
  40. /streamlit/static/static/js/{main.45415ac9.js.LICENSE.txt → main.db770de6.js.LICENSE.txt} +0 -0
  41. {streamlit_nightly-1.38.1.dev20240926.data → streamlit_nightly-1.38.1.dev20240927.data}/scripts/streamlit.cmd +0 -0
  42. {streamlit_nightly-1.38.1.dev20240926.dist-info → streamlit_nightly-1.38.1.dev20240927.dist-info}/WHEEL +0 -0
  43. {streamlit_nightly-1.38.1.dev20240926.dist-info → streamlit_nightly-1.38.1.dev20240927.dist-info}/entry_points.txt +0 -0
  44. {streamlit_nightly-1.38.1.dev20240926.dist-info → streamlit_nightly-1.38.1.dev20240927.dist-info}/top_level.txt +0 -0
@@ -317,6 +317,9 @@ def NumberColumn(
317
317
  This does not impact the return value. Valid formatters: %d %e %f %g %i %u.
318
318
  You can also add prefixes and suffixes, e.g. ``"$ %.2f"`` to show a dollar prefix.
319
319
 
320
+ Number formatting from ``column_config`` always takes precedence over
321
+ number formatting from ``pandas.Styler``.
322
+
320
323
  min_value : int, float, or None
321
324
  The minimum value that can be entered.
322
325
  If None (default), there will be no minimum.
@@ -541,6 +544,8 @@ def LinkColumn(
541
544
  <https://pandas.pydata.org/docs/reference/api/pandas.io.formats.style.Styler.format.html>`_
542
545
  function on the underlying dataframe. Note that this makes the app slow,
543
546
  doesn't work with editable columns, and might be removed in the future.
547
+ Text formatting from ``column_config`` always takes precedence over
548
+ text formatting from ``pandas.Styler``.
544
549
 
545
550
  Examples
546
551
  --------
@@ -1213,6 +1218,9 @@ def DatetimeColumn(
1213
1218
  `momentJS docs <https://momentjs.com/docs/#/displaying/format/>`_ for available
1214
1219
  formats. If None (default), uses ``YYYY-MM-DD HH:mm:ss``.
1215
1220
 
1221
+ Number formatting from ``column_config`` always takes precedence over
1222
+ number formatting from ``pandas.Styler``.
1223
+
1216
1224
  min_value: datetime.datetime or None
1217
1225
  The minimum datetime that can be entered.
1218
1226
  If None (default), there will be no minimum.
@@ -1332,6 +1340,9 @@ def TimeColumn(
1332
1340
  `momentJS docs <https://momentjs.com/docs/#/displaying/format/>`_ for available
1333
1341
  formats. If None (default), uses ``HH:mm:ss``.
1334
1342
 
1343
+ Number formatting from ``column_config`` always takes precedence over
1344
+ number formatting from ``pandas.Styler``.
1345
+
1335
1346
  min_value: datetime.time or None
1336
1347
  The minimum time that can be entered.
1337
1348
  If None (default), there will be no minimum.
@@ -1446,6 +1457,9 @@ def DateColumn(
1446
1457
  `momentJS docs <https://momentjs.com/docs/#/displaying/format/>`_ for available
1447
1458
  formats. If None (default), uses ``YYYY-MM-DD``.
1448
1459
 
1460
+ Number formatting from ``column_config`` always takes precedence over
1461
+ number formatting from ``pandas.Styler``.
1462
+
1449
1463
  min_value: datetime.date or None
1450
1464
  The minimum date that can be entered.
1451
1465
  If None (default), there will be no minimum.
@@ -82,7 +82,7 @@ class PlotlySelectionState(TypedDict, total=False):
82
82
  """
83
83
  The schema for the Plotly chart selection state.
84
84
 
85
- The selection state is stored in a dictionary-like object that suports both
85
+ The selection state is stored in a dictionary-like object that supports both
86
86
  key and attribute notation. Selection states cannot be programmatically
87
87
  changed or set through Session State.
88
88
 
@@ -170,7 +170,7 @@ class PlotlyState(TypedDict, total=False):
170
170
  """
171
171
  The schema for the Plotly chart event state.
172
172
 
173
- The event state is stored in a dictionary-like object that suports both
173
+ The event state is stored in a dictionary-like object that supports both
174
174
  key and attribute notation. Event states cannot be programmatically
175
175
  changed or set through Session State.
176
176
 
@@ -179,7 +179,7 @@ class PlotlyState(TypedDict, total=False):
179
179
  Attributes
180
180
  ----------
181
181
  selection : dict
182
- The state of the ``on_select`` event. This attribure returns a
182
+ The state of the ``on_select`` event. This attribute returns a
183
183
  dictionary-like object that supports both key and attribute notation.
184
184
  The attributes are described by the ``PlotlySelectionState`` dictionary
185
185
  schema.
@@ -396,8 +396,8 @@ class PlotlyMixin:
396
396
  Returns
397
397
  -------
398
398
  element or dict
399
- If ``on_select`` is ``"ignore"`` (default), this method returns an
400
- internal placeholder for the chart element. Otherwise, this method
399
+ If ``on_select`` is ``"ignore"`` (default), this command returns an
400
+ internal placeholder for the chart element. Otherwise, this command
401
401
  returns a dictionary-like object that supports both key and
402
402
  attribute notation. The attributes are described by the
403
403
  ``PlotlyState`` dictionary schema.
@@ -524,12 +524,12 @@ class PlotlyMixin:
524
524
  serde = PlotlyChartSelectionSerde()
525
525
 
526
526
  widget_state = register_widget(
527
- "plotly_chart",
528
- plotly_chart_proto,
527
+ plotly_chart_proto.id,
529
528
  on_change_handler=on_select if callable(on_select) else None,
530
529
  deserializer=serde.deserialize,
531
530
  serializer=serde.serialize,
532
531
  ctx=ctx,
532
+ value_type="string_value",
533
533
  )
534
534
 
535
535
  self.dg._enqueue("plotly_chart", plotly_chart_proto)
@@ -101,7 +101,7 @@ class VegaLiteState(TypedDict, total=False):
101
101
  """
102
102
  The schema for the Vega-Lite event state.
103
103
 
104
- The event state is stored in a dictionary-like object that suports both
104
+ The event state is stored in a dictionary-like object that supports both
105
105
  key and attribute notation. Event states cannot be programmatically
106
106
  changed or set through Session State.
107
107
 
@@ -110,7 +110,7 @@ class VegaLiteState(TypedDict, total=False):
110
110
  Attributes
111
111
  ----------
112
112
  selection : dict
113
- The state of the ``on_select`` event. This attribure returns a
113
+ The state of the ``on_select`` event. This attribute returns a
114
114
  dictionary-like object that supports both key and attribute notation.
115
115
  The name of each Vega-Lite selection parameter becomes an attribute in
116
116
  the ``selection`` dictionary. The format of the data within each
@@ -1570,9 +1570,9 @@ class VegaChartsMixin:
1570
1570
  Returns
1571
1571
  -------
1572
1572
  element or dict
1573
- If ``on_select`` is ``"ignore"`` (default), this method returns an
1573
+ If ``on_select`` is ``"ignore"`` (default), this command returns an
1574
1574
  internal placeholder for the chart element that can be used with
1575
- the ``.add_rows()`` method. Otherwise, this method returns a
1575
+ the ``.add_rows()`` method. Otherwise, this command returns a
1576
1576
  dictionary-like object that supports both key and attribute
1577
1577
  notation. The attributes are described by the ``VegaLiteState``
1578
1578
  dictionary schema.
@@ -1734,9 +1734,9 @@ class VegaChartsMixin:
1734
1734
  Returns
1735
1735
  -------
1736
1736
  element or dict
1737
- If ``on_select`` is ``"ignore"`` (default), this method returns an
1737
+ If ``on_select`` is ``"ignore"`` (default), this command returns an
1738
1738
  internal placeholder for the chart element that can be used with
1739
- the ``.add_rows()`` method. Otherwise, this method returns a
1739
+ the ``.add_rows()`` method. Otherwise, this command returns a
1740
1740
  dictionary-like object that supports both key and attribute
1741
1741
  notation. The attributes are described by the ``VegaLiteState``
1742
1742
  dictionary schema.
@@ -1910,12 +1910,12 @@ class VegaChartsMixin:
1910
1910
  serde = VegaLiteStateSerde(parsed_selection_modes)
1911
1911
 
1912
1912
  widget_state = register_widget(
1913
- "vega_lite_chart",
1914
- vega_lite_proto,
1913
+ vega_lite_proto.id,
1915
1914
  on_change_handler=on_select if callable(on_select) else None,
1916
1915
  deserializer=serde.deserialize,
1917
1916
  serializer=serde.serialize,
1918
1917
  ctx=ctx,
1918
+ value_type="string_value",
1919
1919
  )
1920
1920
 
1921
1921
  self.dg._enqueue(
@@ -96,7 +96,7 @@ class AudioInputMixin:
96
96
  disabled: bool = False,
97
97
  label_visibility: LabelVisibility = "visible",
98
98
  ) -> UploadedFile | None:
99
- r"""Display a widget that returns audio recording from the user's microphone.
99
+ r"""Display a widget that returns an audio recording from the user's microphone.
100
100
 
101
101
  Parameters
102
102
  ----------
@@ -124,14 +124,13 @@ class AudioInputMixin:
124
124
  key : str or int
125
125
  An optional string or integer to use as the unique key for the widget.
126
126
  If this is omitted, a key will be generated for the widget
127
- based on its content. Multiple widgets of the same type may
128
- not share the same key.
127
+ based on its content. No two widgets may have the same key.
129
128
 
130
129
  help : str
131
130
  A tooltip that gets displayed next to the audio input.
132
131
 
133
132
  on_change : callable
134
- An optional callback invoked when this audio_input's value
133
+ An optional callback invoked when this audio input's value
135
134
  changes.
136
135
 
137
136
  args : tuple
@@ -143,6 +142,7 @@ class AudioInputMixin:
143
142
  disabled : bool
144
143
  An optional boolean, which disables the audio input if set to
145
144
  True. Default is False.
145
+
146
146
  label_visibility : "visible", "hidden", or "collapsed"
147
147
  The visibility of the label. If "hidden", the label doesn't show but there
148
148
  is still empty space for it above the widget (equivalent to label="").
@@ -152,9 +152,9 @@ class AudioInputMixin:
152
152
  Returns
153
153
  -------
154
154
  None or UploadedFile
155
- The UploadedFile class is a subclass of BytesIO, and therefore
156
- it is "file-like". This means you can pass them anywhere where
157
- a file is expected.
155
+ The UploadedFile class is a subclass of BytesIO, and therefore is
156
+ "file-like". This means you can pass an instance of it anywhere a
157
+ file is expected.
158
158
 
159
159
  Examples
160
160
  --------
@@ -165,6 +165,10 @@ class AudioInputMixin:
165
165
  >>> if audio_value:
166
166
  ... st.audio(audio_value)
167
167
 
168
+ `View this example <https://doc-audio-input.streamlit.app/>`_ on
169
+ Community Cloud. ``st.experimental_audio_input`` is not yet fully
170
+ supported in embedded apps.
171
+
168
172
  """
169
173
  ctx = get_script_run_ctx()
170
174
  return self._audio_input(
@@ -226,14 +230,14 @@ class AudioInputMixin:
226
230
  serde = AudioInputSerde()
227
231
 
228
232
  audio_input_state = register_widget(
229
- "audio_input",
230
- audio_input_proto,
233
+ audio_input_proto.id,
231
234
  on_change_handler=on_change,
232
235
  args=args,
233
236
  kwargs=kwargs,
234
237
  deserializer=serde.deserialize,
235
238
  serializer=serde.serialize,
236
239
  ctx=ctx,
240
+ value_type="file_uploader_state_value",
237
241
  )
238
242
 
239
243
  self.dg._enqueue("audio_input", audio_input_proto)
@@ -122,9 +122,7 @@ class ButtonMixin:
122
122
  key : str or int
123
123
  An optional string or integer to use as the unique key for the widget.
124
124
  If this is omitted, a key will be generated for the widget
125
- based on its content. Multiple widgets of the same type may
126
- not share the same key.
127
-
125
+ based on its content. No two widgets may have the same key.
128
126
  help : str
129
127
  An optional tooltip that gets displayed when the button is
130
128
  hovered over.
@@ -179,8 +177,8 @@ class ButtonMixin:
179
177
  True if the button was clicked on the last run of the app,
180
178
  False otherwise.
181
179
 
182
- Example
183
- -------
180
+ Examples
181
+ --------
184
182
  >>> import streamlit as st
185
183
  >>>
186
184
  >>> st.button("Reset", type="primary")
@@ -193,6 +191,23 @@ class ButtonMixin:
193
191
  https://doc-buton.streamlit.app/
194
192
  height: 220px
195
193
 
194
+ Although you can add icons to your buttons through Markdown, the
195
+ ``icon`` parameter is a convenient and consistent alternative.
196
+
197
+ >>> import streamlit as st
198
+ >>>
199
+ >>> left, middle, right = st.columns(3)
200
+ >>> if left.button("Plain button", use_container_width=True):
201
+ ... left.markdown("You clicked the plain button.")
202
+ >>> if middle.button("Emoji button", icon="😃", use_container_width=True):
203
+ ... middle.markdown("You clicked the emoji button.")
204
+ >>> if right.button("Material button", icon=":material/mood:", use_container_width=True):
205
+ ... right.markdown("You clicked the Material button.")
206
+
207
+ .. output::
208
+ https://doc-button-icons.streamlit.app/
209
+ height: 220px
210
+
196
211
  """
197
212
  key = to_key(key)
198
213
  ctx = get_script_run_ctx()
@@ -287,8 +302,7 @@ class ButtonMixin:
287
302
  key : str or int
288
303
  An optional string or integer to use as the unique key for the widget.
289
304
  If this is omitted, a key will be generated for the widget
290
- based on its content. Multiple widgets of the same type may
291
- not share the same key.
305
+ based on its content. No two widgets may have the same key.
292
306
 
293
307
  help : str
294
308
  An optional tooltip that gets displayed when the button is
@@ -709,14 +723,14 @@ class ButtonMixin:
709
723
  serde = ButtonSerde()
710
724
 
711
725
  button_state = register_widget(
712
- "download_button",
713
- download_button_proto,
726
+ download_button_proto.id,
714
727
  on_change_handler=on_click,
715
728
  args=args,
716
729
  kwargs=kwargs,
717
730
  deserializer=serde.deserialize,
718
731
  serializer=serde.serialize,
719
732
  ctx=ctx,
733
+ value_type="trigger_value",
720
734
  )
721
735
 
722
736
  self.dg._enqueue("download_button", download_button_proto)
@@ -902,14 +916,14 @@ class ButtonMixin:
902
916
  serde = ButtonSerde()
903
917
 
904
918
  button_state = register_widget(
905
- "button",
906
- button_proto,
919
+ button_proto.id,
907
920
  on_change_handler=on_click,
908
921
  args=args,
909
922
  kwargs=kwargs,
910
923
  deserializer=serde.deserialize,
911
924
  serializer=serde.serialize,
912
925
  ctx=ctx,
926
+ value_type="trigger_value",
913
927
  )
914
928
 
915
929
  if ctx:
@@ -297,8 +297,7 @@ class ButtonGroupMixin:
297
297
  key : str or int
298
298
  An optional string or integer to use as the unique key for the widget.
299
299
  If this is omitted, a key will be generated for the widget
300
- based on its content. Multiple widgets of the same type may
301
- not share the same key.
300
+ based on its content. No two widgets may have the same key.
302
301
 
303
302
  disabled : bool
304
303
  An optional boolean, which disables the feedback widget if set
@@ -620,14 +619,14 @@ class ButtonGroupMixin:
620
619
  )
621
620
 
622
621
  widget_state = register_widget(
623
- widget_name,
624
- proto,
622
+ proto.id,
625
623
  on_change_handler=on_change,
626
624
  args=args,
627
625
  kwargs=kwargs,
628
626
  deserializer=deserializer,
629
627
  serializer=serializer,
630
628
  ctx=ctx,
629
+ value_type="int_array_value",
631
630
  )
632
631
 
633
632
  if widget_state.value_changed:
@@ -124,8 +124,7 @@ class CameraInputMixin:
124
124
  key : str or int
125
125
  An optional string or integer to use as the unique key for the widget.
126
126
  If this is omitted, a key will be generated for the widget
127
- based on its content. Multiple widgets of the same type may
128
- not share the same key.
127
+ based on its content. No two widgets may have the same key.
129
128
 
130
129
  help : str
131
130
  A tooltip that gets displayed next to the camera input.
@@ -152,19 +151,24 @@ class CameraInputMixin:
152
151
  Returns
153
152
  -------
154
153
  None or UploadedFile
155
- The UploadedFile class is a subclass of BytesIO, and therefore
156
- it is "file-like". This means you can pass them anywhere where
157
- a file is expected.
154
+ The UploadedFile class is a subclass of BytesIO, and therefore is
155
+ "file-like". This means you can pass an instance of it anywhere a
156
+ file is expected.
158
157
 
159
158
  Examples
160
159
  --------
161
160
  >>> import streamlit as st
162
161
  >>>
163
- >>> picture = st.camera_input("Take a picture")
162
+ >>> enable = st.checkbox("Enable camera")
163
+ >>> picture = st.camera_input("Take a picture", disabled=not enable)
164
164
  >>>
165
165
  >>> if picture:
166
166
  ... st.image(picture)
167
167
 
168
+ .. output::
169
+ https://doc-camera-input.streamlit.app/
170
+ height: 600px
171
+
168
172
  """
169
173
  ctx = get_script_run_ctx()
170
174
  return self._camera_input(
@@ -226,14 +230,14 @@ class CameraInputMixin:
226
230
  serde = CameraInputSerde()
227
231
 
228
232
  camera_input_state = register_widget(
229
- "camera_input",
230
- camera_input_proto,
233
+ camera_input_proto.id,
231
234
  on_change_handler=on_change,
232
235
  args=args,
233
236
  kwargs=kwargs,
234
237
  deserializer=serde.deserialize,
235
238
  serializer=serde.serialize,
236
239
  ctx=ctx,
240
+ value_type="file_uploader_state_value",
237
241
  )
238
242
 
239
243
  self.dg._enqueue("camera_input", camera_input_proto)
@@ -258,7 +258,7 @@ class ChatMixin:
258
258
  key : str or int
259
259
  An optional string or integer to use as the unique key for the widget.
260
260
  If this is omitted, a key will be generated for the widget based on
261
- its content. Multiple widgets of the same type may not share the same key.
261
+ its content. No two widgets may have the same key.
262
262
 
263
263
  max_chars : int or None
264
264
  The maximum number of characters that can be entered. If ``None``
@@ -370,14 +370,14 @@ class ChatMixin:
370
370
 
371
371
  serde = ChatInputSerde()
372
372
  widget_state = register_widget(
373
- "chat_input",
374
- chat_input_proto,
373
+ chat_input_proto.id,
375
374
  on_change_handler=on_submit,
376
375
  args=args,
377
376
  kwargs=kwargs,
378
377
  deserializer=serde.deserialize,
379
378
  serializer=serde.serialize,
380
379
  ctx=ctx,
380
+ value_type="string_trigger_value",
381
381
  )
382
382
 
383
383
  chat_input_proto.disabled = disabled
@@ -102,8 +102,7 @@ class CheckboxMixin:
102
102
  key : str or int
103
103
  An optional string or integer to use as the unique key for the widget.
104
104
  If this is omitted, a key will be generated for the widget
105
- based on its content. Multiple widgets of the same type may
106
- not share the same key.
105
+ based on its content. No two widgets may have the same key.
107
106
 
108
107
  help : str
109
108
  An optional tooltip that gets displayed next to the checkbox.
@@ -207,8 +206,7 @@ class CheckboxMixin:
207
206
  key : str or int
208
207
  An optional string or integer to use as the unique key for the widget.
209
208
  If this is omitted, a key will be generated for the widget
210
- based on its content. Multiple widgets of the same type may
211
- not share the same key.
209
+ based on its content. No two widgets may have the same key.
212
210
 
213
211
  help : str
214
212
  An optional tooltip that gets displayed next to the toggle.
@@ -317,14 +315,14 @@ class CheckboxMixin:
317
315
  serde = CheckboxSerde(value)
318
316
 
319
317
  checkbox_state = register_widget(
320
- "checkbox",
321
- checkbox_proto,
318
+ checkbox_proto.id,
322
319
  on_change_handler=on_change,
323
320
  args=args,
324
321
  kwargs=kwargs,
325
322
  deserializer=serde.deserialize,
326
323
  serializer=serde.serialize,
327
324
  ctx=ctx,
325
+ value_type="bool_value",
328
326
  )
329
327
 
330
328
  if checkbox_state.value_changed:
@@ -104,8 +104,7 @@ class ColorPickerMixin:
104
104
  key : str or int
105
105
  An optional string or integer to use as the unique key for the widget.
106
106
  If this is omitted, a key will be generated for the widget
107
- based on its content. Multiple widgets of the same type may
108
- not share the same key.
107
+ based on its content. No two widgets may have the same key.
109
108
 
110
109
  help : str
111
110
  An optional tooltip that gets displayed next to the color picker.
@@ -237,14 +236,14 @@ class ColorPickerMixin:
237
236
  serde = ColorPickerSerde(value)
238
237
 
239
238
  widget_state = register_widget(
240
- "color_picker",
241
- color_picker_proto,
239
+ color_picker_proto.id,
242
240
  on_change_handler=on_change,
243
241
  args=args,
244
242
  kwargs=kwargs,
245
243
  deserializer=serde.deserialize,
246
244
  serializer=serde.serialize,
247
245
  ctx=ctx,
246
+ value_type="string_value",
248
247
  )
249
248
 
250
249
  if widget_state.value_changed:
@@ -605,6 +605,8 @@ class DataEditorMixin:
605
605
 
606
606
  .. note::
607
607
  - Styles from ``pandas.Styler`` will only be applied to non-editable columns.
608
+ - Text and number formatting from ``column_config`` always takes
609
+ precedence over text and number formatting from ``pandas.Styler``.
608
610
  - Mixing data types within a column can make the column uneditable.
609
611
  - Additionally, the following data types are not yet supported for editing:
610
612
  ``complex``, ``list``, ``tuple``, ``bytes``, ``bytearray``,
@@ -679,8 +681,7 @@ class DataEditorMixin:
679
681
  key : str
680
682
  An optional string to use as the unique key for this widget. If this
681
683
  is omitted, a key will be generated for the widget based on its
682
- content. Multiple widgets of the same type may not share the same
683
- key.
684
+ content. No two widgets may have the same key.
684
685
 
685
686
  on_change : callable
686
687
  An optional callback invoked when this data_editor's value changes.
@@ -943,14 +944,14 @@ class DataEditorMixin:
943
944
  serde = DataEditorSerde()
944
945
 
945
946
  widget_state = register_widget(
946
- "data_editor",
947
- proto,
947
+ proto.id,
948
948
  on_change_handler=on_change,
949
949
  args=args,
950
950
  kwargs=kwargs,
951
951
  deserializer=serde.deserialize,
952
952
  serializer=serde.serialize,
953
953
  ctx=ctx,
954
+ value_type="string_value",
954
955
  )
955
956
 
956
957
  _apply_dataframe_edits(data_df, widget_state.value, dataframe_schema)
@@ -281,8 +281,7 @@ class FileUploaderMixin:
281
281
  key : str or int
282
282
  An optional string or integer to use as the unique key for the widget.
283
283
  If this is omitted, a key will be generated for the widget
284
- based on its content. Multiple widgets of the same type may
285
- not share the same key.
284
+ based on its content. No two widgets may have the same key.
286
285
 
287
286
  help : str
288
287
  A tooltip that gets displayed next to the file uploader.
@@ -317,9 +316,9 @@ class FileUploaderMixin:
317
316
  uploaded files as UploadedFile objects. If no files were
318
317
  uploaded, returns an empty list.
319
318
 
320
- The UploadedFile class is a subclass of BytesIO, and therefore
321
- it is "file-like". This means you can pass them anywhere where
322
- a file is expected.
319
+ The UploadedFile class is a subclass of BytesIO, and therefore is
320
+ "file-like". This means you can pass an instance of it anywhere a
321
+ file is expected.
323
322
 
324
323
  Examples
325
324
  --------
@@ -457,14 +456,14 @@ class FileUploaderMixin:
457
456
  # representing the current set of files that this uploader should
458
457
  # know about.
459
458
  widget_state = register_widget(
460
- "file_uploader",
461
- file_uploader_proto,
459
+ file_uploader_proto.id,
462
460
  on_change_handler=on_change,
463
461
  args=args,
464
462
  kwargs=kwargs,
465
463
  deserializer=serde.deserialize,
466
464
  serializer=serde.serialize,
467
465
  ctx=ctx,
466
+ value_type="file_uploader_state_value",
468
467
  )
469
468
 
470
469
  self.dg._enqueue("file_uploader", file_uploader_proto)
@@ -164,8 +164,7 @@ class MultiSelectMixin:
164
164
  key : str or int
165
165
  An optional string or integer to use as the unique key for the widget.
166
166
  If this is omitted, a key will be generated for the widget
167
- based on its content. Multiple widgets of the same type may
168
- not share the same key.
167
+ based on its content. No two widgets may have the same key.
169
168
 
170
169
  help : str
171
170
  An optional tooltip that gets displayed next to the multiselect.
@@ -300,14 +299,14 @@ class MultiSelectMixin:
300
299
 
301
300
  serde = MultiSelectSerde(indexable_options, default_values)
302
301
  widget_state = register_widget(
303
- "multiselect",
304
- proto,
302
+ proto.id,
305
303
  on_change_handler=on_change,
306
304
  args=args,
307
305
  kwargs=kwargs,
308
306
  deserializer=serde.deserialize,
309
307
  serializer=serde.serialize,
310
308
  ctx=ctx,
309
+ value_type="int_array_value",
311
310
  )
312
311
 
313
312
  _check_max_selections(widget_state.value, max_selections)
@@ -248,8 +248,7 @@ class NumberInputMixin:
248
248
  key : str or int
249
249
  An optional string or integer to use as the unique key for the widget.
250
250
  If this is omitted, a key will be generated for the widget
251
- based on its content. Multiple widgets of the same type may
252
- not share the same key.
251
+ based on its content. No two widgets may have the same key.
253
252
 
254
253
  help : str
255
254
  An optional tooltip that gets displayed next to the input.
@@ -507,14 +506,14 @@ class NumberInputMixin:
507
506
 
508
507
  serde = NumberInputSerde(value, data_type)
509
508
  widget_state = register_widget(
510
- "number_input",
511
- number_input_proto,
509
+ number_input_proto.id,
512
510
  on_change_handler=on_change,
513
511
  args=args,
514
512
  kwargs=kwargs,
515
513
  deserializer=serde.deserialize,
516
514
  serializer=serde.serialize,
517
515
  ctx=ctx,
516
+ value_type="double_value"
518
517
  )
519
518
 
520
519
  if widget_state.value_changed:
@@ -185,8 +185,7 @@ class RadioMixin:
185
185
  key : str or int
186
186
  An optional string or integer to use as the unique key for the widget.
187
187
  If this is omitted, a key will be generated for the widget
188
- based on its content. Multiple widgets of the same type may
189
- not share the same key.
188
+ based on its content. No two widgets may have the same key.
190
189
 
191
190
  help : str
192
191
  An optional tooltip that gets displayed next to the radio.
@@ -370,14 +369,14 @@ class RadioMixin:
370
369
  serde = RadioSerde(opt, index)
371
370
 
372
371
  widget_state = register_widget(
373
- "radio",
374
- radio_proto,
372
+ radio_proto.id,
375
373
  on_change_handler=on_change,
376
374
  args=args,
377
375
  kwargs=kwargs,
378
376
  deserializer=serde.deserialize,
379
377
  serializer=serde.serialize,
380
378
  ctx=ctx,
379
+ value_type="int_value",
381
380
  )
382
381
  widget_state = maybe_coerce_enum(widget_state, options, opt)
383
382