-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update overlay props #4261
Update overlay props #4261
Conversation
# Whether the drawer is open or not. | ||
open: Var[bool] | ||
|
||
# Enable background scaling, it requires an element with [vaul-drawer-wrapper] data attribute to scale its background. | ||
should_scale_background: Var[bool] | ||
# Fires when the drawer is opened. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Fires when the drawer is opened. | |
# Fires when the drawer is opened or closed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
# When `False`, it allows to interact with elements outside of the drawer without closing it. Defaults to `True`. | ||
modal: Var[bool] | ||
|
||
# Direction of the drawer. This adjust the animations and the drag direction. Defaults to `"bottom"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Direction of the drawer. This adjust the animations and the drag direction. Defaults to `"bottom"` | |
# Direction of the drawer. This adjusts the animations and the drag direction. Defaults to `"bottom"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
|
||
# Number between 0 and 1 that determines when the drawer should be closed. | ||
close_threshold: Var[float] | ||
# When `False`, it allows to interact with elements outside of the drawer without closing it. Defaults to `True`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# When `False`, it allows to interact with elements outside of the drawer without closing it. Defaults to `True`. | |
# When `False`, it allows interaction with elements outside of the drawer without closing it. Defaults to `True`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
# Gets triggered after the open or close animation ends, it receives an open argument with the open state of the drawer by the time the function was triggered. | ||
on_animation_end: EventHandler[identity_event(bool)] | ||
|
||
# When false dragging, clicking outside, pressing esc, etc. will not close the drawer. Use this in combination with the open prop, otherwise you won't be able to open/close the drawer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# When false dragging, clicking outside, pressing esc, etc. will not close the drawer. Use this in combination with the open prop, otherwise you won't be able to open/close the drawer. | |
# When `False`, dragging, clicking outside, pressing esc, etc. will not close the drawer. Use this in combination with the open prop, otherwise you won't be able to open/close the drawer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
# When false dragging, clicking outside, pressing esc, etc. will not close the drawer. Use this in combination with the open prop, otherwise you won't be able to open/close the drawer. | ||
dismissible: Var[bool] | ||
|
||
# When true dragging will only be possible by the handle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# When true dragging will only be possible by the handle. | |
# When `True`, dragging will only be possible by the handle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
# When `True`, it prevents scroll restoration. Defaults to `True`. | ||
preventScrollRestoration: Var[bool] | ||
|
||
# Fires when the drawer is opened. | ||
on_open_change: EventHandler[identity_event(bool)] | ||
# Enable background scaling, it requires an element with [vaul-drawer-wrapper] data attribute to scale its background. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unclear what this means, but based on https://www.shadcn-vue.com/docs/components/drawer#scale-background, it seems vaul-drawer-wrapper
isn't a "data attribute", but just a regular attribute, likely applied via special_props=[Var("vaulDrawerWrapper")]
, but i haven't tested it
# Enable background scaling, it requires an element with [vaul-drawer-wrapper] data attribute to scale its background. | |
# Enable background scaling, it requires container element with `vaul-drawer-wrapper` attribute to scale its background. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
# Whether to hide the content when the trigger becomes fully occluded. Defaults to False. | ||
hide_when_detached: Var[bool] | ||
|
||
# Fired when the dialog is closed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description for on_close_auto_focus
doesn't seem quite right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right, fixed
on_close_auto_focus: EventHandler[empty_event] | ||
|
||
# Fired when the escape key is pressed. | ||
on_escape_key_down: EventHandler[empty_event] | ||
|
||
# Fired when a pointer down event happens outside the context menu. | ||
# Fired when the pointer is down outside the dialog. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here and below the object is changed to "dialog", but this really is a "context menu"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed all 3
# When true, prevents the user from interacting with the item. | ||
disabled: Var[bool] | ||
|
||
# Optional text used for typeahead purposes. By default the typeahead behavior will use the .textContent of the item. Use this when the content is complex, or you have non-textual content inside. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comment mentions .textContent
, but the prop is called text_value
, which seems confusing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
All Submissions:
Type of change
Please delete options that are not relevant.
New Feature Submission:
Changes To Core Features:
After these steps, you're ready to open a pull request.