diff --git a/docs/src/assets/styles.css b/docs/src/assets/styles.css
index de31d8f..f4bcd6f 100644
--- a/docs/src/assets/styles.css
+++ b/docs/src/assets/styles.css
@@ -4134,7 +4134,7 @@
pointer-events: none;
visibility: hidden;
position: absolute;
- z-index: 50;
+ z-index: 60;
width: fit-content;
max-width: var(--container-xs);
--tw-scale-x: 95%;
diff --git a/docs/src/components/carousel.njk b/docs/src/components/carousel.njk
new file mode 100644
index 0000000..27bd002
--- /dev/null
+++ b/docs/src/components/carousel.njk
@@ -0,0 +1,102 @@
+---
+layout: layouts/page.njk
+title: Carousel
+description: A carousel with motion and swipe.
+toc:
+ - label: Usage
+ id: usage
+---
+
+
+
+
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
+
+
+ 1
+
+
+ 2
+
+
+ 3
+
+
+ 4
+
+
+ 5
+
+
+ 6
+
+
+ 7
+
+
+ 8
+
+
+ 9
+
+
+
\ No newline at end of file
diff --git a/docs/src/test.njk b/docs/src/test.njk
index 4e32864..cae0a59 100644
--- a/docs/src/test.njk
+++ b/docs/src/test.njk
@@ -1,71 +1,39 @@
-
-
-
-
-
- Anchor Positioning Test (Top, End)
-
-
-
-
-
-
-
-
- I should be anchored above the button, aligned to the right.
-
-
-
-
\ No newline at end of file
+{% from "dialog.njk" import dialog %}
+{% set footer %}
+
+
+{% endset %}
+{% call dialog(
+id="demo-dialog-edit-profile",
+title="Edit profile",
+description="Make changes to your profile here. Click save when you're done.",
+trigger="Edit Profile",
+trigger_attrs={"class": "btn-outline"},
+dialog_attrs={"class": "w-full sm:max-w-[425px] max-h-[612px]"},
+footer=footer
+) %}
+
+{% endcall %}
\ No newline at end of file
diff --git a/src/css/basecoat.css b/src/css/basecoat.css
index 886dd31..098f84d 100644
--- a/src/css/basecoat.css
+++ b/src/css/basecoat.css
@@ -1038,7 +1038,7 @@
@apply relative;
&:before {
- @apply absolute content-[attr(data-tooltip)] bg-primary text-primary-foreground z-50 truncate max-w-xs w-fit rounded-md px-3 py-1.5 text-xs invisible opacity-0 scale-95 transition-all pointer-events-none;
+ @apply absolute content-[attr(data-tooltip)] bg-primary text-primary-foreground z-[60] truncate max-w-xs w-fit rounded-md px-3 py-1.5 text-xs invisible opacity-0 scale-95 transition-all pointer-events-none;
}
&:hover:before {
@apply visible opacity-100 scale-100;
diff --git a/src/jinja/dialog.html.jinja b/src/jinja/dialog.html.jinja
index acdbc18..26b8552 100644
--- a/src/jinja/dialog.html.jinja
+++ b/src/jinja/dialog.html.jinja
@@ -48,12 +48,12 @@
class="dialog {{ dialog_attrs.class }}"
aria-labelledby="{{ id }}-title"
{% if description %}aria-describedby="{{ id }}-description"{% endif %}
- {% if close_on_overlay_click %}onclick="this.close()"{% endif %}
+ {% if close_on_overlay_click %}onclick="if (event.target === this) this.close()"{% endif %}
{% for key, value in dialog_attrs.items() %}
{% if key != 'class' %}{{ key }}="{{ value }}"{% endif %}
{% endfor %}
>
-
+
{% if title or description %}
{
diff --git a/src/nunjucks/dialog.njk b/src/nunjucks/dialog.njk
index a9537cb..7c6bf5f 100644
--- a/src/nunjucks/dialog.njk
+++ b/src/nunjucks/dialog.njk
@@ -48,12 +48,12 @@
class="dialog {{ dialog_attrs.class }}"
aria-labelledby="{{ id }}-title"
{% if description %}aria-describedby="{{ id }}-description"{% endif %}
- {% if close_on_overlay_click %}onclick="this.close()"{% endif %}
+ {% if close_on_overlay_click %}onclick="if (event.target === this) this.close()"{% endif %}
{% for key, value in dialog_attrs %}
{% if key != 'class' %}{{ key }}="{{ value }}"{% endif %}
{% endfor %}
>
-
+
{% if title or description %}