From d6cb69f687ce37b087d78972f9d8b3f8ff64f133 Mon Sep 17 00:00:00 2001 From: Josemar Luedke Date: Wed, 6 Nov 2024 11:15:33 -0800 Subject: [PATCH] chore: remove default z-index from overlays --- packages/overlays/src/components/popover.md | 102 ++++++++---------- packages/theme/src/components/overlays.ts | 12 +-- site/app/templates/application.gts | 13 +-- .../app/components/overlays/demo-drawer.hbs | 63 ++++++----- 4 files changed, 88 insertions(+), 102 deletions(-) diff --git a/packages/overlays/src/components/popover.md b/packages/overlays/src/components/popover.md index 0ccf769b..d5681209 100644 --- a/packages/overlays/src/components/popover.md +++ b/packages/overlays/src/components/popover.md @@ -4,21 +4,21 @@ label: New # Popover -A Popover component is a UI element that presents supplementary information or -actions related to a specific trigger element, typically appearing in a small overlay. -It offers a convenient way to display contextual content such as tooltips, forms, -or menus without cluttering the main interface, enhancing user experience and interaction. -Popovers can be triggered by various user actions like hovering, clicking, or focusing on an +A Popover component is a UI element that presents supplementary information or +actions related to a specific trigger element, typically appearing in a small overlay. +It offers a convenient way to display contextual content such as tooltips, forms, +or menus without cluttering the main interface, enhancing user experience and interaction. +Popovers can be triggered by various user actions like hovering, clicking, or focusing on an element, providing flexibility in design and functionality. -The Popover component is built upon the [Overlay](./overlay.md) component, -inheriting its functionality and extending it to cater specifically to popover +The Popover component is built upon the [Overlay](./overlay.md) component, +inheriting its functionality and extending it to cater specifically to popover behavior. This means that all options available in the Overlay component are also accessible as arguments in the `Content` yielded component. Thus, users can leverage the full range of customization options provided by the Overlay component seamlessly within the context of popovers, ensuring consistency and flexibility in UI design and behavior. -## Import +## Import ```js import { Popover } from '@frontile/overlays'; @@ -36,23 +36,23 @@ import { Popover } from '@frontile/overlays'; Toggle Popover - + This is some example content for the popover. It can contain anything. ``` -## Focus Trapping +## Focus Trapping -Prevents the user from tabbing outside of the popover content while it's open, -ensuring better accessibility and usability. To enable this option, ensure a +Prevents the user from tabbing outside of the popover content while it's open, +ensuring better accessibility and usability. To enable this option, ensure a focusable element is rendered at all times within the popover content. ```gjs preview import { Button } from '@frontile/buttons'; import { Popover } from '@frontile/overlays'; -import { FormInput } from '@frontile/forms'; +import { Input } from '@frontile/forms'; ``` - ## The Trigger Besides triggering the popover through a click event, alternative methods are @@ -88,13 +87,13 @@ import { Button } from '@frontile/buttons'; - + Hovered content @@ -103,13 +102,13 @@ import { Button } from '@frontile/buttons'; ## Blocking Window Scroll -Prevent scrolling of the main window when the popover is open, focusing the +Prevent scrolling of the main window when the popover is open, focusing the user's attention on the popover content. ```gjs preview import { Button } from '@frontile/buttons'; import { Popover } from '@frontile/overlays'; -import { FormInput } from '@frontile/forms'; +import { Input } from '@frontile/forms';