From 9e0c8f740bad9f101a32de8479b27b7d3460f2ab Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Tue, 2 Jun 2026 16:06:20 +0300 Subject: [PATCH] feat(popover): native Popover API component with anchored positioning --- src/shared/ui/Popover/Popover.svelte | 196 +++++++++++++++++++++++++++ src/shared/ui/index.ts | 6 + 2 files changed, 202 insertions(+) create mode 100644 src/shared/ui/Popover/Popover.svelte diff --git a/src/shared/ui/Popover/Popover.svelte b/src/shared/ui/Popover/Popover.svelte new file mode 100644 index 0000000..6ebdb09 --- /dev/null +++ b/src/shared/ui/Popover/Popover.svelte @@ -0,0 +1,196 @@ + + + +{@render trigger(triggerProps)} + +
+ {@render children({ close })} +
diff --git a/src/shared/ui/index.ts b/src/shared/ui/index.ts index d02efb3..8400a36 100644 --- a/src/shared/ui/index.ts +++ b/src/shared/ui/index.ts @@ -94,6 +94,12 @@ export { */ default as PerspectivePlan, } from './PerspectivePlan/PerspectivePlan.svelte'; +export { + /** + * Anchored popover on the native Popover API + */ + default as Popover, +} from './Popover/Popover.svelte'; export { /** * Specialized input with search icon and clear state