@streamscloud/kit 0.93.3 → 0.93.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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">import { slideHorizontally, transitionDuration } from '../../core/transitions';
|
|
2
2
|
import PagePanel from './cmp.page-panel.svelte';
|
|
3
3
|
import { untrack } from 'svelte';
|
|
4
|
-
const { panelState, children, sidebarLeft, sidebarRight, sidebarLeftIsValid = true, sidebarRightIsValid = true, title, actionsLeft, actionsCenter, actionsRight, balanceHeaderCenter = false, alignActionsLeftToContent = false, toggle } = $props();
|
|
4
|
+
const { panelState, children, sidebarLeft, sidebarRight, sidebarLeftFooter, sidebarRightFooter, sidebarLeftIsValid = true, sidebarRightIsValid = true, title, actionsLeft, actionsCenter, actionsRight, balanceHeaderCenter = false, alignActionsLeftToContent = false, toggle } = $props();
|
|
5
5
|
let leftPanel = $state(null);
|
|
6
6
|
let rightPanel = $state(null);
|
|
7
7
|
let sidebarLeftWidth = $state(0);
|
|
@@ -93,7 +93,14 @@ $effect(() => {
|
|
|
93
93
|
class="page-panel-sidebars__sidebar page-panel-sidebars__sidebar--left"
|
|
94
94
|
use:sidebarLeftMounted
|
|
95
95
|
transition:slideHorizontally|local={{ duration: transitionDuration.slow }}>
|
|
96
|
-
|
|
96
|
+
<div class="page-panel-sidebars__sidebar-body">
|
|
97
|
+
{@render sidebarLeft()}
|
|
98
|
+
</div>
|
|
99
|
+
{#if sidebarLeftFooter}
|
|
100
|
+
<div class="page-panel-sidebars__sidebar-footer">
|
|
101
|
+
{@render sidebarLeftFooter()}
|
|
102
|
+
</div>
|
|
103
|
+
{/if}
|
|
97
104
|
</div>
|
|
98
105
|
{/if}
|
|
99
106
|
<div class="page-panel-sidebars__main">
|
|
@@ -101,7 +108,14 @@ $effect(() => {
|
|
|
101
108
|
</div>
|
|
102
109
|
{#if sidebarRight && !rightCollapsed}
|
|
103
110
|
<div class="page-panel-sidebars__sidebar page-panel-sidebars__sidebar--right" transition:slideHorizontally|local={{ duration: transitionDuration.slow }}>
|
|
104
|
-
|
|
111
|
+
<div class="page-panel-sidebars__sidebar-body">
|
|
112
|
+
{@render sidebarRight()}
|
|
113
|
+
</div>
|
|
114
|
+
{#if sidebarRightFooter}
|
|
115
|
+
<div class="page-panel-sidebars__sidebar-footer">
|
|
116
|
+
{@render sidebarRightFooter()}
|
|
117
|
+
</div>
|
|
118
|
+
{/if}
|
|
105
119
|
</div>
|
|
106
120
|
{/if}
|
|
107
121
|
</div>
|
|
@@ -123,6 +137,10 @@ content pane begins, and follows that edge as the sidebar resizes, collapses, or
|
|
|
123
137
|
The track starts on the sidebar's divider rather than after it, so a bordered child lands on that
|
|
124
138
|
line instead of doubling it. The collapse button stays put outside that track.
|
|
125
139
|
|
|
140
|
+
`sidebarLeftFooter` / `sidebarRightFooter` stay pinned at the bottom of their sidebar while its body
|
|
141
|
+
scrolls. A footer never widens the sidebar: the width still comes from the sidebar body. The
|
|
142
|
+
footer is bare — padding, dividers and alignment belong to the snippet.
|
|
143
|
+
|
|
126
144
|
### CSS Custom Properties
|
|
127
145
|
| Property | Description | Default |
|
|
128
146
|
|---|---|---|
|
|
@@ -135,48 +153,59 @@ line instead of doubling it. The collapse button stays put outside that track.
|
|
|
135
153
|
overflow: hidden;
|
|
136
154
|
}
|
|
137
155
|
.page-panel-sidebars__sidebar {
|
|
156
|
+
display: flex;
|
|
157
|
+
flex-direction: column;
|
|
158
|
+
flex-shrink: 0;
|
|
159
|
+
overflow: hidden;
|
|
160
|
+
}
|
|
161
|
+
.page-panel-sidebars__sidebar--left {
|
|
162
|
+
border-right: 1px solid var(--_page-panel-sidebars--border-color);
|
|
163
|
+
}
|
|
164
|
+
.page-panel-sidebars__sidebar--right {
|
|
165
|
+
border-left: 1px solid var(--_page-panel-sidebars--border-color);
|
|
166
|
+
}
|
|
167
|
+
.page-panel-sidebars__sidebar-body {
|
|
168
|
+
flex: 1;
|
|
169
|
+
min-height: 0;
|
|
138
170
|
overflow-y: auto;
|
|
139
171
|
overflow-x: clip;
|
|
140
|
-
flex-shrink: 0;
|
|
141
172
|
--_cross-browser-scrollbar--thumb-color: transparent;
|
|
142
173
|
--_cross-browser-scrollbar--track-color: transparent;
|
|
143
174
|
}
|
|
144
|
-
.page-panel-sidebars__sidebar:hover {
|
|
175
|
+
.page-panel-sidebars__sidebar-body:hover {
|
|
145
176
|
--_cross-browser-scrollbar--thumb-color: var(--sc-kit--color--border--strong);
|
|
146
177
|
--_cross-browser-scrollbar--track-color: var(--scrollbar--track-color, transparent);
|
|
147
178
|
}
|
|
148
|
-
.page-panel-sidebars__sidebar {
|
|
179
|
+
.page-panel-sidebars__sidebar-body {
|
|
149
180
|
--_cross-browser-scrollbar--gutter: 0px;
|
|
150
181
|
}
|
|
151
182
|
@supports selector(::-webkit-scrollbar) {
|
|
152
|
-
.page-panel-sidebars__sidebar {
|
|
183
|
+
.page-panel-sidebars__sidebar-body {
|
|
153
184
|
scrollbar-color: auto;
|
|
154
185
|
scrollbar-width: auto;
|
|
155
186
|
}
|
|
156
|
-
.page-panel-sidebars__sidebar::-webkit-scrollbar {
|
|
187
|
+
.page-panel-sidebars__sidebar-body::-webkit-scrollbar {
|
|
157
188
|
width: 6px;
|
|
158
189
|
height: 6px;
|
|
159
190
|
}
|
|
160
|
-
.page-panel-sidebars__sidebar::-webkit-scrollbar-track {
|
|
191
|
+
.page-panel-sidebars__sidebar-body::-webkit-scrollbar-track {
|
|
161
192
|
background: var(--_cross-browser-scrollbar--track-color);
|
|
162
193
|
border-radius: 100vw;
|
|
163
194
|
}
|
|
164
|
-
.page-panel-sidebars__sidebar::-webkit-scrollbar-thumb {
|
|
195
|
+
.page-panel-sidebars__sidebar-body::-webkit-scrollbar-thumb {
|
|
165
196
|
background: var(--_cross-browser-scrollbar--thumb-color);
|
|
166
197
|
border-radius: 100vw;
|
|
167
198
|
}
|
|
168
199
|
}
|
|
169
200
|
@supports not selector(::-webkit-scrollbar) {
|
|
170
|
-
.page-panel-sidebars__sidebar {
|
|
201
|
+
.page-panel-sidebars__sidebar-body {
|
|
171
202
|
scrollbar-color: var(--_cross-browser-scrollbar--thumb-color) var(--_cross-browser-scrollbar--track-color);
|
|
172
203
|
scrollbar-width: thin;
|
|
173
204
|
}
|
|
174
205
|
}
|
|
175
|
-
.page-panel-sidebars__sidebar
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
.page-panel-sidebars__sidebar--right {
|
|
179
|
-
border-left: 1px solid var(--_page-panel-sidebars--border-color);
|
|
206
|
+
.page-panel-sidebars__sidebar-footer {
|
|
207
|
+
flex-shrink: 0;
|
|
208
|
+
contain: inline-size;
|
|
180
209
|
}
|
|
181
210
|
.page-panel-sidebars__main {
|
|
182
211
|
flex: 1;
|
|
@@ -7,6 +7,10 @@ type Props = {
|
|
|
7
7
|
title?: string | Snippet;
|
|
8
8
|
sidebarLeft?: Snippet;
|
|
9
9
|
sidebarRight?: Snippet;
|
|
10
|
+
/** Pinned under the left sidebar's scrolling body; slides and collapses with the sidebar. */
|
|
11
|
+
sidebarLeftFooter?: Snippet;
|
|
12
|
+
/** Pinned under the right sidebar's scrolling body; slides and collapses with the sidebar. */
|
|
13
|
+
sidebarRightFooter?: Snippet;
|
|
10
14
|
sidebarLeftIsValid?: boolean;
|
|
11
15
|
sidebarRightIsValid?: boolean;
|
|
12
16
|
actionsLeft?: Snippet;
|
|
@@ -34,6 +38,10 @@ type Props = {
|
|
|
34
38
|
* The track starts on the sidebar's divider rather than after it, so a bordered child lands on that
|
|
35
39
|
* line instead of doubling it. The collapse button stays put outside that track.
|
|
36
40
|
*
|
|
41
|
+
* `sidebarLeftFooter` / `sidebarRightFooter` stay pinned at the bottom of their sidebar while its body
|
|
42
|
+
* scrolls. A footer never widens the sidebar: the width still comes from the sidebar body. The
|
|
43
|
+
* footer is bare — padding, dividers and alignment belong to the snippet.
|
|
44
|
+
*
|
|
37
45
|
* ### CSS Custom Properties
|
|
38
46
|
* | Property | Description | Default |
|
|
39
47
|
* |---|---|---|
|
|
@@ -53,7 +53,7 @@ whose action exists but is currently unavailable.
|
|
|
53
53
|
| `--sc-kit--popover-item--color--disabled` | Disabled text color | `var(--sc-kit--color--text--muted)` |
|
|
54
54
|
| `--sc-kit--popover-item--background--hover` | Hover background | `var(--sc-kit--color--bg--hover)` |
|
|
55
55
|
| `--sc-kit--popover-item--divider-color` | Divider line color | `var(--sc-kit--color--border)` |
|
|
56
|
-
| `--sc-kit--popover-item--divider-spacing` |
|
|
56
|
+
| `--sc-kit--popover-item--divider-spacing` | Gap on each side of the divider line | `var(--sc-kit--space--1)` |
|
|
57
57
|
| `--sc-kit--popover-item--text-align` | Text alignment | `left` |
|
|
58
58
|
| `--sc-kit--popover-item--margin-inline` | Inline margin when `inset` (default on) | `var(--sc-kit--space--2)` |
|
|
59
59
|
| `--sc-kit--popover-item--border-radius` | Corner radius when `inset` (default on) | `var(--sc-kit--radius--sm)` |
|
|
@@ -97,11 +97,20 @@ whose action exists but is currently unavailable.
|
|
|
97
97
|
cursor: default;
|
|
98
98
|
}
|
|
99
99
|
.popover-item--divider {
|
|
100
|
-
|
|
101
|
-
margin-bottom: var(--_di--divider-spacing);
|
|
102
|
-
|
|
100
|
+
position: relative;
|
|
101
|
+
margin-bottom: calc(2 * var(--_di--divider-spacing) + 1px);
|
|
102
|
+
}
|
|
103
|
+
.popover-item--divider::after {
|
|
104
|
+
content: "";
|
|
105
|
+
position: absolute;
|
|
106
|
+
inset-inline: var(--_di--divider-inset-inline, 0);
|
|
107
|
+
bottom: calc(-1 * var(--_di--divider-spacing) - 1px);
|
|
108
|
+
height: 1px;
|
|
109
|
+
background: var(--_di--divider-color);
|
|
110
|
+
pointer-events: none;
|
|
103
111
|
}
|
|
104
112
|
.popover-item--inset {
|
|
113
|
+
--_di--divider-inset-inline: calc(-1 * var(--_di--margin-inline));
|
|
105
114
|
margin-inline: var(--_di--margin-inline);
|
|
106
115
|
border-radius: var(--_di--border-radius);
|
|
107
116
|
}
|
|
@@ -35,7 +35,7 @@ type Props = {
|
|
|
35
35
|
* | `--sc-kit--popover-item--color--disabled` | Disabled text color | `var(--sc-kit--color--text--muted)` |
|
|
36
36
|
* | `--sc-kit--popover-item--background--hover` | Hover background | `var(--sc-kit--color--bg--hover)` |
|
|
37
37
|
* | `--sc-kit--popover-item--divider-color` | Divider line color | `var(--sc-kit--color--border)` |
|
|
38
|
-
* | `--sc-kit--popover-item--divider-spacing` |
|
|
38
|
+
* | `--sc-kit--popover-item--divider-spacing` | Gap on each side of the divider line | `var(--sc-kit--space--1)` |
|
|
39
39
|
* | `--sc-kit--popover-item--text-align` | Text alignment | `left` |
|
|
40
40
|
* | `--sc-kit--popover-item--margin-inline` | Inline margin when `inset` (default on) | `var(--sc-kit--space--2)` |
|
|
41
41
|
* | `--sc-kit--popover-item--border-radius` | Corner radius when `inset` (default on) | `var(--sc-kit--radius--sm)` |
|