Commit Graph

1383 Commits

Author SHA1 Message Date
Timothy Pidashev
45b70a130c
align vstack in blank demo app (#2625) 2024-02-15 12:17:53 -08:00
Martin Xu
37eeea1100
Spacing literal should include "0" (#2622)
* spacing literal should include "0"

* rename to LiteralSpacing

* pyi
2024-02-15 11:54:38 -08:00
Masen Furer
44000af633
Unbreak demo app (#2623)
Apparently this was converted before code_block got moved back to the top
level.
2024-02-15 11:09:00 -08:00
Elijah Ahianyo
791fcc9b41
Text as_ prop literals update (#2620)
Support more literal values
2024-02-15 11:08:19 -08:00
Nikhil Rao
80c62da062
Use align start by default stacks (#2619) 2024-02-14 22:43:16 -08:00
Thomas Brandého
39486386f4
fix value/default_value in accordion (#2616)
* fix value/default_value in accordion

* fix for 3.8 compat

* update comment
2024-02-14 17:06:28 -08:00
Masen Furer
a91987c051
Update docstrings for Radix components based on upstream descriptions (#2615)
These are better than copying the generic description of Button in many many
many components.
2024-02-14 15:51:38 -08:00
Masen Furer
f12746d859
Inherit _rename_props from parent classes (#2613)
Ensure that _rename_props from base classes add to the list of _rename_props in subclasses.

Add a test case to validate this behavior.
2024-02-14 14:36:01 -08:00
Elijah Ahianyo
74d90ffb65
Apply themes to drawer content (#2612) 2024-02-14 13:36:48 -08:00
Elijah Ahianyo
d8a9a0c95d
Accordion var data Attribute Error Fix (#2611) 2024-02-14 11:55:05 -08:00
Thomas Brandého
48d6717bb8
add span in text namespace (#2607) 2024-02-14 10:30:26 -08:00
Thomas Brandého
4232767b69
update docstrings for Dialog components (#2608) 2024-02-14 10:29:09 -08:00
Alek Petuskey
eadbf1d3db
Fix comments on drawer (#2604)
* Fix comments on drawer

* Fix precommit

* Fix pyi

* Fix table invalid children

---------

Co-authored-by: Alek Petuskey <alekpetuskey@aleks-mbp.lan>
2024-02-13 22:10:18 -08:00
invrainbow
e729a315f8
Fix fstrings being escaped improperly (#2571) 2024-02-13 14:32:44 -08:00
invrainbow
fccb73ee70
Fix rx.progress to support max prop (#2601) 2024-02-13 14:25:31 -08:00
Elijah Ahianyo
5e9b472d1b
[REF-1919] Valid Children/parents to allow Foreach,Cond,Match and Fragment (#2591) 2024-02-13 14:22:22 -08:00
invrainbow
eea3b00deb
Fix AccordionItem interactive docs not showing up (#2600) 2024-02-13 14:08:30 -08:00
Masen Furer
656e43503c
[REF-1840] Clean up color_scheme mapping (#2602) 2024-02-13 14:07:25 -08:00
Masen Furer
4b327edeb6
Merge remote-tracking branch 'origin/main' into reflex-0.4.0 2024-02-13 12:36:30 -08:00
Tom Gotsman
dec777485f
rx.download accepts data arg as either str or bytes (#2493)
* initial attempt that works for dataframe and text downloads

* changes for masens comments

* Instead of using blob, just send a data: URL from the backend

* Enable rx.download directly with Var

If the Var is string-like and starts with `data:`, then no special processing
occurs. Otherwise, the value is passed to JSON.stringify and downloaded as
text/plain.

* event: update docstring and comments on rx.download

Raise ValueError when URL and data are both provided, or the data provided is
not one of the expected types.

---------

Co-authored-by: Tom Gotsman <tomgotsman@toms-mbp.lan>
Co-authored-by: Masen Furer <m_github@0x26.net>
2024-02-13 12:35:31 -08:00
jackie-pc
6b6eea4d7d
Revert "Revert "Revert "use process pool to compile faster (#2377)" (#2434)" (#2497)" (#2595) 2024-02-13 12:16:35 -08:00
Nikhil Rao
db90006512
Update input to use textfield.input (#2599) 2024-02-13 12:13:48 -08:00
Thomas Brandého
5328f624d4
update connection banner and connection modal to use Radix component instead of chakra (#2593) 2024-02-13 12:05:59 -08:00
Martin Xu
fda6785d56
sub form.root to form class solely for documentation (#2594) 2024-02-13 12:03:17 -08:00
jackie-pc
b130dd07cd
print background compile errors ASAP (#2596) 2024-02-13 12:02:37 -08:00
Elijah Ahianyo
c1089fc8f9
[REF-1925] Accordion foreach fix (#2598) 2024-02-13 11:58:48 -08:00
Masen Furer
d26ceb236d
Expose get_upload_url and get_upload_dir at top level 2024-02-13 11:14:15 -08:00
Masen Furer
dcba038de5
Merge remote-tracking branch 'origin/main' into reflex-0.4.0 2024-02-13 11:10:33 -08:00
Masen Furer
b5f06991a9
Change names to get_upload_dir and get_upload_url (#2587)
These shorter names are more concise and easier to type without losing
significant information.
2024-02-13 11:09:48 -08:00
Masen Furer
4206afeb7b
[REF-1958] Remove shadowed radix css props (#2590)
* style: shorthand replacements need camelCase

Avoid warning on terminal and in browser console from using kebab-case CSS
props with emotion.

* _rename_props only replace prop name once

In case the value also contains the prop name, we don't want to replace it
multiple times.

* pyi_generator: ignore _rename_props in create signature

* Avoid shadowing CSS prop `display` and `gap`

Replace usages of `gap` with `spacing` to retain Radix sizing number system,
while allowing users to specify a responsive `gap` using CSS units.

Remove `display` props from radix components, allowing `display` to accept
responsive lists.

* checkbox: apply `gap` to `flex` if provided

* Remove _rename_props from .create signatures

* Fix spacing prop in blank template

* Fixup tests after changing style shorthand to return camelCase
2024-02-13 10:06:28 -08:00
Nikhil Rao
f05d5ba7ba
Rename components in top level namespace (#2589) 2024-02-12 21:35:49 -08:00
invrainbow
f2a931339a
Merge pull request #2588 from reflex-dev/brandon/fix-progress
Fixes to rx.progress
2024-02-12 19:34:18 -08:00
invrainbow
61234ae164
Fix operator precedence (#2573) 2024-02-12 19:30:25 -08:00
Brandon Hsiao
de6835f464 ruff 2024-02-12 19:16:20 -08:00
Brandon Hsiao
481c9d9dbd fix, lint 2024-02-12 18:57:52 -08:00
Brandon Hsiao
977a9d632b add fixes to rx.progress 2024-02-12 18:38:34 -08:00
Alek Petuskey
de30e15b1d
Add alias for Vaul drawer (#2586) 2024-02-12 15:29:45 -08:00
Nikhil Rao
5c6a800b62
Update styles for progress (#2570) 2024-02-12 15:20:36 -08:00
Tom Gotsman
71e4d539f6
Remove dropdown menu sub content extra props (#2582) 2024-02-12 15:19:05 -08:00
Masen Furer
0da21ea605
Merge remote-tracking branch 'origin/main' into reflex-0.4.0 2024-02-12 15:05:34 -08:00
Masen Furer
47a6901695
banner.py: fix import specification for getBackendURL (#2584)
* banner.py: fix import specification for getBackendURL

Use the constant Dirs.STATE_PATH

* state.js: only `getBackendURL` dynamically when running client side

During server side rendering, `getBackendURL` cannot access the current
location from the `window`, because there is no `window`.

* Better client-side context checking

Thanks jackie
2024-02-12 15:04:59 -08:00
Masen Furer
eafe53369e
keep-chakra: whitelist is always whitelist (#2585)
Regardless of whether the same name exists in the top level rx.<x> namespace,
always convert whitelisted names to rx.chakra.<x>
2024-02-12 14:55:39 -08:00
Masen Furer
fc6eff7104
Convert templates to use rx.chakra where needed (#2555)
* Convert templates to use `rx.chakra` where needed

* reflex_init_in_docker_test: run test on PR into reflex-0.4.0

This is why we didn't catch the template issues earlier
2024-02-12 13:32:23 -08:00
Thomas Brandého
798b72825d
fix match import in iconbutton (#2552) 2024-02-12 12:36:48 -08:00
Masen Furer
2b7e7450f8
Merge remote-tracking branch 'origin/main' into reflex-0.4.0 2024-02-12 12:22:50 -08:00
Masen Furer
10e8bd010c
Upload Workflow Refactor (#2309)
* upload with StaticFiles

* always create uploaded files folder

* just use /_upload to serve uploaded files

* Upload: update pyi file

* app.py: only mount Upload StaticFiles if the upload component is used
2024-02-12 12:21:56 -08:00
Masen Furer
3df4eac33d
test_call_script: update poll ending condition to avoid race (#2583) 2024-02-12 12:21:30 -08:00
Martin Xu
6e946631f3
alias form to form.root (#2579) 2024-02-12 10:57:17 -08:00
Nikhil Rao
93c0091aad
remove extra props on scroll area (#2581) 2024-02-12 10:54:58 -08:00
Masen Furer
58b5e2f5bd
Merge remote-tracking branch 'origin/main' into reflex-0.4.0 2024-02-09 19:38:35 -08:00