streamlit-nightly 1.36.1.dev20240720__py2.py3-none-any.whl → 1.36.1.dev20240722__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.
- streamlit/commands/execution_control.py +17 -12
- streamlit/config.py +8 -4
- streamlit/elements/alert.py +6 -6
- streamlit/elements/dialog_decorator.py +1 -0
- streamlit/elements/heading.py +29 -52
- streamlit/elements/layouts.py +44 -83
- streamlit/elements/markdown.py +12 -17
- streamlit/elements/metric.py +19 -24
- streamlit/elements/progress.py +10 -20
- streamlit/elements/toast.py +6 -16
- streamlit/elements/vega_charts.py +49 -12
- streamlit/elements/widgets/button.py +74 -81
- streamlit/elements/widgets/button_group.py +50 -22
- streamlit/elements/widgets/camera_input.py +12 -21
- streamlit/elements/widgets/checkbox.py +40 -42
- streamlit/elements/widgets/color_picker.py +20 -21
- streamlit/elements/widgets/file_uploader.py +13 -21
- streamlit/elements/widgets/multiselect.py +24 -22
- streamlit/elements/widgets/number_input.py +31 -25
- streamlit/elements/widgets/radio.py +24 -21
- streamlit/elements/widgets/select_slider.py +22 -21
- streamlit/elements/widgets/selectbox.py +23 -21
- streamlit/elements/widgets/slider.py +24 -21
- streamlit/elements/widgets/text_widgets.py +48 -43
- streamlit/elements/widgets/time_widgets.py +44 -42
- streamlit/runtime/context.py +55 -7
- streamlit/runtime/fragment.py +3 -4
- streamlit/static/asset-manifest.json +3 -3
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/7175.2779947a.chunk.js +1 -0
- streamlit/static/static/js/{main.d55f6a3c.js → main.35bc5645.js} +2 -2
- streamlit/testing/v1/app_test.py +10 -0
- {streamlit_nightly-1.36.1.dev20240720.dist-info → streamlit_nightly-1.36.1.dev20240722.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.36.1.dev20240720.dist-info → streamlit_nightly-1.36.1.dev20240722.dist-info}/RECORD +39 -39
- {streamlit_nightly-1.36.1.dev20240720.dist-info → streamlit_nightly-1.36.1.dev20240722.dist-info}/WHEEL +1 -1
- streamlit/static/static/js/7175.4cdaec13.chunk.js +0 -1
- /streamlit/static/static/js/{main.d55f6a3c.js.LICENSE.txt → main.35bc5645.js.LICENSE.txt} +0 -0
- {streamlit_nightly-1.36.1.dev20240720.data → streamlit_nightly-1.36.1.dev20240722.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.36.1.dev20240720.dist-info → streamlit_nightly-1.36.1.dev20240722.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.36.1.dev20240720.dist-info → streamlit_nightly-1.36.1.dev20240722.dist-info}/top_level.txt +0 -0
@@ -133,64 +133,65 @@ class SelectSliderMixin:
|
|
133
133
|
----------
|
134
134
|
label : str
|
135
135
|
A short label explaining to the user what this slider is for.
|
136
|
-
The label can optionally contain Markdown
|
137
|
-
|
136
|
+
The label can optionally contain GitHub-flavored Markdown of the
|
137
|
+
following types: Bold, Italics, Strikethroughs, Inline Code, and
|
138
|
+
Links.
|
138
139
|
|
139
|
-
|
140
|
+
Unsupported Markdown elements are unwrapped so only their children
|
141
|
+
(text contents) render. Display unsupported elements as literal
|
142
|
+
characters by backslash-escaping them. E.g.,
|
143
|
+
``"1\. Not an ordered list"``.
|
140
144
|
|
141
|
-
|
142
|
-
|
143
|
-
see https://share.streamlit.io/streamlit/emoji-shortcodes.
|
144
|
-
|
145
|
-
* LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"
|
146
|
-
must be on their own lines). Supported LaTeX functions are listed
|
147
|
-
at https://katex.org/docs/supported.html.
|
148
|
-
|
149
|
-
* Colored text and background colors for text, using the syntax
|
150
|
-
``:color[text to be colored]`` and ``:color-background[text to be colored]``,
|
151
|
-
respectively. ``color`` must be replaced with any of the following
|
152
|
-
supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
|
153
|
-
For example, you can use ``:orange[your text here]`` or
|
154
|
-
``:blue-background[your text here]``.
|
155
|
-
|
156
|
-
Unsupported elements are unwrapped so only their children (text contents) render.
|
157
|
-
Display unsupported elements as literal characters by
|
158
|
-
backslash-escaping them. E.g. ``1\. Not an ordered list``.
|
145
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
146
|
+
supported Markdown directives.
|
159
147
|
|
160
148
|
For accessibility reasons, you should never set an empty label (label="")
|
161
149
|
but hide it with label_visibility if needed. In the future, we may disallow
|
162
150
|
empty labels by raising an exception.
|
151
|
+
|
152
|
+
.. |st.markdown| replace:: ``st.markdown``
|
153
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
154
|
+
|
163
155
|
options : Iterable
|
164
156
|
Labels for the select options in an Iterable. For example, this can
|
165
157
|
be a list, numpy.ndarray, pandas.Series, pandas.DataFrame, or
|
166
158
|
pandas.Index. For pandas.DataFrame, the first column is used.
|
167
159
|
Each label will be cast to str internally by default.
|
160
|
+
|
168
161
|
value : a supported type or a tuple/list of supported types or None
|
169
162
|
The value of the slider when it first renders. If a tuple/list
|
170
163
|
of two values is passed here, then a range slider with those lower
|
171
164
|
and upper bounds is rendered. For example, if set to `(1, 10)` the
|
172
165
|
slider will have a selectable range between 1 and 10.
|
173
166
|
Defaults to first option.
|
167
|
+
|
174
168
|
format_func : function
|
175
169
|
Function to modify the display of the labels from the options.
|
176
170
|
argument. It receives the option as an argument and its output
|
177
171
|
will be cast to str.
|
172
|
+
|
178
173
|
key : str or int
|
179
174
|
An optional string or integer to use as the unique key for the widget.
|
180
175
|
If this is omitted, a key will be generated for the widget
|
181
176
|
based on its content. Multiple widgets of the same type may
|
182
177
|
not share the same key.
|
178
|
+
|
183
179
|
help : str
|
184
180
|
An optional tooltip that gets displayed next to the select slider.
|
181
|
+
|
185
182
|
on_change : callable
|
186
183
|
An optional callback invoked when this select_slider's value changes.
|
184
|
+
|
187
185
|
args : tuple
|
188
186
|
An optional tuple of args to pass to the callback.
|
187
|
+
|
189
188
|
kwargs : dict
|
190
189
|
An optional dict of kwargs to pass to the callback.
|
190
|
+
|
191
191
|
disabled : bool
|
192
192
|
An optional boolean, which disables the select slider if set to True.
|
193
193
|
The default is False.
|
194
|
+
|
194
195
|
label_visibility : "visible", "hidden", or "collapsed"
|
195
196
|
The visibility of the label. If "hidden", the label doesn't show but there
|
196
197
|
is still empty space for it above the widget (equivalent to label="").
|
@@ -97,64 +97,66 @@ class SelectboxMixin:
|
|
97
97
|
----------
|
98
98
|
label : str
|
99
99
|
A short label explaining to the user what this select widget is for.
|
100
|
-
The label can optionally contain Markdown
|
101
|
-
|
100
|
+
The label can optionally contain GitHub-flavored Markdown of the
|
101
|
+
following types: Bold, Italics, Strikethroughs, Inline Code, and
|
102
|
+
Links.
|
102
103
|
|
103
|
-
|
104
|
+
Unsupported Markdown elements are unwrapped so only their children
|
105
|
+
(text contents) render. Display unsupported elements as literal
|
106
|
+
characters by backslash-escaping them. E.g.,
|
107
|
+
``"1\. Not an ordered list"``.
|
104
108
|
|
105
|
-
|
106
|
-
|
107
|
-
see https://share.streamlit.io/streamlit/emoji-shortcodes.
|
108
|
-
|
109
|
-
* LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"
|
110
|
-
must be on their own lines). Supported LaTeX functions are listed
|
111
|
-
at https://katex.org/docs/supported.html.
|
112
|
-
|
113
|
-
* Colored text and background colors for text, using the syntax
|
114
|
-
``:color[text to be colored]`` and ``:color-background[text to be colored]``,
|
115
|
-
respectively. ``color`` must be replaced with any of the following
|
116
|
-
supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
|
117
|
-
For example, you can use ``:orange[your text here]`` or
|
118
|
-
``:blue-background[your text here]``.
|
119
|
-
|
120
|
-
Unsupported elements are unwrapped so only their children (text contents) render.
|
121
|
-
Display unsupported elements as literal characters by
|
122
|
-
backslash-escaping them. E.g. ``1\. Not an ordered list``.
|
109
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
110
|
+
supported Markdown directives.
|
123
111
|
|
124
112
|
For accessibility reasons, you should never set an empty label (label="")
|
125
113
|
but hide it with label_visibility if needed. In the future, we may disallow
|
126
114
|
empty labels by raising an exception.
|
115
|
+
|
116
|
+
.. |st.markdown| replace:: ``st.markdown``
|
117
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
118
|
+
|
127
119
|
options : Iterable
|
128
120
|
Labels for the select options in an Iterable. For example, this can
|
129
121
|
be a list, numpy.ndarray, pandas.Series, pandas.DataFrame, or
|
130
122
|
pandas.Index. For pandas.DataFrame, the first column is used.
|
131
123
|
Each label will be cast to str internally by default.
|
124
|
+
|
132
125
|
index : int
|
133
126
|
The index of the preselected option on first render. If ``None``,
|
134
127
|
will initialize empty and return ``None`` until the user selects an option.
|
135
128
|
Defaults to 0 (the first option).
|
129
|
+
|
136
130
|
format_func : function
|
137
131
|
Function to modify the display of the labels. It receives the option
|
138
132
|
as an argument and its output will be cast to str.
|
133
|
+
|
139
134
|
key : str or int
|
140
135
|
An optional string or integer to use as the unique key for the widget.
|
141
136
|
If this is omitted, a key will be generated for the widget
|
142
137
|
based on its content. Multiple widgets of the same type may
|
143
138
|
not share the same key.
|
139
|
+
|
144
140
|
help : str
|
145
141
|
An optional tooltip that gets displayed next to the selectbox.
|
142
|
+
|
146
143
|
on_change : callable
|
147
144
|
An optional callback invoked when this selectbox's value changes.
|
145
|
+
|
148
146
|
args : tuple
|
149
147
|
An optional tuple of args to pass to the callback.
|
148
|
+
|
150
149
|
kwargs : dict
|
151
150
|
An optional dict of kwargs to pass to the callback.
|
151
|
+
|
152
152
|
placeholder : str
|
153
153
|
A string to display when no options are selected.
|
154
154
|
Defaults to "Choose an option".
|
155
|
+
|
155
156
|
disabled : bool
|
156
157
|
An optional boolean, which disables the selectbox if set to True.
|
157
158
|
The default is False.
|
159
|
+
|
158
160
|
label_visibility : "visible", "hidden", or "collapsed"
|
159
161
|
The visibility of the label. If "hidden", the label doesn't show but there
|
160
162
|
is still empty space for it above the widget (equivalent to label="").
|
@@ -211,74 +211,77 @@ class SliderMixin:
|
|
211
211
|
----------
|
212
212
|
label : str
|
213
213
|
A short label explaining to the user what this slider is for.
|
214
|
-
The label can optionally contain Markdown
|
215
|
-
|
214
|
+
The label can optionally contain GitHub-flavored Markdown of the
|
215
|
+
following types: Bold, Italics, Strikethroughs, Inline Code, and
|
216
|
+
Links.
|
216
217
|
|
217
|
-
|
218
|
+
Unsupported Markdown elements are unwrapped so only their children
|
219
|
+
(text contents) render. Display unsupported elements as literal
|
220
|
+
characters by backslash-escaping them. E.g.,
|
221
|
+
``"1\. Not an ordered list"``.
|
218
222
|
|
219
|
-
|
220
|
-
|
221
|
-
see https://share.streamlit.io/streamlit/emoji-shortcodes.
|
222
|
-
|
223
|
-
* LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"
|
224
|
-
must be on their own lines). Supported LaTeX functions are listed
|
225
|
-
at https://katex.org/docs/supported.html.
|
226
|
-
|
227
|
-
* Colored text and background colors for text, using the syntax
|
228
|
-
``:color[text to be colored]`` and ``:color-background[text to be colored]``,
|
229
|
-
respectively. ``color`` must be replaced with any of the following
|
230
|
-
supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
|
231
|
-
For example, you can use ``:orange[your text here]`` or
|
232
|
-
``:blue-background[your text here]``.
|
233
|
-
|
234
|
-
Unsupported elements are unwrapped so only their children (text contents) render.
|
235
|
-
Display unsupported elements as literal characters by
|
236
|
-
backslash-escaping them. E.g. ``1\. Not an ordered list``.
|
223
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
224
|
+
supported Markdown directives.
|
237
225
|
|
238
226
|
For accessibility reasons, you should never set an empty label (label="")
|
239
227
|
but hide it with label_visibility if needed. In the future, we may disallow
|
240
228
|
empty labels by raising an exception.
|
229
|
+
|
230
|
+
.. |st.markdown| replace:: ``st.markdown``
|
231
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
232
|
+
|
241
233
|
min_value : a supported type or None
|
242
234
|
The minimum permitted value.
|
243
235
|
Defaults to 0 if the value is an int, 0.0 if a float,
|
244
236
|
value - timedelta(days=14) if a date/datetime, time.min if a time
|
237
|
+
|
245
238
|
max_value : a supported type or None
|
246
239
|
The maximum permitted value.
|
247
240
|
Defaults to 100 if the value is an int, 1.0 if a float,
|
248
241
|
value + timedelta(days=14) if a date/datetime, time.max if a time
|
242
|
+
|
249
243
|
value : a supported type or a tuple/list of supported types or None
|
250
244
|
The value of the slider when it first renders. If a tuple/list
|
251
245
|
of two values is passed here, then a range slider with those lower
|
252
246
|
and upper bounds is rendered. For example, if set to `(1, 10)` the
|
253
247
|
slider will have a selectable range between 1 and 10.
|
254
248
|
Defaults to min_value.
|
249
|
+
|
255
250
|
step : int, float, timedelta, or None
|
256
251
|
The stepping interval.
|
257
252
|
Defaults to 1 if the value is an int, 0.01 if a float,
|
258
253
|
timedelta(days=1) if a date/datetime, timedelta(minutes=15) if a time
|
259
254
|
(or if max_value - min_value < 1 day)
|
255
|
+
|
260
256
|
format : str or None
|
261
257
|
A printf-style format string controlling how the interface should
|
262
258
|
display numbers. This does not impact the return value.
|
263
259
|
Formatter for int/float supports: %d %e %f %g %i
|
264
260
|
Formatter for date/time/datetime uses Moment.js notation:
|
265
261
|
https://momentjs.com/docs/#/displaying/format/
|
262
|
+
|
266
263
|
key : str or int
|
267
264
|
An optional string or integer to use as the unique key for the widget.
|
268
265
|
If this is omitted, a key will be generated for the widget
|
269
266
|
based on its content. Multiple widgets of the same type may
|
270
267
|
not share the same key.
|
268
|
+
|
271
269
|
help : str
|
272
270
|
An optional tooltip that gets displayed next to the slider.
|
271
|
+
|
273
272
|
on_change : callable
|
274
273
|
An optional callback invoked when this slider's value changes.
|
274
|
+
|
275
275
|
args : tuple
|
276
276
|
An optional tuple of args to pass to the callback.
|
277
|
+
|
277
278
|
kwargs : dict
|
278
279
|
An optional dict of kwargs to pass to the callback.
|
280
|
+
|
279
281
|
disabled : bool
|
280
282
|
An optional boolean, which disables the slider if set to True. The
|
281
283
|
default is False.
|
284
|
+
|
282
285
|
label_visibility : "visible", "hidden", or "collapsed"
|
283
286
|
The visibility of the label. If "hidden", the label doesn't show but there
|
284
287
|
is still empty space for it above the widget (equivalent to label="").
|
@@ -138,67 +138,70 @@ class TextWidgetsMixin:
|
|
138
138
|
----------
|
139
139
|
label : str
|
140
140
|
A short label explaining to the user what this input is for.
|
141
|
-
The label can optionally contain Markdown
|
142
|
-
|
141
|
+
The label can optionally contain GitHub-flavored Markdown of the
|
142
|
+
following types: Bold, Italics, Strikethroughs, Inline Code, and
|
143
|
+
Links.
|
143
144
|
|
144
|
-
|
145
|
+
Unsupported Markdown elements are unwrapped so only their children
|
146
|
+
(text contents) render. Display unsupported elements as literal
|
147
|
+
characters by backslash-escaping them. E.g.,
|
148
|
+
``"1\. Not an ordered list"``.
|
145
149
|
|
146
|
-
|
147
|
-
|
148
|
-
see https://share.streamlit.io/streamlit/emoji-shortcodes.
|
149
|
-
|
150
|
-
* LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"
|
151
|
-
must be on their own lines). Supported LaTeX functions are listed
|
152
|
-
at https://katex.org/docs/supported.html.
|
153
|
-
|
154
|
-
* Colored text and background colors for text, using the syntax
|
155
|
-
``:color[text to be colored]`` and ``:color-background[text to be colored]``,
|
156
|
-
respectively. ``color`` must be replaced with any of the following
|
157
|
-
supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
|
158
|
-
For example, you can use ``:orange[your text here]`` or
|
159
|
-
``:blue-background[your text here]``.
|
160
|
-
|
161
|
-
Unsupported elements are unwrapped so only their children (text contents) render.
|
162
|
-
Display unsupported elements as literal characters by
|
163
|
-
backslash-escaping them. E.g. ``1\. Not an ordered list``.
|
150
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
151
|
+
supported Markdown directives.
|
164
152
|
|
165
153
|
For accessibility reasons, you should never set an empty label (label="")
|
166
154
|
but hide it with label_visibility if needed. In the future, we may disallow
|
167
155
|
empty labels by raising an exception.
|
156
|
+
|
157
|
+
.. |st.markdown| replace:: ``st.markdown``
|
158
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
159
|
+
|
168
160
|
value : object or None
|
169
161
|
The text value of this widget when it first renders. This will be
|
170
162
|
cast to str internally. If ``None``, will initialize empty and
|
171
163
|
return ``None`` until the user provides input. Defaults to empty string.
|
164
|
+
|
172
165
|
max_chars : int or None
|
173
166
|
Max number of characters allowed in text input.
|
167
|
+
|
174
168
|
key : str or int
|
175
169
|
An optional string or integer to use as the unique key for the widget.
|
176
170
|
If this is omitted, a key will be generated for the widget
|
177
171
|
based on its content. Multiple widgets of the same type may
|
178
172
|
not share the same key.
|
173
|
+
|
179
174
|
type : "default" or "password"
|
180
175
|
The type of the text input. This can be either "default" (for
|
181
176
|
a regular text input), or "password" (for a text input that
|
182
177
|
masks the user's typed value). Defaults to "default".
|
178
|
+
|
183
179
|
help : str
|
184
180
|
An optional tooltip that gets displayed next to the input.
|
181
|
+
|
185
182
|
autocomplete : str
|
186
183
|
An optional value that will be passed to the <input> element's
|
187
184
|
autocomplete property. If unspecified, this value will be set to
|
188
185
|
"new-password" for "password" inputs, and the empty string for
|
189
186
|
"default" inputs. For more details, see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
|
187
|
+
|
190
188
|
on_change : callable
|
191
189
|
An optional callback invoked when this text input's value changes.
|
190
|
+
|
192
191
|
args : tuple
|
193
192
|
An optional tuple of args to pass to the callback.
|
193
|
+
|
194
194
|
kwargs : dict
|
195
195
|
An optional dict of kwargs to pass to the callback.
|
196
|
+
|
196
197
|
placeholder : str or None
|
197
198
|
An optional string displayed when the text input is empty. If None,
|
198
199
|
no text is displayed.
|
200
|
+
|
199
201
|
disabled : bool
|
200
202
|
An optional boolean, which disables the text input if set to True.
|
201
203
|
The default is False.
|
204
|
+
|
202
205
|
label_visibility : "visible", "hidden", or "collapsed"
|
203
206
|
The visibility of the label. If "hidden", the label doesn't show but there
|
204
207
|
is still empty space for it above the widget (equivalent to label="").
|
@@ -410,67 +413,69 @@ class TextWidgetsMixin:
|
|
410
413
|
----------
|
411
414
|
label : str
|
412
415
|
A short label explaining to the user what this input is for.
|
413
|
-
The label can optionally contain Markdown
|
414
|
-
|
415
|
-
|
416
|
-
This also supports:
|
416
|
+
The label can optionally contain GitHub-flavored Markdown of the
|
417
|
+
following types: Bold, Italics, Strikethroughs, Inline Code, and
|
418
|
+
Links.
|
417
419
|
|
418
|
-
|
419
|
-
|
420
|
-
|
420
|
+
Unsupported Markdown elements are unwrapped so only their children
|
421
|
+
(text contents) render. Display unsupported elements as literal
|
422
|
+
characters by backslash-escaping them. E.g.,
|
423
|
+
``"1\. Not an ordered list"``.
|
421
424
|
|
422
|
-
|
423
|
-
|
424
|
-
at https://katex.org/docs/supported.html.
|
425
|
-
|
426
|
-
* Colored text and background colors for text, using the syntax
|
427
|
-
``:color[text to be colored]`` and ``:color-background[text to be colored]``,
|
428
|
-
respectively. ``color`` must be replaced with any of the following
|
429
|
-
supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
|
430
|
-
For example, you can use ``:orange[your text here]`` or
|
431
|
-
``:blue-background[your text here]``.
|
432
|
-
|
433
|
-
Unsupported elements are unwrapped so only their children (text contents) render.
|
434
|
-
Display unsupported elements as literal characters by
|
435
|
-
backslash-escaping them. E.g. ``1\. Not an ordered list``.
|
425
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
426
|
+
supported Markdown directives.
|
436
427
|
|
437
428
|
For accessibility reasons, you should never set an empty label (label="")
|
438
429
|
but hide it with label_visibility if needed. In the future, we may disallow
|
439
430
|
empty labels by raising an exception.
|
431
|
+
|
432
|
+
.. |st.markdown| replace:: ``st.markdown``
|
433
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
434
|
+
|
435
|
+
|
440
436
|
value : object or None
|
441
437
|
The text value of this widget when it first renders. This will be
|
442
438
|
cast to str internally. If ``None``, will initialize empty and
|
443
439
|
return ``None`` until the user provides input. Defaults to empty string.
|
440
|
+
|
444
441
|
height : int or None
|
445
442
|
Desired height of the UI element expressed in pixels. If None, a
|
446
443
|
default height is used.
|
444
|
+
|
447
445
|
max_chars : int or None
|
448
446
|
Maximum number of characters allowed in text area.
|
447
|
+
|
449
448
|
key : str or int
|
450
449
|
An optional string or integer to use as the unique key for the widget.
|
451
450
|
If this is omitted, a key will be generated for the widget
|
452
451
|
based on its content. Multiple widgets of the same type may
|
453
452
|
not share the same key.
|
453
|
+
|
454
454
|
help : str
|
455
455
|
An optional tooltip that gets displayed next to the textarea.
|
456
|
+
|
456
457
|
on_change : callable
|
457
458
|
An optional callback invoked when this text_area's value changes.
|
459
|
+
|
458
460
|
args : tuple
|
459
461
|
An optional tuple of args to pass to the callback.
|
462
|
+
|
460
463
|
kwargs : dict
|
461
464
|
An optional dict of kwargs to pass to the callback.
|
465
|
+
|
462
466
|
placeholder : str or None
|
463
467
|
An optional string displayed when the text area is empty. If None,
|
464
468
|
no text is displayed.
|
469
|
+
|
465
470
|
disabled : bool
|
466
471
|
An optional boolean, which disables the text area if set to True.
|
467
472
|
The default is False.
|
473
|
+
|
468
474
|
label_visibility : "visible", "hidden", or "collapsed"
|
469
475
|
The visibility of the label. If "hidden", the label doesn't show but there
|
470
476
|
is still empty space for it above the widget (equivalent to label="").
|
471
477
|
If "collapsed", both the label and the space are removed. Default is
|
472
478
|
"visible".
|
473
|
-
|
474
479
|
Returns
|
475
480
|
-------
|
476
481
|
str or None
|
@@ -311,59 +311,59 @@ class TimeWidgetsMixin:
|
|
311
311
|
----------
|
312
312
|
label : str
|
313
313
|
A short label explaining to the user what this time input is for.
|
314
|
-
The label can optionally contain Markdown
|
315
|
-
|
314
|
+
The label can optionally contain GitHub-flavored Markdown of the
|
315
|
+
following types: Bold, Italics, Strikethroughs, Inline Code, and
|
316
|
+
Links.
|
316
317
|
|
317
|
-
|
318
|
+
Unsupported Markdown elements are unwrapped so only their children
|
319
|
+
(text contents) render. Display unsupported elements as literal
|
320
|
+
characters by backslash-escaping them. E.g.,
|
321
|
+
``"1\. Not an ordered list"``.
|
318
322
|
|
319
|
-
|
320
|
-
|
321
|
-
see https://share.streamlit.io/streamlit/emoji-shortcodes.
|
322
|
-
|
323
|
-
* LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"
|
324
|
-
must be on their own lines). Supported LaTeX functions are listed
|
325
|
-
at https://katex.org/docs/supported.html.
|
326
|
-
|
327
|
-
* Colored text and background colors for text, using the syntax
|
328
|
-
``:color[text to be colored]`` and ``:color-background[text to be colored]``,
|
329
|
-
respectively. ``color`` must be replaced with any of the following
|
330
|
-
supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
|
331
|
-
For example, you can use ``:orange[your text here]`` or
|
332
|
-
``:blue-background[your text here]``.
|
333
|
-
|
334
|
-
Unsupported elements are unwrapped so only their children (text contents) render.
|
335
|
-
Display unsupported elements as literal characters by
|
336
|
-
backslash-escaping them. E.g. ``1\. Not an ordered list``.
|
323
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
324
|
+
supported Markdown directives.
|
337
325
|
|
338
326
|
For accessibility reasons, you should never set an empty label (label="")
|
339
327
|
but hide it with label_visibility if needed. In the future, we may disallow
|
340
328
|
empty labels by raising an exception.
|
329
|
+
|
330
|
+
.. |st.markdown| replace:: ``st.markdown``
|
331
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
332
|
+
|
341
333
|
value : datetime.time/datetime.datetime, "now" or None
|
342
334
|
The value of this widget when it first renders. This will be
|
343
335
|
cast to str internally. If ``None``, will initialize empty and
|
344
336
|
return ``None`` until the user selects a time. If "now" (default),
|
345
337
|
will initialize with the current time.
|
338
|
+
|
346
339
|
key : str or int
|
347
340
|
An optional string or integer to use as the unique key for the widget.
|
348
341
|
If this is omitted, a key will be generated for the widget
|
349
342
|
based on its content. Multiple widgets of the same type may
|
350
343
|
not share the same key.
|
344
|
+
|
351
345
|
help : str
|
352
346
|
An optional tooltip that gets displayed next to the input.
|
347
|
+
|
353
348
|
on_change : callable
|
354
349
|
An optional callback invoked when this time_input's value changes.
|
350
|
+
|
355
351
|
args : tuple
|
356
352
|
An optional tuple of args to pass to the callback.
|
353
|
+
|
357
354
|
kwargs : dict
|
358
355
|
An optional dict of kwargs to pass to the callback.
|
356
|
+
|
359
357
|
disabled : bool
|
360
358
|
An optional boolean, which disables the time input if set to True.
|
361
359
|
The default is False.
|
360
|
+
|
362
361
|
label_visibility : "visible", "hidden", or "collapsed"
|
363
362
|
The visibility of the label. If "hidden", the label doesn't show but there
|
364
363
|
is still empty space for it above the widget (equivalent to label="").
|
365
364
|
If "collapsed", both the label and the space are removed. Default is
|
366
365
|
"visible".
|
366
|
+
|
367
367
|
step : int or timedelta
|
368
368
|
The stepping interval in seconds. Defaults to 900, i.e. 15 minutes.
|
369
369
|
You can also pass a datetime.timedelta object.
|
@@ -540,65 +540,67 @@ class TimeWidgetsMixin:
|
|
540
540
|
----------
|
541
541
|
label : str
|
542
542
|
A short label explaining to the user what this date input is for.
|
543
|
-
The label can optionally contain Markdown
|
544
|
-
|
545
|
-
|
546
|
-
This also supports:
|
543
|
+
The label can optionally contain GitHub-flavored Markdown of the
|
544
|
+
following types: Bold, Italics, Strikethroughs, Inline Code, and
|
545
|
+
Links.
|
547
546
|
|
548
|
-
|
549
|
-
|
550
|
-
|
547
|
+
Unsupported Markdown elements are unwrapped so only their children
|
548
|
+
(text contents) render. Display unsupported elements as literal
|
549
|
+
characters by backslash-escaping them. E.g.,
|
550
|
+
``"1\. Not an ordered list"``.
|
551
551
|
|
552
|
-
|
553
|
-
|
554
|
-
at https://katex.org/docs/supported.html.
|
555
|
-
|
556
|
-
* Colored text and background colors for text, using the syntax
|
557
|
-
``:color[text to be colored]`` and ``:color-background[text to be colored]``,
|
558
|
-
respectively. ``color`` must be replaced with any of the following
|
559
|
-
supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
|
560
|
-
For example, you can use ``:orange[your text here]`` or
|
561
|
-
``:blue-background[your text here]``.
|
562
|
-
|
563
|
-
Unsupported elements are unwrapped so only their children (text contents) render.
|
564
|
-
Display unsupported elements as literal characters by
|
565
|
-
backslash-escaping them. E.g. ``1\. Not an ordered list``.
|
552
|
+
See the ``body`` parameter of |st.markdown|_ for additional,
|
553
|
+
supported Markdown directives.
|
566
554
|
|
567
555
|
For accessibility reasons, you should never set an empty label (label="")
|
568
556
|
but hide it with label_visibility if needed. In the future, we may disallow
|
569
557
|
empty labels by raising an exception.
|
558
|
+
|
559
|
+
.. |st.markdown| replace:: ``st.markdown``
|
560
|
+
.. _st.markdown: https://docs.streamlit.io/develop/api-reference/text/st.markdown
|
561
|
+
|
570
562
|
value : datetime.date or datetime.datetime or list/tuple of datetime.date or datetime.datetime, "today", or None
|
571
563
|
The value of this widget when it first renders. If a list/tuple with
|
572
564
|
0 to 2 date/datetime values is provided, the datepicker will allow
|
573
565
|
users to provide a range. If ``None``, will initialize empty and
|
574
566
|
return ``None`` until the user provides input. If "today" (default),
|
575
567
|
will initialize with today as a single-date picker.
|
568
|
+
|
576
569
|
min_value : datetime.date or datetime.datetime
|
577
570
|
The minimum selectable date. If value is a date, defaults to value - 10 years.
|
578
571
|
If value is the interval [start, end], defaults to start - 10 years.
|
572
|
+
|
579
573
|
max_value : datetime.date or datetime.datetime
|
580
574
|
The maximum selectable date. If value is a date, defaults to value + 10 years.
|
581
575
|
If value is the interval [start, end], defaults to end + 10 years.
|
576
|
+
|
582
577
|
key : str or int
|
583
578
|
An optional string or integer to use as the unique key for the widget.
|
584
579
|
If this is omitted, a key will be generated for the widget
|
585
580
|
based on its content. Multiple widgets of the same type may
|
586
581
|
not share the same key.
|
582
|
+
|
587
583
|
help : str
|
588
584
|
An optional tooltip that gets displayed next to the input.
|
585
|
+
|
589
586
|
on_change : callable
|
590
587
|
An optional callback invoked when this date_input's value changes.
|
588
|
+
|
591
589
|
args : tuple
|
592
590
|
An optional tuple of args to pass to the callback.
|
591
|
+
|
593
592
|
kwargs : dict
|
594
593
|
An optional dict of kwargs to pass to the callback.
|
594
|
+
|
595
595
|
format : str
|
596
596
|
A format string controlling how the interface should display dates.
|
597
597
|
Supports "YYYY/MM/DD" (default), "DD/MM/YYYY", or "MM/DD/YYYY".
|
598
598
|
You may also use a period (.) or hyphen (-) as separators.
|
599
|
+
|
599
600
|
disabled : bool
|
600
601
|
An optional boolean, which disables the date input if set to True.
|
601
602
|
The default is False.
|
603
|
+
|
602
604
|
label_visibility : "visible", "hidden", or "collapsed"
|
603
605
|
The visibility of the label. If "hidden", the label doesn't show but there
|
604
606
|
is still empty space for it above the widget (equivalent to label="").
|