@skewedaspect/sleekspace-ui 0.7.1 → 0.8.1
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.
- package/dist/components/Button/SkButton.vue.d.ts +8 -0
- package/dist/components/NavBar/SkNavBar.vue.d.ts +1 -0
- package/dist/components/NavBar/context.d.ts +3 -0
- package/dist/components/Page/SkPage.vue.d.ts +127 -30
- package/dist/components/Page/SkPageSidebarToggle.vue.d.ts +41 -0
- package/dist/components/Page/index.d.ts +1 -0
- package/dist/components/Page/types.d.ts +28 -5
- package/dist/components/ScrollArea/SkScrollArea.vue.d.ts +9 -0
- package/dist/components/Select/SkSelectItem.vue.d.ts +6 -18
- package/dist/components/Sidebar/SkSidebar.vue.d.ts +9 -1
- package/dist/components/Skeleton/SkSkeleton.vue.d.ts +2 -2
- package/dist/components/Tabs/SkTabs.vue.d.ts +1 -1
- package/dist/components/TreeView/SkTreeView.vue.d.ts +5 -5
- package/dist/composables/useFocusTrap.d.ts +17 -0
- package/dist/composables/useFocusTrap.test.d.ts +1 -0
- package/dist/composables/usePageDrawer.d.ts +35 -0
- package/dist/index.d.ts +2 -0
- package/dist/sleekspace-ui.css +984 -291
- package/dist/sleekspace-ui.es.js +31559 -29868
- package/dist/sleekspace-ui.umd.js +32210 -30438
- package/dist/styles/mixins/fluidSize.test.d.ts +1 -0
- package/dist/tokens.css +60 -0
- package/llms-full.txt +6349 -0
- package/llms.txt +46 -0
- package/package.json +16 -11
- package/src/components/Button/SkButton.vue +25 -13
- package/src/components/NavBar/SkNavBar.vue +12 -1
- package/src/components/NavBar/context.ts +16 -0
- package/src/components/Page/SkPage.vue +460 -72
- package/src/components/Page/SkPageSidebarToggle.vue +148 -0
- package/src/components/Page/index.ts +1 -0
- package/src/components/Page/types.ts +30 -5
- package/src/components/ScrollArea/SkScrollArea.vue +12 -0
- package/src/components/Select/SkSelectItem.vue +2 -2
- package/src/components/Sidebar/SkSidebar.vue +10 -0
- package/src/components/TreeView/SkTreeView.vue +6 -6
- package/src/composables/useFocusTrap.test.ts +184 -0
- package/src/composables/useFocusTrap.ts +141 -0
- package/src/composables/usePageDrawer.ts +96 -0
- package/src/global.d.ts +1 -0
- package/src/index.ts +5 -0
- package/src/styles/components/_accordion.scss +15 -0
- package/src/styles/components/_alert.scss +1 -0
- package/src/styles/components/_avatar.scss +1 -0
- package/src/styles/components/_breadcrumbs.scss +7 -0
- package/src/styles/components/_button.scss +291 -214
- package/src/styles/components/_checkbox.scss +9 -1
- package/src/styles/components/_collapsible.scss +15 -0
- package/src/styles/components/_color-picker.scss +4 -1
- package/src/styles/components/_input.scss +1 -0
- package/src/styles/components/_listbox.scss +8 -2
- package/src/styles/components/_menu.scss +9 -2
- package/src/styles/components/_modal.scss +18 -2
- package/src/styles/components/_navbar.scss +22 -6
- package/src/styles/components/_number-input.scss +1 -0
- package/src/styles/components/_page.scss +220 -12
- package/src/styles/components/_pagination.scss +10 -1
- package/src/styles/components/_panel.scss +8 -3
- package/src/styles/components/_popover.scss +15 -2
- package/src/styles/components/_progress.scss +14 -0
- package/src/styles/components/_radio.scss +8 -1
- package/src/styles/components/_scroll-area.scss +56 -0
- package/src/styles/components/_select.scss +3 -1
- package/src/styles/components/_sidebar.scss +78 -38
- package/src/styles/components/_skeleton.scss +18 -0
- package/src/styles/components/_slider.scss +1 -0
- package/src/styles/components/_spinner.scss +15 -0
- package/src/styles/components/_switch.scss +5 -0
- package/src/styles/components/_table.scss +1 -0
- package/src/styles/components/_tabs.scss +6 -0
- package/src/styles/components/_tag.scss +2 -0
- package/src/styles/components/_tags-input.scss +1 -0
- package/src/styles/components/_textarea.scss +1 -0
- package/src/styles/components/_toast.scss +16 -1
- package/src/styles/components/_toolbar.scss +2 -0
- package/src/styles/components/_tooltip.scss +14 -1
- package/src/styles/components/_tree-view.scss +6 -1
- package/src/styles/mixins/_index.scss +1 -0
- package/src/styles/mixins/_responsive.scss +184 -0
- package/src/styles/mixins/fluidSize.test.ts +149 -0
- package/src/styles/tokens/_foundation-breakpoints.scss +26 -0
- package/src/styles/tokens/_foundation-z-index.scss +38 -0
- package/src/styles/tokens/index.scss +2 -0
- package/web-types.json +194 -14
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '@/styles/mixins
|
|
1
|
+
@use '@/styles/mixins' as *;
|
|
2
2
|
|
|
3
3
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
4
|
// Checkbox Component Styles
|
|
@@ -11,6 +11,13 @@
|
|
|
11
11
|
gap: var(--sk-space-xs);
|
|
12
12
|
cursor: pointer;
|
|
13
13
|
|
|
14
|
+
// Coarse-pointer touch-target floor on the label+box wrapper.
|
|
15
|
+
// The checkbox itself stays small; the whole label becomes the tap area.
|
|
16
|
+
@include touch
|
|
17
|
+
{
|
|
18
|
+
min-height: 44px;
|
|
19
|
+
}
|
|
20
|
+
|
|
14
21
|
&.sk-disabled
|
|
15
22
|
{
|
|
16
23
|
cursor: not-allowed;
|
|
@@ -29,6 +36,7 @@
|
|
|
29
36
|
// Corner cut size (scales with size variant)
|
|
30
37
|
--sk-checkbox-cut: 0.25rem;
|
|
31
38
|
|
|
39
|
+
position: relative;
|
|
32
40
|
display: inline-flex;
|
|
33
41
|
align-items: center;
|
|
34
42
|
justify-content: center;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use '@/styles/mixins/cut-border' as *;
|
|
2
|
+
@use '@/styles/mixins/responsive' as *;
|
|
2
3
|
|
|
3
4
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
5
|
// Collapsible Component Styles
|
|
@@ -107,6 +108,7 @@
|
|
|
107
108
|
#000 46.25%
|
|
108
109
|
);
|
|
109
110
|
|
|
111
|
+
position: relative;
|
|
110
112
|
padding: var(--sk-space-md) var(--sk-space-lg);
|
|
111
113
|
width: 100%;
|
|
112
114
|
|
|
@@ -156,3 +158,16 @@
|
|
|
156
158
|
}
|
|
157
159
|
|
|
158
160
|
//----------------------------------------------------------------------------------------------------------------------
|
|
161
|
+
// Reduced motion: content snaps open/closed instead of sliding.
|
|
162
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
163
|
+
|
|
164
|
+
@include reduced-motion
|
|
165
|
+
{
|
|
166
|
+
.sk-collapsible-content[data-state='open'],
|
|
167
|
+
.sk-collapsible-content[data-state='closed']
|
|
168
|
+
{
|
|
169
|
+
animation: none;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -184,6 +184,7 @@
|
|
|
184
184
|
|
|
185
185
|
.sk-color-picker-swatch
|
|
186
186
|
{
|
|
187
|
+
position: relative;
|
|
187
188
|
flex-shrink: 0;
|
|
188
189
|
|
|
189
190
|
@include cut-border(
|
|
@@ -304,11 +305,12 @@
|
|
|
304
305
|
--sk-panel-color-base: var(--sk-neutral-base);
|
|
305
306
|
--sk-panel-fg: var(--sk-neutral-text);
|
|
306
307
|
|
|
308
|
+
position: relative;
|
|
307
309
|
display: flex;
|
|
308
310
|
flex-direction: column;
|
|
309
311
|
gap: var(--sk-space-sm);
|
|
310
312
|
padding: var(--sk-space-md);
|
|
311
|
-
z-index:
|
|
313
|
+
z-index: var(--sk-z-popover);
|
|
312
314
|
width: 17rem;
|
|
313
315
|
|
|
314
316
|
@include cut-border(
|
|
@@ -482,6 +484,7 @@
|
|
|
482
484
|
|
|
483
485
|
.sk-color-picker-format-btn
|
|
484
486
|
{
|
|
487
|
+
position: relative;
|
|
485
488
|
flex: 1;
|
|
486
489
|
padding: var(--sk-space-3xs) var(--sk-space-xs);
|
|
487
490
|
font-size: 0.6875rem;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '@/styles/mixins
|
|
1
|
+
@use '@/styles/mixins' as *;
|
|
2
2
|
|
|
3
3
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
4
|
// Listbox Component Styles
|
|
@@ -263,7 +263,7 @@
|
|
|
263
263
|
max-height: 20rem;
|
|
264
264
|
overflow: auto;
|
|
265
265
|
padding: var(--sk-space-xs);
|
|
266
|
-
z-index:
|
|
266
|
+
z-index: var(--sk-z-dropdown);
|
|
267
267
|
|
|
268
268
|
@include cut-border(
|
|
269
269
|
$cut: 0.625rem,
|
|
@@ -378,6 +378,7 @@
|
|
|
378
378
|
|
|
379
379
|
.sk-listbox-item
|
|
380
380
|
{
|
|
381
|
+
position: relative;
|
|
381
382
|
display: flex;
|
|
382
383
|
align-items: center;
|
|
383
384
|
justify-content: space-between;
|
|
@@ -389,6 +390,11 @@
|
|
|
389
390
|
outline: none;
|
|
390
391
|
user-select: none;
|
|
391
392
|
|
|
393
|
+
@include touch
|
|
394
|
+
{
|
|
395
|
+
min-height: 44px;
|
|
396
|
+
}
|
|
397
|
+
|
|
392
398
|
@include cut-border(
|
|
393
399
|
$cut: 0.5rem,
|
|
394
400
|
$border-width: var(--sk-border-width-thin),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '@/styles/mixins
|
|
1
|
+
@use '@/styles/mixins' as *;
|
|
2
2
|
|
|
3
3
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
4
|
// Shared Menu Styles
|
|
@@ -12,9 +12,10 @@
|
|
|
12
12
|
--sk-menu-color-base: var(--sk-neutral-base);
|
|
13
13
|
--sk-menu-fg: var(--sk-neutral-text);
|
|
14
14
|
|
|
15
|
+
position: relative;
|
|
15
16
|
min-width: 12rem;
|
|
16
17
|
padding: var(--sk-space-xs);
|
|
17
|
-
z-index:
|
|
18
|
+
z-index: var(--sk-z-dropdown);
|
|
18
19
|
|
|
19
20
|
@include cut-border(
|
|
20
21
|
$cut: 0.625rem,
|
|
@@ -133,6 +134,7 @@
|
|
|
133
134
|
|
|
134
135
|
.sk-menu-item
|
|
135
136
|
{
|
|
137
|
+
position: relative;
|
|
136
138
|
display: flex;
|
|
137
139
|
align-items: center;
|
|
138
140
|
justify-content: space-between;
|
|
@@ -144,6 +146,11 @@
|
|
|
144
146
|
outline: none;
|
|
145
147
|
user-select: none;
|
|
146
148
|
|
|
149
|
+
@include touch
|
|
150
|
+
{
|
|
151
|
+
min-height: 44px;
|
|
152
|
+
}
|
|
153
|
+
|
|
147
154
|
@include cut-border(
|
|
148
155
|
$cut: 0.5rem,
|
|
149
156
|
$border-width: var(--sk-border-width-thin),
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
position: fixed;
|
|
111
111
|
inset: 0;
|
|
112
112
|
background: oklch(0 0 0 / 0.75);
|
|
113
|
-
z-index:
|
|
113
|
+
z-index: var(--sk-z-modal-scrim);
|
|
114
114
|
backdrop-filter: blur(2px);
|
|
115
115
|
|
|
116
116
|
// Overlay animation
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
top: 50%;
|
|
144
144
|
left: 50%;
|
|
145
145
|
transform: translate(-50%, -50%);
|
|
146
|
-
z-index:
|
|
146
|
+
z-index: var(--sk-z-modal);
|
|
147
147
|
|
|
148
148
|
display: flex;
|
|
149
149
|
flex-direction: column;
|
|
@@ -327,3 +327,19 @@
|
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
//----------------------------------------------------------------------------------------------------------------------
|
|
330
|
+
// Reduced motion: collapse the entry/exit animations so the modal appears in place instead of
|
|
331
|
+
// zooming + translating.
|
|
332
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
333
|
+
|
|
334
|
+
@include reduced-motion
|
|
335
|
+
{
|
|
336
|
+
.sk-modal-overlay[data-state='open'],
|
|
337
|
+
.sk-modal-overlay[data-state='closed'],
|
|
338
|
+
.sk-modal-content[data-state='open'],
|
|
339
|
+
.sk-modal-content[data-state='closed']
|
|
340
|
+
{
|
|
341
|
+
animation: none;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
{
|
|
145
145
|
position: sticky;
|
|
146
146
|
top: 0;
|
|
147
|
-
z-index:
|
|
147
|
+
z-index: var(--sk-z-sticky);
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -153,15 +153,29 @@
|
|
|
153
153
|
|
|
154
154
|
.sk-navbar-content
|
|
155
155
|
{
|
|
156
|
+
// No justify-content: leading + brand flow from the left, nav fills the middle when present,
|
|
157
|
+
// and .sk-navbar-actions uses margin-left: auto to pin itself right regardless of which other
|
|
158
|
+
// slots are filled. Avoids space-between splaying brand to the far edge when only leading is
|
|
159
|
+
// also present.
|
|
156
160
|
display: flex;
|
|
157
161
|
align-items: center;
|
|
158
|
-
|
|
159
|
-
gap: 2rem;
|
|
162
|
+
gap: 1rem;
|
|
160
163
|
padding: var(--sk-navbar-padding-y) var(--sk-navbar-padding-x);
|
|
161
164
|
max-width: 1920px;
|
|
162
165
|
margin: 0 auto;
|
|
163
166
|
}
|
|
164
167
|
|
|
168
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
169
|
+
// Leading section (far-left, before brand; typically the sidebar toggle)
|
|
170
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
171
|
+
|
|
172
|
+
.sk-navbar-leading
|
|
173
|
+
{
|
|
174
|
+
display: flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
flex-shrink: 0;
|
|
177
|
+
}
|
|
178
|
+
|
|
165
179
|
//------------------------------------------------------------------------------------------------------------------
|
|
166
180
|
// Brand section
|
|
167
181
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -172,7 +186,7 @@
|
|
|
172
186
|
align-items: center;
|
|
173
187
|
flex-shrink: 0;
|
|
174
188
|
|
|
175
|
-
// Brand link styling
|
|
189
|
+
// Brand link styling -- inherits navbar foreground so the kind drives it.
|
|
176
190
|
a
|
|
177
191
|
{
|
|
178
192
|
text-decoration: none;
|
|
@@ -180,7 +194,7 @@
|
|
|
180
194
|
|
|
181
195
|
&:hover h1
|
|
182
196
|
{
|
|
183
|
-
color: var(--sk-
|
|
197
|
+
color: var(--sk-navbar-color-base);
|
|
184
198
|
}
|
|
185
199
|
}
|
|
186
200
|
|
|
@@ -189,7 +203,7 @@
|
|
|
189
203
|
margin: 0;
|
|
190
204
|
font-size: 1.5rem;
|
|
191
205
|
font-weight: 600;
|
|
192
|
-
color:
|
|
206
|
+
color: inherit;
|
|
193
207
|
transition: color var(--sk-transition-fast);
|
|
194
208
|
}
|
|
195
209
|
}
|
|
@@ -238,11 +252,13 @@
|
|
|
238
252
|
|
|
239
253
|
.sk-navbar-actions
|
|
240
254
|
{
|
|
255
|
+
// margin-left: auto pins actions to the right whether or not the nav slot is filled.
|
|
241
256
|
display: flex;
|
|
242
257
|
align-items: center;
|
|
243
258
|
justify-content: flex-end;
|
|
244
259
|
gap: 1rem;
|
|
245
260
|
flex-shrink: 0;
|
|
261
|
+
margin-left: auto;
|
|
246
262
|
}
|
|
247
263
|
|
|
248
264
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -2,16 +2,44 @@
|
|
|
2
2
|
// Page Component Styles
|
|
3
3
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
+
@use '../mixins' as *;
|
|
6
|
+
|
|
5
7
|
.sk-page
|
|
6
8
|
{
|
|
7
9
|
// CSS Variables
|
|
8
10
|
--sk-page-header-height: auto;
|
|
9
11
|
--sk-page-footer-height: auto;
|
|
10
12
|
--sk-page-sidebar-width: 16rem;
|
|
13
|
+
--sk-page-aside-width: 16rem;
|
|
14
|
+
// Retained for backwards compatibility; prefer `--sk-z-drawer` / `--sk-z-drawer-scrim`.
|
|
15
|
+
--sk-page-drawer-z-index: var(--sk-z-drawer);
|
|
16
|
+
|
|
17
|
+
// Minimum page height. Default fills the viewport; embedded demos inside fixed-height
|
|
18
|
+
// containers should override this to `100%` so SkPage respects its parent.
|
|
19
|
+
--sk-page-min-height: 100vh;
|
|
20
|
+
|
|
21
|
+
// Breathing room between the main row and the surrounding header/footer/edges/sidebar.
|
|
22
|
+
// `.sk-page-main` applies this as padding; the center content fills it without adding its own.
|
|
23
|
+
// Use the `flush` prop (or override `--sk-page-gap: 0`) for a full-bleed layout.
|
|
24
|
+
--sk-page-gap: 1rem;
|
|
25
|
+
|
|
26
|
+
&.sk-flush
|
|
27
|
+
{
|
|
28
|
+
--sk-page-gap: 0;
|
|
29
|
+
}
|
|
11
30
|
|
|
31
|
+
// position: relative so drawers (absolute) are bounded by the page, not the viewport. In
|
|
32
|
+
// full-viewport usage this naturally covers the screen; in embedded usage (e.g. docs demos)
|
|
33
|
+
// the drawer stays inside the page container.
|
|
34
|
+
//
|
|
35
|
+
// isolation: isolate creates a new stacking context so an embedded SkPage's sticky header
|
|
36
|
+
// can't punch through an enclosing SkPage's header (same z-index, DOM order would otherwise
|
|
37
|
+
// make the inner one win on overlap).
|
|
38
|
+
position: relative;
|
|
39
|
+
isolation: isolate;
|
|
12
40
|
display: flex;
|
|
13
41
|
flex-direction: column;
|
|
14
|
-
min-height:
|
|
42
|
+
min-height: var(--sk-page-min-height);
|
|
15
43
|
background: var(--sk-surface-base);
|
|
16
44
|
color: var(--sk-text-primary);
|
|
17
45
|
|
|
@@ -35,44 +63,107 @@
|
|
|
35
63
|
}
|
|
36
64
|
|
|
37
65
|
//------------------------------------------------------------------------------------------------------------------
|
|
38
|
-
//
|
|
66
|
+
// Subheader (full-width row below header, above the main row)
|
|
67
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
68
|
+
|
|
69
|
+
.sk-page-subheader
|
|
70
|
+
{
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
z-index: 9;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
76
|
+
// Main row: sidebar + center column + aside
|
|
39
77
|
//------------------------------------------------------------------------------------------------------------------
|
|
40
78
|
|
|
41
79
|
.sk-page-main
|
|
42
80
|
{
|
|
43
81
|
display: flex;
|
|
44
82
|
flex: 1;
|
|
45
|
-
min-height: 0;
|
|
83
|
+
min-height: 0;
|
|
84
|
+
padding: var(--sk-page-gap);
|
|
85
|
+
gap: var(--sk-page-gap);
|
|
46
86
|
}
|
|
47
87
|
|
|
48
88
|
//------------------------------------------------------------------------------------------------------------------
|
|
49
|
-
// Sidebar
|
|
89
|
+
// Persistent Sidebar (inline). Header and footer are pinned; body scrolls.
|
|
50
90
|
//------------------------------------------------------------------------------------------------------------------
|
|
51
91
|
|
|
52
92
|
.sk-page-sidebar
|
|
53
93
|
{
|
|
54
94
|
flex-shrink: 0;
|
|
55
|
-
|
|
56
|
-
|
|
95
|
+
display: flex;
|
|
96
|
+
flex-direction: column;
|
|
97
|
+
min-height: 0;
|
|
57
98
|
}
|
|
58
99
|
|
|
59
|
-
|
|
100
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
101
|
+
// Center column: main-header + content + main-footer. Content scrolls, the other two are pinned.
|
|
102
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
103
|
+
|
|
104
|
+
.sk-page-center
|
|
60
105
|
{
|
|
61
|
-
|
|
106
|
+
flex: 1;
|
|
107
|
+
min-width: 0;
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
|
|
111
|
+
.sk-page-main-header,
|
|
112
|
+
.sk-page-main-footer
|
|
62
113
|
{
|
|
63
|
-
flex-
|
|
114
|
+
flex-shrink: 0;
|
|
64
115
|
}
|
|
65
116
|
}
|
|
66
117
|
|
|
118
|
+
.sk-page-content
|
|
119
|
+
{
|
|
120
|
+
flex: 1;
|
|
121
|
+
min-height: 0;
|
|
122
|
+
overflow-y: auto;
|
|
123
|
+
}
|
|
124
|
+
|
|
67
125
|
//------------------------------------------------------------------------------------------------------------------
|
|
68
|
-
//
|
|
126
|
+
// Persistent Aside (inline, right side). Mirrors the sidebar's structure.
|
|
69
127
|
//------------------------------------------------------------------------------------------------------------------
|
|
70
128
|
|
|
71
|
-
.sk-page-
|
|
129
|
+
.sk-page-aside
|
|
130
|
+
{
|
|
131
|
+
flex-shrink: 0;
|
|
132
|
+
display: flex;
|
|
133
|
+
flex-direction: column;
|
|
134
|
+
min-height: 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
138
|
+
// Panel (sidebar/aside) header+body+footer layout — applied to both persistent and drawer variants
|
|
139
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
140
|
+
|
|
141
|
+
.sk-page-sidebar-header,
|
|
142
|
+
.sk-page-sidebar-footer,
|
|
143
|
+
.sk-page-aside-header,
|
|
144
|
+
.sk-page-aside-footer
|
|
145
|
+
{
|
|
146
|
+
flex-shrink: 0;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.sk-page-sidebar-body,
|
|
150
|
+
.sk-page-aside-body
|
|
72
151
|
{
|
|
73
152
|
flex: 1;
|
|
74
|
-
min-
|
|
153
|
+
min-height: 0;
|
|
75
154
|
overflow-y: auto;
|
|
155
|
+
|
|
156
|
+
// Stretch the slotted chrome (e.g. SkSidebar) so it fills the body vertically instead of
|
|
157
|
+
// ending at its intrinsic content height -- otherwise the drawer shows a transparent dead
|
|
158
|
+
// zone below the sidebar with the backdrop bleeding through.
|
|
159
|
+
display: flex;
|
|
160
|
+
flex-direction: column;
|
|
161
|
+
|
|
162
|
+
> *
|
|
163
|
+
{
|
|
164
|
+
flex: 1;
|
|
165
|
+
min-height: 0;
|
|
166
|
+
}
|
|
76
167
|
}
|
|
77
168
|
|
|
78
169
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -93,6 +184,123 @@
|
|
|
93
184
|
bottom: 0;
|
|
94
185
|
}
|
|
95
186
|
}
|
|
187
|
+
|
|
188
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
189
|
+
// Drawer (off-canvas). One ruleset serves both sides; positioning differs per class.
|
|
190
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
191
|
+
|
|
192
|
+
.sk-page-drawer
|
|
193
|
+
{
|
|
194
|
+
// `position: fixed` anchors the drawer to the viewport so it stays put while the user
|
|
195
|
+
// scrolls the page. Without this the drawer inherits the full (content-tall) height of
|
|
196
|
+
// SkPage, so on long pages the background ends up scrolling instead of the drawer body.
|
|
197
|
+
// Fixed + dvh caps keep the drawer viewport-sized so its own body (overflow-y: auto)
|
|
198
|
+
// handles any long nav internally. Wrap embedded usages in `contain: paint` if you need
|
|
199
|
+
// the drawer trapped to a specific ancestor (see the docs-site demo wrappers).
|
|
200
|
+
//
|
|
201
|
+
// Pointer-events stay `auto` across the drawer so wheel + touch scroll work inside the
|
|
202
|
+
// body. Dismiss-on-empty-space is handled via a click handler in SkPage.vue that closes
|
|
203
|
+
// the drawer when the click target wasn't an interactive element; empty padding inside
|
|
204
|
+
// the slotted content still dismisses cleanly without wrecking scroll.
|
|
205
|
+
position: fixed;
|
|
206
|
+
top: 0;
|
|
207
|
+
bottom: 0;
|
|
208
|
+
max-height: 100dvh;
|
|
209
|
+
width: var(--sk-page-sidebar-width);
|
|
210
|
+
max-width: calc(100vw - 3rem);
|
|
211
|
+
z-index: var(--sk-z-drawer);
|
|
212
|
+
background: transparent;
|
|
213
|
+
display: flex;
|
|
214
|
+
flex-direction: column;
|
|
215
|
+
|
|
216
|
+
&.sk-page-drawer-left
|
|
217
|
+
{
|
|
218
|
+
left: 0;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
&.sk-page-drawer-right
|
|
222
|
+
{
|
|
223
|
+
right: 0;
|
|
224
|
+
width: var(--sk-page-aside-width);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&:focus
|
|
228
|
+
{
|
|
229
|
+
outline: none;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.sk-page-drawer-backdrop
|
|
234
|
+
{
|
|
235
|
+
// Fixed (viewport-anchored) to match the drawer: the dim + blur covers the whole screen
|
|
236
|
+
// regardless of page scroll, and the backdrop doesn't stretch to match a content-tall
|
|
237
|
+
// SkPage.
|
|
238
|
+
position: fixed;
|
|
239
|
+
inset: 0;
|
|
240
|
+
z-index: var(--sk-z-drawer-scrim);
|
|
241
|
+
background: oklch(0 0 0 / 0.6);
|
|
242
|
+
backdrop-filter: blur(2px);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
247
|
+
// Drawer Transitions (left and right slide-in variants)
|
|
248
|
+
//
|
|
249
|
+
// Reduced motion: collapses both enter and leave to zero-duration, so the drawer still appears/
|
|
250
|
+
// disappears, it just doesn't slide or fade.
|
|
251
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
252
|
+
|
|
253
|
+
.sk-page-drawer-left-enter-active,
|
|
254
|
+
.sk-page-drawer-left-leave-active,
|
|
255
|
+
.sk-page-drawer-right-enter-active,
|
|
256
|
+
.sk-page-drawer-right-leave-active
|
|
257
|
+
{
|
|
258
|
+
transition: transform var(--sk-transition-duration-normal) var(--sk-transition-easing);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.sk-page-drawer-left-enter-from,
|
|
262
|
+
.sk-page-drawer-left-leave-to
|
|
263
|
+
{
|
|
264
|
+
transform: translateX(-100%);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.sk-page-drawer-right-enter-from,
|
|
268
|
+
.sk-page-drawer-right-leave-to
|
|
269
|
+
{
|
|
270
|
+
transform: translateX(100%);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.sk-page-drawer-backdrop-enter-active,
|
|
274
|
+
.sk-page-drawer-backdrop-leave-active
|
|
275
|
+
{
|
|
276
|
+
transition: opacity var(--sk-transition-duration-normal) var(--sk-transition-easing);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.sk-page-drawer-backdrop-enter-from,
|
|
280
|
+
.sk-page-drawer-backdrop-leave-to
|
|
281
|
+
{
|
|
282
|
+
opacity: 0;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
@include reduced-motion
|
|
286
|
+
{
|
|
287
|
+
.sk-page-drawer-left-enter-active,
|
|
288
|
+
.sk-page-drawer-left-leave-active,
|
|
289
|
+
.sk-page-drawer-right-enter-active,
|
|
290
|
+
.sk-page-drawer-right-leave-active,
|
|
291
|
+
.sk-page-drawer-backdrop-enter-active,
|
|
292
|
+
.sk-page-drawer-backdrop-leave-active
|
|
293
|
+
{
|
|
294
|
+
transition: none;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.sk-page-drawer-left-enter-from,
|
|
298
|
+
.sk-page-drawer-left-leave-to,
|
|
299
|
+
.sk-page-drawer-right-enter-from,
|
|
300
|
+
.sk-page-drawer-right-leave-to
|
|
301
|
+
{
|
|
302
|
+
transform: none;
|
|
303
|
+
}
|
|
96
304
|
}
|
|
97
305
|
|
|
98
306
|
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// Follows button styling patterns with size system and variants.
|
|
5
5
|
//----------------------------------------------------------------------------------------------------------------------
|
|
6
6
|
|
|
7
|
-
@use '../mixins
|
|
7
|
+
@use '../mixins' as *;
|
|
8
8
|
|
|
9
9
|
//----------------------------------------------------------------------------------------------------------------------
|
|
10
10
|
|
|
@@ -137,6 +137,7 @@
|
|
|
137
137
|
$corners: (top-left, bottom-right)
|
|
138
138
|
);
|
|
139
139
|
|
|
140
|
+
position: relative;
|
|
140
141
|
display: inline-flex;
|
|
141
142
|
align-items: center;
|
|
142
143
|
justify-content: center;
|
|
@@ -151,6 +152,14 @@
|
|
|
151
152
|
cursor: pointer;
|
|
152
153
|
user-select: none;
|
|
153
154
|
|
|
155
|
+
// Coarse-pointer touch-target floor. Pagination buttons are compact by default;
|
|
156
|
+
// on touch devices, grow to 44px minimum so they're actually tappable.
|
|
157
|
+
@include touch
|
|
158
|
+
{
|
|
159
|
+
min-width: 44px;
|
|
160
|
+
min-height: 44px;
|
|
161
|
+
}
|
|
162
|
+
|
|
154
163
|
transition:
|
|
155
164
|
color var(--sk-pagination-transition-duration) var(--sk-pagination-transition-easing),
|
|
156
165
|
background-color var(--sk-pagination-transition-duration) var(--sk-pagination-transition-easing),
|
|
@@ -325,9 +325,14 @@
|
|
|
325
325
|
// Scrollable Panel Support
|
|
326
326
|
//------------------------------------------------------------------------------------------------------------------
|
|
327
327
|
// When a panel contains scrollable content, use a .sk-panel-scroll-content wrapper
|
|
328
|
-
// This ensures the border/decoration stay fixed while content scrolls internally
|
|
329
|
-
|
|
330
|
-
|
|
328
|
+
// This ensures the border/decoration stay fixed while content scrolls internally.
|
|
329
|
+
//
|
|
330
|
+
// Important: scope to DIRECT children only. Otherwise an outer panel containing a nested
|
|
331
|
+
// panel-with-scroll-content (e.g. SkSidebar's internal panel rendered inside a docs-site
|
|
332
|
+
// DemoShowcase panel) would spuriously flip to `display: flex` and kill margin collapse,
|
|
333
|
+
// causing layout shifts when the nested content mounts/unmounts.
|
|
334
|
+
|
|
335
|
+
&:has(> .sk-panel-scroll-content)
|
|
331
336
|
{
|
|
332
337
|
padding: 0;
|
|
333
338
|
display: flex;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Popover Component Styles
|
|
3
3
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
-
@use '
|
|
5
|
+
@use '../mixins' as *;
|
|
6
6
|
|
|
7
7
|
//----------------------------------------------------------------------------------------------------------------------
|
|
8
8
|
// Popover Content
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
max-width: 24rem;
|
|
44
44
|
min-width: 12rem;
|
|
45
|
-
z-index:
|
|
45
|
+
z-index: var(--sk-z-popover);
|
|
46
46
|
|
|
47
47
|
// Animation states
|
|
48
48
|
&[data-state='open']
|
|
@@ -256,3 +256,16 @@
|
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
//----------------------------------------------------------------------------------------------------------------------
|
|
259
|
+
// Reduced motion: skip the scale-in, popover appears/disappears in place.
|
|
260
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
261
|
+
|
|
262
|
+
@include reduced-motion
|
|
263
|
+
{
|
|
264
|
+
.sk-popover-content[data-state='open'],
|
|
265
|
+
.sk-popover-content[data-state='closed']
|
|
266
|
+
{
|
|
267
|
+
animation: none;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
//----------------------------------------------------------------------------------------------------------------------
|