streamlit-react-components 1.0.3__py3-none-any.whl → 1.0.5__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_react_components/_frontend/index.css +1 -1
- streamlit_react_components/_frontend/index.js +38 -38
- streamlit_react_components/common/stat_card.py +31 -1
- {streamlit_react_components-1.0.3.dist-info → streamlit_react_components-1.0.5.dist-info}/METADATA +1 -1
- {streamlit_react_components-1.0.3.dist-info → streamlit_react_components-1.0.5.dist-info}/RECORD +7 -7
- {streamlit_react_components-1.0.3.dist-info → streamlit_react_components-1.0.5.dist-info}/WHEEL +0 -0
- {streamlit_react_components-1.0.3.dist-info → streamlit_react_components-1.0.5.dist-info}/top_level.txt +0 -0
|
@@ -44,7 +44,12 @@ def stat_card(
|
|
|
44
44
|
delta_thresholds: Optional thresholds for delta color based on magnitude
|
|
45
45
|
e.g., {"warning": 10, "danger": 20}
|
|
46
46
|
unit: Unit of measurement (e.g., "kg", "%", "$")
|
|
47
|
-
action: Optional action
|
|
47
|
+
action: Optional action config with keys:
|
|
48
|
+
- id: Unique identifier (returned on click)
|
|
49
|
+
- label: Display text
|
|
50
|
+
- icon: Optional emoji/icon (e.g., "📊")
|
|
51
|
+
- style: "button" (default) or "link"
|
|
52
|
+
- className: Optional Tailwind classes for custom styling
|
|
48
53
|
style: Inline CSS styles as a dictionary
|
|
49
54
|
class_name: Tailwind CSS classes
|
|
50
55
|
key: Unique key for the component
|
|
@@ -85,6 +90,31 @@ def stat_card(
|
|
|
85
90
|
delta_thresholds={"warning": 3, "danger": 10},
|
|
86
91
|
unit="%"
|
|
87
92
|
)
|
|
93
|
+
|
|
94
|
+
# With styled action button
|
|
95
|
+
stat_card(
|
|
96
|
+
label="Revenue",
|
|
97
|
+
value=1234,
|
|
98
|
+
action={
|
|
99
|
+
"id": "view",
|
|
100
|
+
"label": "View Details",
|
|
101
|
+
"icon": "👁️",
|
|
102
|
+
"style": "button",
|
|
103
|
+
"className": "bg-cyan-600 hover:bg-cyan-500"
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
# With link-style action
|
|
108
|
+
stat_card(
|
|
109
|
+
label="Orders",
|
|
110
|
+
value=567,
|
|
111
|
+
action={
|
|
112
|
+
"id": "expand",
|
|
113
|
+
"label": "See more",
|
|
114
|
+
"icon": "→",
|
|
115
|
+
"style": "link"
|
|
116
|
+
}
|
|
117
|
+
)
|
|
88
118
|
"""
|
|
89
119
|
return _component(
|
|
90
120
|
component="stat_card",
|
{streamlit_react_components-1.0.3.dist-info → streamlit_react_components-1.0.5.dist-info}/RECORD
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
streamlit_react_components/__init__.py,sha256=-m5OJx0vsfzD6k2m_2X8eMQXi9pgkreAuDZJoVWbdJ0,673
|
|
2
|
-
streamlit_react_components/_frontend/index.css,sha256=
|
|
2
|
+
streamlit_react_components/_frontend/index.css,sha256=Zr54NzxVJFDz6VnGDKgeMhm0pMXNaZI_qxRIXCGuEWI,26620
|
|
3
3
|
streamlit_react_components/_frontend/index.html,sha256=CjBEtVYlgT_q06BE16EHFrUrJZ6z0MCprrTg7qgAWzw,381
|
|
4
|
-
streamlit_react_components/_frontend/index.js,sha256=
|
|
4
|
+
streamlit_react_components/_frontend/index.js,sha256=nsAcVO7SJNE3nXMdZlPzvdzyBQvQkbpTtn8HWlse4qU,5217693
|
|
5
5
|
streamlit_react_components/common/__init__.py,sha256=xUKaw_X2B2xd6AqW8oLzHupGp-TX3Fij0FjhMNwd-vs,550
|
|
6
6
|
streamlit_react_components/common/button_group.py,sha256=g38gpR62dQ8KLd3JyANvGonT6tf-tyooIjC6t3O4iH0,2225
|
|
7
7
|
streamlit_react_components/common/chart_legend.py,sha256=So703OO-sI6SWrSVGKH0OTiI-smr4luqgBtXQ9GwIlI,1377
|
|
@@ -10,13 +10,13 @@ streamlit_react_components/common/metric_row.py,sha256=abDfSrLvZO8MK2gglvE98L5U0
|
|
|
10
10
|
streamlit_react_components/common/panel.py,sha256=O4URjnK8u9_byFzDO9RAFdpXjzNdxpXY1CX8gEEK1pY,1094
|
|
11
11
|
streamlit_react_components/common/plotly_chart.py,sha256=px1pITa8GSYl_TTg4KzX81nQy_F-9XwUV_91fR7d0po,9368
|
|
12
12
|
streamlit_react_components/common/section_header.py,sha256=2sVLWHjHx2WdhbVVLBgs5shwUUbw6lbAKbsAwiwIWpg,2983
|
|
13
|
-
streamlit_react_components/common/stat_card.py,sha256=
|
|
13
|
+
streamlit_react_components/common/stat_card.py,sha256=e72xc-x4Rse2A9UPrZ5HCNB2W4ltqn1YV7qc0hdFlx8,4311
|
|
14
14
|
streamlit_react_components/common/step_indicator.py,sha256=araovSL_c5h66PawZBf5IlQbVoxXwE9kD0H10ZopVoU,1370
|
|
15
15
|
streamlit_react_components/form/__init__.py,sha256=XP9oBEHSwLTNqu88sYm0F_n828yzPStDJl3N62HxVvc,222
|
|
16
16
|
streamlit_react_components/form/checkbox_group.py,sha256=LbwfyIRKjTnWOB-a4OL2-vJXAJ9QpXhbrbdUz5bBdW4,2100
|
|
17
17
|
streamlit_react_components/form/form_select.py,sha256=KILKVUO-Elb0nqbTEImxyoGQQrnZ_jft30iJSbY5ksk,1946
|
|
18
18
|
streamlit_react_components/form/form_slider.py,sha256=4w9h-d-9yAHg3ZqUHCZGzsfUG3lP5OTwVrDo5sZAnfQ,2032
|
|
19
|
-
streamlit_react_components-1.0.
|
|
20
|
-
streamlit_react_components-1.0.
|
|
21
|
-
streamlit_react_components-1.0.
|
|
22
|
-
streamlit_react_components-1.0.
|
|
19
|
+
streamlit_react_components-1.0.5.dist-info/METADATA,sha256=iLqqVCSf-KE2SPQwJD8WReBevLM9w0ArKI-oq-Ik0_s,21677
|
|
20
|
+
streamlit_react_components-1.0.5.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
21
|
+
streamlit_react_components-1.0.5.dist-info/top_level.txt,sha256=3JFrl15-Uewx3BFMSzqrBufF9GmTS1LDKfShmg0R9VE,27
|
|
22
|
+
streamlit_react_components-1.0.5.dist-info/RECORD,,
|
{streamlit_react_components-1.0.3.dist-info → streamlit_react_components-1.0.5.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|