Skip to content

Commit

Permalink
fix: #206
Browse files Browse the repository at this point in the history
  • Loading branch information
fabien-ml committed May 4, 2023
1 parent 7b3f414 commit bed0895
Show file tree
Hide file tree
Showing 23 changed files with 90 additions and 49 deletions.
2 changes: 1 addition & 1 deletion apps/docs/src/examples/alert-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import style from "./alert-dialog.module.css";

export function BasicExample() {
return (
<AlertDialog.Root>
<AlertDialog.Root modal={false} preventScroll>
<AlertDialog.Trigger class={style["alert-dialog__trigger"]}>Open</AlertDialog.Trigger>
<AlertDialog.Portal>
<AlertDialog.Overlay class={style["alert-dialog__overlay"]} />
Expand Down
17 changes: 9 additions & 8 deletions apps/docs/src/routes/docs/core/components/alert-dialog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,15 @@ function ControlledExample() {

### AlertDialog.Root

| Prop | Description |
| :----------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| open | `boolean` <br/> The controlled open state of the dialog. |
| defaultOpen | `boolean` <br/> The default open state when initially rendered. Useful when you do not need to control the open state. |
| onOpenChange | `(open: boolean) => void` <br/> Event handler called when the open state of the dialog changes. |
| id | `string` <br/> A unique identifier for the component. The id is used to generate id attributes for nested components. If no id prop is provided, a generated id will be used. |
| modal | `boolean` <br/> Whether the dialog should be the only visible content for screen readers, when set to `true`: <br/> - interaction with outside elements will be disabled. <br/> - scroll will be locked. <br/> - focus will be locked inside the dialog content. <br/> - elements outside the dialog content will not be visible for screen readers. |
| forceMount | `boolean` <br/> Used to force mounting the dialog (portal, overlay and content) when more control is needed. Useful when controlling animation with SolidJS animation libraries. |
| Prop | Description |
| :------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| open | `boolean` <br/> The controlled open state of the dialog. |
| defaultOpen | `boolean` <br/> The default open state when initially rendered. Useful when you do not need to control the open state. |
| onOpenChange | `(open: boolean) => void` <br/> Event handler called when the open state of the dialog changes. |
| id | `string` <br/> A unique identifier for the component. The id is used to generate id attributes for nested components. If no id prop is provided, a generated id will be used. |
| modal | `boolean` <br/> Whether the dialog should be the only visible content for screen readers, when set to `true`: <br/> - interaction with outside elements will be disabled. <br/> - scroll will be locked. <br/> - focus will be locked inside the dialog content. <br/> - elements outside the dialog content will not be visible for screen readers. |
| preventScroll | `boolean` <br/> Whether the scroll should be locked even if the alert dialog is not modal. |
| forceMount | `boolean` <br/> Used to force mounting the dialog (portal, overlay and content) when more control is needed. Useful when controlling animation with SolidJS animation libraries. |

### AlertDialog.Trigger

Expand Down
1 change: 1 addition & 0 deletions apps/docs/src/routes/docs/core/components/combobox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,7 @@ We expose a CSS custom property `--kb-combobox-content-transform-origin` which c
| selectionBehavior | `'toggle' \| 'replace'` <br/> How selection should behave in the combobox. |
| virtualized | `boolean` <br/> Whether the combobox uses virtual scrolling. |
| modal | `boolean` <br/> Whether the combobox should be the only visible content for screen readers, when set to `true`: <br/> - interaction with outside elements will be disabled. <br/> - scroll will be locked. <br/> - focus will be locked inside the combobox content. <br/> - elements outside the combobox content will not be visible for screen readers. |
| preventScroll | `boolean` <br/> Whether the scroll should be locked even if the combobox is not modal. |
| forceMount | `boolean` <br/> Used to force mounting the combobox (portal, positioner and content) when more control is needed. Useful when controlling animation with SolidJS animation libraries. |
| name | `string` <br/> The name of the combobox. Submitted with its owning form as part of a name/value pair. |
| validationState | `'valid' \| 'invalid'` <br/> Whether the combobox should display its "valid" or "invalid" visual styling. |
Expand Down
13 changes: 7 additions & 6 deletions apps/docs/src/routes/docs/core/components/context-menu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,13 @@ We expose a CSS custom property `--kb-popper-content-transform-origin` which can

### ContextMenu.Root

| Prop | Description |
| :----------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| onOpenChange | `(open: boolean) => void` <br/> Event handler called when the open state of the menu changes. |
| id | `string` <br/> A unique identifier for the component. The id is used to generate id attributes for nested components. If no id prop is provided, a generated id will be used. |
| modal | `boolean` <br/> Whether the menu should be the only visible content for screen readers, when set to `true`: <br/> - interaction with outside elements will be disabled. <br/> - scroll will be locked. <br/> - focus will be locked inside the menu content. <br/> - elements outside the menu content will not be visible for screen readers. |
| forceMount | `boolean` <br/> Used to force mounting the menu (portal and content) when more control is needed. Useful when controlling animation with SolidJS animation libraries. |
| Prop | Description |
| :------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| onOpenChange | `(open: boolean) => void` <br/> Event handler called when the open state of the menu changes. |
| id | `string` <br/> A unique identifier for the component. The id is used to generate id attributes for nested components. If no id prop is provided, a generated id will be used. |
| modal | `boolean` <br/> Whether the menu should be the only visible content for screen readers, when set to `true`: <br/> - interaction with outside elements will be disabled. <br/> - scroll will be locked. <br/> - focus will be locked inside the menu content. <br/> - elements outside the menu content will not be visible for screen readers. |
| preventScroll | `boolean` <br/> Whether the scroll should be locked even if the menu is not modal. |
| forceMount | `boolean` <br/> Used to force mounting the menu (portal and content) when more control is needed. Useful when controlling animation with SolidJS animation libraries. |

`ContextMenu.Root` also accepts the following props to customize the placement of the `ContextMenu.Content`.

Expand Down
Loading

0 comments on commit bed0895

Please sign in to comment.