@insymetri/styleguide 0.1.71 → 0.1.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
sideOffset?: number
|
|
14
14
|
class?: string
|
|
15
15
|
triggerClass?: string
|
|
16
|
+
/** Strip the default surface (background, border, radius, shadow) — for content that renders its own. */
|
|
17
|
+
unstyled?: boolean
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
let {
|
|
@@ -25,7 +27,12 @@
|
|
|
25
27
|
sideOffset = 4,
|
|
26
28
|
class: className,
|
|
27
29
|
triggerClass,
|
|
30
|
+
unstyled = false,
|
|
28
31
|
}: Props = $props()
|
|
32
|
+
|
|
33
|
+
const surfaceClasses = unstyled
|
|
34
|
+
? ''
|
|
35
|
+
: 'bg-dropdown-bg border border-dropdown-border rounded-10 shadow-dropdown'
|
|
29
36
|
</script>
|
|
30
37
|
|
|
31
38
|
<Popover.Root bind:open {onOpenChange}>
|
|
@@ -38,7 +45,8 @@
|
|
|
38
45
|
{align}
|
|
39
46
|
{sideOffset}
|
|
40
47
|
class={cn(
|
|
41
|
-
|
|
48
|
+
surfaceClasses,
|
|
49
|
+
'z-16 animate-slide-in motion-reduce:animate-none',
|
|
42
50
|
className
|
|
43
51
|
)}
|
|
44
52
|
>
|
|
@@ -9,6 +9,8 @@ type Props = {
|
|
|
9
9
|
sideOffset?: number;
|
|
10
10
|
class?: string;
|
|
11
11
|
triggerClass?: string;
|
|
12
|
+
/** Strip the default surface (background, border, radius, shadow) — for content that renders its own. */
|
|
13
|
+
unstyled?: boolean;
|
|
12
14
|
};
|
|
13
15
|
declare const IIPopover: import("svelte").Component<Props, {}, "open">;
|
|
14
16
|
type IIPopover = ReturnType<typeof IIPopover>;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<IIButton variant="secondary" size="sm">Open Popover</IIButton>
|
|
18
18
|
{/snippet}
|
|
19
19
|
{#snippet content()}
|
|
20
|
-
<div class="flex flex-col gap-8 w-200">
|
|
20
|
+
<div class="flex flex-col gap-8 w-200 p-12">
|
|
21
21
|
<p class="text-small-emphasis text-body">Popover Title</p>
|
|
22
22
|
<p class="text-small text-secondary">This is a basic popover with some content inside.</p>
|
|
23
23
|
</div>
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<IIButton variant="secondary" size="sm">Top</IIButton>
|
|
35
35
|
{/snippet}
|
|
36
36
|
{#snippet content()}
|
|
37
|
-
<p class="text-small text-body">Popover on top</p>
|
|
37
|
+
<p class="text-small text-body p-12">Popover on top</p>
|
|
38
38
|
{/snippet}
|
|
39
39
|
</IIPopover>
|
|
40
40
|
<IIPopover side="right">
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
<IIButton variant="secondary" size="sm">Right</IIButton>
|
|
43
43
|
{/snippet}
|
|
44
44
|
{#snippet content()}
|
|
45
|
-
<p class="text-small text-body">Popover on right</p>
|
|
45
|
+
<p class="text-small text-body p-12">Popover on right</p>
|
|
46
46
|
{/snippet}
|
|
47
47
|
</IIPopover>
|
|
48
48
|
<IIPopover side="bottom">
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
<IIButton variant="secondary" size="sm">Bottom</IIButton>
|
|
51
51
|
{/snippet}
|
|
52
52
|
{#snippet content()}
|
|
53
|
-
<p class="text-small text-body">Popover on bottom</p>
|
|
53
|
+
<p class="text-small text-body p-12">Popover on bottom</p>
|
|
54
54
|
{/snippet}
|
|
55
55
|
</IIPopover>
|
|
56
56
|
<IIPopover side="left">
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
<IIButton variant="secondary" size="sm">Left</IIButton>
|
|
59
59
|
{/snippet}
|
|
60
60
|
{#snippet content()}
|
|
61
|
-
<p class="text-small text-body">Popover on left</p>
|
|
61
|
+
<p class="text-small text-body p-12">Popover on left</p>
|
|
62
62
|
{/snippet}
|
|
63
63
|
</IIPopover>
|
|
64
64
|
</div>
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
<IIIconButton iconName="magnifying-glass" variant="ghost" />
|
|
73
73
|
{/snippet}
|
|
74
74
|
{#snippet content()}
|
|
75
|
-
<div class="flex flex-col gap-8 w-200">
|
|
75
|
+
<div class="flex flex-col gap-8 w-200 p-12">
|
|
76
76
|
<p class="text-small-emphasis text-body">Settings</p>
|
|
77
77
|
<p class="text-small text-secondary">Quick settings panel triggered by an icon button.</p>
|
|
78
78
|
</div>
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
<IIButton variant="primary" size="sm">User Info</IIButton>
|
|
89
89
|
{/snippet}
|
|
90
90
|
{#snippet content()}
|
|
91
|
-
<div class="flex flex-col gap-12 w-240">
|
|
91
|
+
<div class="flex flex-col gap-12 w-240 p-12">
|
|
92
92
|
<div class="flex items-center gap-8">
|
|
93
93
|
<div class="w-32 h-32 rounded-full bg-primary flex items-center justify-center text-inverse text-small-emphasis">JD</div>
|
|
94
94
|
<div>
|