noph-ui 0.11.4 → 0.11.5
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.
|
@@ -51,7 +51,9 @@
|
|
|
51
51
|
}}
|
|
52
52
|
>
|
|
53
53
|
{#if icon && !selected}
|
|
54
|
-
|
|
54
|
+
<div class="np-chip-icon">
|
|
55
|
+
{@render icon()}
|
|
56
|
+
</div>
|
|
55
57
|
{/if}
|
|
56
58
|
{#if selected}
|
|
57
59
|
<CheckIcon width={18} height={18} />
|
|
@@ -108,6 +110,10 @@
|
|
|
108
110
|
padding-left: 1rem;
|
|
109
111
|
padding-right: 1rem;
|
|
110
112
|
}
|
|
113
|
+
.np-chip-icon {
|
|
114
|
+
color: var(--np-color-primary);
|
|
115
|
+
display: flex;
|
|
116
|
+
}
|
|
111
117
|
.np-filter-chip-icon .np-filter-chip-btn {
|
|
112
118
|
padding-left: 0.5rem;
|
|
113
119
|
}
|
|
@@ -24,30 +24,49 @@
|
|
|
24
24
|
}
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
|
-
<div bind:this={element}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
27
|
+
<div bind:this={element} popover="auto" class="np-dialog-container" {...attributes}>
|
|
28
|
+
<div
|
|
29
|
+
role="none"
|
|
30
|
+
class="np-backdrop"
|
|
31
|
+
onclick={() => {
|
|
32
|
+
element?.hidePopover()
|
|
33
|
+
}}
|
|
34
|
+
></div>
|
|
35
|
+
<div class="np-dialog" role="dialog">
|
|
36
|
+
{#if icon}
|
|
37
|
+
<div class="np-dialog-icon">
|
|
38
|
+
{@render icon()}
|
|
39
|
+
</div>
|
|
40
|
+
{/if}
|
|
41
|
+
<h1 class="np-dialog-headline" style={icon ? 'text-align: center' : ''}>{headline}</h1>
|
|
42
|
+
{#if supportingText}
|
|
43
|
+
<p class="np-dialog-supporting-text">{supportingText}</p>
|
|
44
|
+
{/if}
|
|
45
|
+
{#if divider}
|
|
46
|
+
<Divider style="margin-top: 1rem" --np-divider-color="var(--np-color-outline)" />
|
|
47
|
+
{/if}
|
|
48
|
+
{#if children}
|
|
49
|
+
{@render children()}
|
|
50
|
+
{/if}
|
|
51
|
+
{#if buttons}
|
|
52
|
+
<div class="np-dialog-buttons">
|
|
53
|
+
{@render buttons()}
|
|
54
|
+
</div>
|
|
55
|
+
{/if}
|
|
56
|
+
</div>
|
|
48
57
|
</div>
|
|
49
58
|
|
|
50
59
|
<style>
|
|
60
|
+
.np-dialog-container {
|
|
61
|
+
background: transparent;
|
|
62
|
+
border: none;
|
|
63
|
+
padding: 9px 14px 20px 14px;
|
|
64
|
+
z-index: 1000;
|
|
65
|
+
padding: 2rem 1rem;
|
|
66
|
+
transition:
|
|
67
|
+
display 0.25s allow-discrete,
|
|
68
|
+
overlay 0.25s allow-discrete;
|
|
69
|
+
}
|
|
51
70
|
.np-dialog {
|
|
52
71
|
border: 0;
|
|
53
72
|
min-width: 280px;
|
|
@@ -60,26 +79,25 @@
|
|
|
60
79
|
max-height: 100dvh;
|
|
61
80
|
scrollbar-color: var(--np-color-on-surface-variant) transparent;
|
|
62
81
|
scrollbar-width: thin;
|
|
63
|
-
transition:
|
|
64
|
-
display 0.2s allow-discrete,
|
|
65
|
-
overlay 0.2s allow-discrete,
|
|
66
|
-
opacity 0.2s linear;
|
|
82
|
+
transition: opacity 0.25s ease;
|
|
67
83
|
opacity: 0;
|
|
68
|
-
z-index: 1;
|
|
69
84
|
margin: auto;
|
|
85
|
+
position: relative;
|
|
70
86
|
}
|
|
71
|
-
.np-dialog:popover-open {
|
|
87
|
+
.np-dialog-container:popover-open .np-dialog {
|
|
72
88
|
opacity: 1;
|
|
73
89
|
@starting-style {
|
|
74
90
|
opacity: 0;
|
|
75
91
|
}
|
|
76
92
|
}
|
|
77
|
-
.np-dialog[popover]
|
|
93
|
+
.np-dialog-container[popover] .np-backdrop {
|
|
94
|
+
inset: 0;
|
|
95
|
+
position: fixed;
|
|
78
96
|
background-color: var(--np-color-scrim);
|
|
79
97
|
opacity: 0;
|
|
80
|
-
transition: opacity 0.
|
|
98
|
+
transition: opacity 0.25s ease;
|
|
81
99
|
}
|
|
82
|
-
.np-dialog[popover]:popover-open
|
|
100
|
+
.np-dialog-container[popover]:popover-open .np-backdrop {
|
|
83
101
|
opacity: 0.38;
|
|
84
102
|
@starting-style {
|
|
85
103
|
opacity: 0;
|
|
@@ -21,6 +21,15 @@
|
|
|
21
21
|
attributes.class,
|
|
22
22
|
]}
|
|
23
23
|
>
|
|
24
|
+
{#if backdrop}
|
|
25
|
+
<div
|
|
26
|
+
role="none"
|
|
27
|
+
class="np-backdrop"
|
|
28
|
+
onclick={() => {
|
|
29
|
+
element?.hidePopover()
|
|
30
|
+
}}
|
|
31
|
+
></div>
|
|
32
|
+
{/if}
|
|
24
33
|
<div class={['np-navigation-wrapper', modal && 'np-navigation-drawer-shade']}>
|
|
25
34
|
<div class="np-navigation-drawer">
|
|
26
35
|
{#if children}
|
|
@@ -34,9 +43,6 @@
|
|
|
34
43
|
.np-navigation-drawer-container {
|
|
35
44
|
color: var(--np-color-on-surface-variant);
|
|
36
45
|
width: calc(var(--np-navigation-drawer-width, 22.5rem) + 3px);
|
|
37
|
-
overflow: hidden;
|
|
38
|
-
scrollbar-width: thin;
|
|
39
|
-
overflow-y: auto;
|
|
40
46
|
border: 0;
|
|
41
47
|
margin: 0;
|
|
42
48
|
padding: 0;
|
|
@@ -52,16 +58,17 @@
|
|
|
52
58
|
width: var(--np-navigation-drawer-width, 22.5rem);
|
|
53
59
|
height: var(--np-navigation-drawer-height, 100dvh);
|
|
54
60
|
overflow-y: auto;
|
|
61
|
+
scrollbar-width: thin;
|
|
55
62
|
}
|
|
56
63
|
|
|
57
64
|
.np-navigation-drawer-container[popover] .np-navigation-wrapper {
|
|
58
65
|
transform: translateX(-100%);
|
|
59
|
-
transition: transform 0.
|
|
66
|
+
transition: transform 0.25s ease;
|
|
60
67
|
}
|
|
61
68
|
.np-navigation-drawer-container[popover] {
|
|
62
69
|
transition:
|
|
63
|
-
overlay 0.
|
|
64
|
-
display 0.
|
|
70
|
+
overlay 0.25s allow-discrete,
|
|
71
|
+
display 0.25s allow-discrete;
|
|
65
72
|
}
|
|
66
73
|
.np-navigation-drawer-container:popover-open .np-navigation-wrapper {
|
|
67
74
|
transform: translateX(0);
|
|
@@ -77,12 +84,15 @@
|
|
|
77
84
|
.np-navigation-drawer-shade {
|
|
78
85
|
box-shadow: var(--np-elevation-1);
|
|
79
86
|
}
|
|
80
|
-
|
|
87
|
+
|
|
88
|
+
.np-navigation-drawer-backdrop[popover] .np-backdrop {
|
|
89
|
+
inset: 0;
|
|
90
|
+
position: fixed;
|
|
81
91
|
background-color: var(--np-color-scrim);
|
|
82
92
|
opacity: 0;
|
|
83
|
-
transition: opacity 0.
|
|
93
|
+
transition: opacity 0.25s ease;
|
|
84
94
|
}
|
|
85
|
-
.np-navigation-drawer-backdrop[popover]:popover-open
|
|
95
|
+
.np-navigation-drawer-backdrop[popover]:popover-open .np-backdrop {
|
|
86
96
|
opacity: 0.38;
|
|
87
97
|
@starting-style {
|
|
88
98
|
opacity: 0;
|