@skewedaspect/sleekspace-ui 0.8.1 → 0.9.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/Dropdown/SkDropdown.vue.d.ts +9 -1
- package/dist/components/Dropdown/types.d.ts +2 -1
- package/dist/components/NavBar/SkNavBar.vue.d.ts +9 -1
- package/dist/components/NavBar/context.d.ts +2 -0
- package/dist/components/NavBar/types.d.ts +5 -1
- package/dist/components/NumberInput/SkNumberInput.vue.d.ts +8 -0
- package/dist/components/Page/SkPage.vue.d.ts +9 -0
- package/dist/components/ScrollArea/SkScrollArea.vue.d.ts +105 -4
- package/dist/composables/useCustomColors.d.ts +18 -56
- package/{src → dist}/global.d.ts +6 -2
- package/dist/sleekspace-ui.css +4257 -1253
- package/dist/sleekspace-ui.es.js +300 -170
- package/dist/sleekspace-ui.umd.js +299 -169
- package/dist/static/classes.d.ts +18 -0
- package/dist/static/components/alert.d.ts +12 -0
- package/dist/static/components/avatar.d.ts +9 -0
- package/dist/static/components/breadcrumbs.d.ts +6 -0
- package/dist/static/components/button.d.ts +13 -0
- package/dist/static/components/card.d.ts +5 -0
- package/dist/static/components/checkbox.d.ts +10 -0
- package/dist/static/components/colorPicker.d.ts +8 -0
- package/dist/static/components/divider.d.ts +8 -0
- package/dist/static/components/dropdown.d.ts +8 -0
- package/dist/static/components/field.d.ts +15 -0
- package/dist/static/components/group.d.ts +5 -0
- package/dist/static/components/input.d.ts +14 -0
- package/dist/static/components/navBar.d.ts +16 -0
- package/dist/static/components/numberInput.d.ts +15 -0
- package/dist/static/components/page.d.ts +9 -0
- package/dist/static/components/pagination.d.ts +5 -0
- package/dist/static/components/panel.d.ts +11 -0
- package/dist/static/components/progress.d.ts +9 -0
- package/dist/static/components/radio.d.ts +11 -0
- package/dist/static/components/select.d.ts +10 -0
- package/dist/static/components/sidebar.d.ts +9 -0
- package/dist/static/components/skeleton.d.ts +11 -0
- package/dist/static/components/slider.d.ts +12 -0
- package/dist/static/components/spinner.d.ts +12 -0
- package/dist/static/components/switchInput.d.ts +10 -0
- package/dist/static/components/table.d.ts +12 -0
- package/dist/static/components/tag.d.ts +8 -0
- package/dist/static/components/tagsInput.d.ts +7 -0
- package/dist/static/components/textarea.d.ts +12 -0
- package/dist/static/components/toolbar.d.ts +12 -0
- package/dist/static/components/tooltip.d.ts +7 -0
- package/dist/static/escape.d.ts +2 -0
- package/dist/static/index.cjs.js +1 -0
- package/dist/static/index.d.ts +68 -0
- package/dist/static/index.es.js +732 -0
- package/dist/static/render.d.ts +12 -0
- package/dist/static/specs.d.ts +2 -0
- package/dist/static/types.d.ts +43 -0
- package/dist/tokens.css +322 -0
- package/dist/types/index.d.ts +36 -0
- package/dist/utils/slots.d.ts +6 -0
- package/docs/guides/installation.md +8 -2
- package/docs/guides/pure-css/_meta.yaml +8 -0
- package/docs/guides/pure-css/class-api.md +1070 -0
- package/docs/guides/pure-css/custom-elements.md +574 -0
- package/docs/guides/pure-css/index.md +86 -0
- package/docs/guides/pure-css/limitations.md +152 -0
- package/docs/guides/pure-css/static-helpers.md +1203 -0
- package/llms-full.txt +3739 -261
- package/package.json +19 -5
- package/src/components/Alert/SkAlert.vue +4 -2
- package/src/components/Breadcrumbs/SkBreadcrumbs.vue +6 -12
- package/src/components/Button/SkButton.vue +8 -5
- package/src/components/Card/SkCard.vue +13 -5
- package/src/components/Checkbox/SkCheckbox.vue +9 -2
- package/src/components/ContextMenu/SkContextMenuRadioGroup.vue +4 -1
- package/src/components/Dropdown/SkDropdown.vue +20 -3
- package/src/components/Dropdown/SkDropdownRadioGroup.vue +4 -1
- package/src/components/Dropdown/types.ts +2 -1
- package/src/components/Modal/SkModal.vue +11 -4
- package/src/components/NavBar/SkNavBar.vue +19 -8
- package/src/components/NavBar/context.ts +4 -2
- package/src/components/NavBar/types.ts +6 -1
- package/src/components/NumberInput/SkNumberInput.vue +10 -1
- package/src/components/Page/SkPage.vue +29 -15
- package/src/components/Panel/SkPanel.vue +2 -1
- package/src/components/Popover/SkPopover.vue +11 -4
- package/src/components/Radio/SkRadio.vue +9 -2
- package/src/components/ScrollArea/SkScrollArea.vue +78 -5
- package/src/components/Switch/SkSwitch.vue +14 -13
- package/src/components/Tabs/SkTab.vue +7 -2
- package/src/components/TreeView/SkTreeItem.vue +10 -2
- package/src/components/TreeView/SkTreeView.vue +7 -2
- package/src/composables/useCustomColors.ts +86 -77
- package/src/composables/usePortalContext.test.ts +0 -2
- package/src/shims.d.ts +10 -0
- package/src/static/__tests__/parity.test.ts +717 -0
- package/src/static/__tests__/parityHarness.test.ts +98 -0
- package/src/static/__tests__/parityHarness.ts +260 -0
- package/src/static/classes.test.ts +82 -0
- package/src/static/classes.ts +111 -0
- package/src/static/components/__tests__/helpers.test.ts +837 -0
- package/src/static/components/alert.ts +117 -0
- package/src/static/components/avatar.ts +86 -0
- package/src/static/components/breadcrumbs.ts +28 -0
- package/src/static/components/button.ts +75 -0
- package/src/static/components/card.ts +27 -0
- package/src/static/components/checkbox.ts +48 -0
- package/src/static/components/colorPicker.ts +45 -0
- package/src/static/components/divider.ts +39 -0
- package/src/static/components/dropdown.ts +36 -0
- package/src/static/components/field.ts +86 -0
- package/src/static/components/group.ts +27 -0
- package/src/static/components/input.ts +55 -0
- package/src/static/components/navBar.ts +94 -0
- package/src/static/components/numberInput.ts +64 -0
- package/src/static/components/page.ts +31 -0
- package/src/static/components/pagination.ts +27 -0
- package/src/static/components/panel.ts +33 -0
- package/src/static/components/progress.ts +31 -0
- package/src/static/components/radio.ts +53 -0
- package/src/static/components/select.ts +51 -0
- package/src/static/components/sidebar.ts +85 -0
- package/src/static/components/skeleton.ts +66 -0
- package/src/static/components/slider.ts +50 -0
- package/src/static/components/spinner.ts +94 -0
- package/src/static/components/switchInput.ts +49 -0
- package/src/static/components/table.ts +88 -0
- package/src/static/components/tag.ts +76 -0
- package/src/static/components/tagsInput.ts +35 -0
- package/src/static/components/textarea.ts +53 -0
- package/src/static/components/toolbar.ts +74 -0
- package/src/static/components/tooltip.ts +29 -0
- package/src/static/escape.test.ts +53 -0
- package/src/static/escape.ts +28 -0
- package/src/static/generated/defaults.ts +379 -0
- package/src/static/generated/propTypes.ts +426 -0
- package/src/static/index.ts +116 -0
- package/src/static/render.test.ts +83 -0
- package/src/static/render.ts +76 -0
- package/src/static/specs.test.ts +58 -0
- package/src/static/specs.ts +230 -0
- package/src/static/types.ts +176 -0
- package/src/styles/__tests__/testHelpers.ts +97 -0
- package/src/styles/base/_custom-elements.scss +51 -0
- package/src/styles/base/_index.scss +4 -0
- package/src/styles/components/__tests__/componentSelectors.test.ts +2575 -0
- package/src/styles/components/_alert.scss +82 -39
- package/src/styles/components/_avatar.scss +102 -47
- package/src/styles/components/_breadcrumbs.scss +39 -37
- package/src/styles/components/_button.scss +58 -5
- package/src/styles/components/_card.scss +64 -2
- package/src/styles/components/_checkbox.scss +35 -5
- package/src/styles/components/_color-picker.scss +48 -13
- package/src/styles/components/_divider.scss +86 -52
- package/src/styles/components/_dropdown.scss +214 -0
- package/src/styles/components/_field.scss +76 -23
- package/src/styles/components/_group.scss +190 -79
- package/src/styles/components/_index.scss +1 -0
- package/src/styles/components/_input.scss +81 -5
- package/src/styles/components/_menu.scss +1 -1
- package/src/styles/components/_navbar.scss +76 -45
- package/src/styles/components/_number-input.scss +98 -85
- package/src/styles/components/_page.scss +82 -23
- package/src/styles/components/_pagination.scss +240 -212
- package/src/styles/components/_panel.scss +268 -122
- package/src/styles/components/_progress.scss +120 -70
- package/src/styles/components/_radio.scss +35 -5
- package/src/styles/components/_scroll-area.scss +50 -22
- package/src/styles/components/_select.scss +40 -9
- package/src/styles/components/_sidebar.scss +59 -34
- package/src/styles/components/_skeleton.scss +111 -65
- package/src/styles/components/_slider.scss +34 -10
- package/src/styles/components/_spinner.scss +107 -56
- package/src/styles/components/_switch.scss +36 -5
- package/src/styles/components/_table.scss +150 -166
- package/src/styles/components/_tag.scss +244 -154
- package/src/styles/components/_tags-input.scss +46 -12
- package/src/styles/components/_textarea.scss +36 -5
- package/src/styles/components/_toolbar.scss +85 -31
- package/src/styles/components/_tooltip.scss +172 -3
- package/src/styles/mixins/_cut-border.scss +18 -4
- package/src/styles/mixins/_dual-selector.scss +192 -0
- package/src/styles/mixins/_index.scss +1 -0
- package/src/styles/mixins/dualSelector.test.ts +151 -0
- package/src/styles/themes/_colorful.scss +25 -0
- package/src/styles/themes/_greyscale.scss +25 -0
- package/src/styles/themes/_shade-scale.scss +39 -0
- package/src/styles/tokens/_semantic-color-kinds.scss +66 -0
- package/src/{types.ts → types/index.ts} +19 -11
- package/src/utils/slots.ts +75 -0
- package/web-types.json +980 -137
- package/dist/composables/useCustomColors.test.d.ts +0 -1
- package/dist/composables/useFocusTrap.test.d.ts +0 -1
- package/dist/composables/usePortalContext.test.d.ts +0 -1
- package/dist/styles/mixins/fluidSize.test.d.ts +0 -1
- package/dist/types.d.ts +0 -29
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
4
|
|
|
5
5
|
@use '../theme/variables' as *;
|
|
6
|
+
@use '../mixins/dual-selector' as *;
|
|
6
7
|
|
|
7
8
|
//----------------------------------------------------------------------------------------------------------------------
|
|
8
9
|
// Panel Design Tokens
|
|
9
10
|
//----------------------------------------------------------------------------------------------------------------------
|
|
10
11
|
|
|
11
|
-
.sk-panel
|
|
12
|
+
.sk-panel,
|
|
13
|
+
sk-panel
|
|
12
14
|
{
|
|
13
15
|
//------------------------------------------------------------------------------------------------------------------
|
|
14
16
|
// Dimension Tokens
|
|
@@ -91,38 +93,12 @@
|
|
|
91
93
|
--sk-panel-glow: inset 0 0 var(--sk-panel-glow-size) oklch(from var(--sk-panel-color-base) l c h / var(--sk-panel-glow-opacity));
|
|
92
94
|
}
|
|
93
95
|
|
|
94
|
-
//----------------------------------------------------------------------------------------------------------------------
|
|
95
|
-
// Kind Mixin
|
|
96
|
-
//----------------------------------------------------------------------------------------------------------------------
|
|
97
|
-
|
|
98
|
-
@mixin panel-kind($kind)
|
|
99
|
-
{
|
|
100
|
-
&.sk-#{ "" + $kind }
|
|
101
|
-
{
|
|
102
|
-
// Override base color tokens for this kind
|
|
103
|
-
--sk-panel-color-base: var(--sk-#{ $kind }-base);
|
|
104
|
-
--sk-panel-fg: var(--sk-#{ $kind }-text);
|
|
105
|
-
|
|
106
|
-
// Set generic kind color for list markers and other cross-component features
|
|
107
|
-
--sk-kind-color: var(--sk-#{ $kind }-base);
|
|
108
|
-
|
|
109
|
-
// Set dynamic border color
|
|
110
|
-
--sk-panel-border-color: var(--sk-panel-border-base);
|
|
111
|
-
|
|
112
|
-
// Use calculated background and foreground
|
|
113
|
-
background-color: var(--sk-panel-bg);
|
|
114
|
-
color: var(--sk-panel-fg);
|
|
115
|
-
|
|
116
|
-
// Apply inner glow (works in both modern and fallback browsers)
|
|
117
|
-
box-shadow: var(--sk-panel-glow);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
96
|
//----------------------------------------------------------------------------------------------------------------------
|
|
122
97
|
// Base Panel Styles
|
|
123
98
|
//----------------------------------------------------------------------------------------------------------------------
|
|
124
99
|
|
|
125
|
-
.sk-panel
|
|
100
|
+
.sk-panel,
|
|
101
|
+
sk-panel
|
|
126
102
|
{
|
|
127
103
|
// Base structure
|
|
128
104
|
display: block;
|
|
@@ -146,15 +122,6 @@
|
|
|
146
122
|
color: var(--sk-kind-color, var(--sk-panel-color-base));
|
|
147
123
|
}
|
|
148
124
|
|
|
149
|
-
//------------------------------------------------------------------------------------------------------------------
|
|
150
|
-
// Corner toggle classes
|
|
151
|
-
//------------------------------------------------------------------------------------------------------------------
|
|
152
|
-
|
|
153
|
-
&.sk-cut-top-left { --sk-panel-cut-tl: var(--sk-panel-cut-size); }
|
|
154
|
-
&.sk-cut-top-right { --sk-panel-cut-tr: var(--sk-panel-cut-size); }
|
|
155
|
-
&.sk-cut-bottom-right { --sk-panel-cut-br: var(--sk-panel-cut-size); }
|
|
156
|
-
&.sk-cut-bottom-left { --sk-panel-cut-bl: var(--sk-panel-cut-size); }
|
|
157
|
-
|
|
158
125
|
//------------------------------------------------------------------------------------------------------------------
|
|
159
126
|
// Beveled corners (modern path)
|
|
160
127
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -228,7 +195,7 @@
|
|
|
228
195
|
}
|
|
229
196
|
|
|
230
197
|
//------------------------------------------------------------------------------------------------------------------
|
|
231
|
-
// Corner decoration line
|
|
198
|
+
// Corner decoration line (base element)
|
|
232
199
|
//------------------------------------------------------------------------------------------------------------------
|
|
233
200
|
|
|
234
201
|
&::after
|
|
@@ -243,84 +210,6 @@
|
|
|
243
210
|
pointer-events: none;
|
|
244
211
|
}
|
|
245
212
|
|
|
246
|
-
// Bottom-right decoration (default)
|
|
247
|
-
&.sk-decoration-bottom-right::after
|
|
248
|
-
{
|
|
249
|
-
right: var(--sk-panel-decoration-offset);
|
|
250
|
-
bottom: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
|
|
251
|
-
transform: rotate(135deg);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
// Top-left decoration (same diagonal as bottom-right)
|
|
255
|
-
&.sk-decoration-top-left::after
|
|
256
|
-
{
|
|
257
|
-
left: var(--sk-panel-decoration-offset);
|
|
258
|
-
top: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
|
|
259
|
-
transform: rotate(135deg);
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
// Top-right decoration
|
|
263
|
-
&.sk-decoration-top-right::after
|
|
264
|
-
{
|
|
265
|
-
right: var(--sk-panel-decoration-offset);
|
|
266
|
-
top: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
|
|
267
|
-
transform: rotate(45deg);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
// Bottom-left decoration
|
|
271
|
-
&.sk-decoration-bottom-left::after
|
|
272
|
-
{
|
|
273
|
-
left: var(--sk-panel-decoration-offset);
|
|
274
|
-
bottom: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
|
|
275
|
-
transform: rotate(45deg);
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
//------------------------------------------------------------------------------------------------------------------
|
|
279
|
-
// Size variants (only affects cut size, not padding or dimensions)
|
|
280
|
-
//------------------------------------------------------------------------------------------------------------------
|
|
281
|
-
|
|
282
|
-
&.sk-xs
|
|
283
|
-
{
|
|
284
|
-
--sk-panel-cut-size: calc(var(--sk-panel-min-height) * 0.5 / var(--sk-panel-radius-factor));
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
&.sk-sm
|
|
288
|
-
{
|
|
289
|
-
--sk-panel-cut-size: calc(var(--sk-panel-min-height) * 0.75 / var(--sk-panel-radius-factor));
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
&.sk-md
|
|
293
|
-
{
|
|
294
|
-
--sk-panel-cut-size: calc(var(--sk-panel-min-height) * 1.0 / var(--sk-panel-radius-factor));
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
&.sk-lg
|
|
298
|
-
{
|
|
299
|
-
--sk-panel-cut-size: calc(var(--sk-panel-min-height) * 1.5 / var(--sk-panel-radius-factor));
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
&.sk-xl
|
|
303
|
-
{
|
|
304
|
-
--sk-panel-cut-size: calc(var(--sk-panel-min-height) * 2.0 / var(--sk-panel-radius-factor));
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
//------------------------------------------------------------------------------------------------------------------
|
|
308
|
-
// No Border variant
|
|
309
|
-
//------------------------------------------------------------------------------------------------------------------
|
|
310
|
-
|
|
311
|
-
&.sk-no-border
|
|
312
|
-
{
|
|
313
|
-
// Remove border and glow but keep the bevel shape
|
|
314
|
-
--sk-panel-border-width: 0;
|
|
315
|
-
box-shadow: none;
|
|
316
|
-
|
|
317
|
-
// Remove the decoration as well
|
|
318
|
-
&::after
|
|
319
|
-
{
|
|
320
|
-
display: none;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
|
|
324
213
|
//------------------------------------------------------------------------------------------------------------------
|
|
325
214
|
// Scrollable Panel Support
|
|
326
215
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -378,14 +267,271 @@
|
|
|
378
267
|
);
|
|
379
268
|
}
|
|
380
269
|
}
|
|
270
|
+
}
|
|
381
271
|
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
272
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
273
|
+
// Kind Variants
|
|
274
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
385
275
|
|
|
386
|
-
|
|
276
|
+
@each $kind in $kinds
|
|
277
|
+
{
|
|
278
|
+
@include kind-variant('panel', $kind)
|
|
387
279
|
{
|
|
388
|
-
|
|
280
|
+
// Override base color tokens for this kind
|
|
281
|
+
--sk-panel-color-base: var(--sk-#{ $kind }-base);
|
|
282
|
+
--sk-panel-fg: var(--sk-#{ $kind }-text);
|
|
283
|
+
|
|
284
|
+
// Set generic kind color for list markers and other cross-component features
|
|
285
|
+
--sk-kind-color: var(--sk-#{ $kind }-base);
|
|
286
|
+
|
|
287
|
+
// Set dynamic border color
|
|
288
|
+
--sk-panel-border-color: var(--sk-panel-border-base);
|
|
289
|
+
|
|
290
|
+
// Use calculated background and foreground
|
|
291
|
+
background-color: var(--sk-panel-bg);
|
|
292
|
+
color: var(--sk-panel-fg);
|
|
293
|
+
|
|
294
|
+
// Apply inner glow (works in both modern and fallback browsers)
|
|
295
|
+
box-shadow: var(--sk-panel-glow);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
300
|
+
// Size Variants
|
|
301
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
302
|
+
// Each size emits three selectors via size-variant: .sk-panel.sk-<size>, .sk-panel.sk-size-<size>,
|
|
303
|
+
// and sk-panel[size="<size>"]. The sk-size-* prefixed form is what defaults-when-absent keys on.
|
|
304
|
+
|
|
305
|
+
$_panel-size-factors: (
|
|
306
|
+
xs: 0.5,
|
|
307
|
+
sm: 0.75,
|
|
308
|
+
md: 1.0,
|
|
309
|
+
lg: 1.5,
|
|
310
|
+
xl: 2.0,
|
|
311
|
+
);
|
|
312
|
+
|
|
313
|
+
@each $size, $factor in $_panel-size-factors
|
|
314
|
+
{
|
|
315
|
+
@include size-variant('panel', $size)
|
|
316
|
+
{
|
|
317
|
+
--sk-panel-cut-size: calc(var(--sk-panel-min-height) * #{ $factor } / var(--sk-panel-radius-factor));
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
322
|
+
// Corner Cut Modifiers
|
|
323
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
324
|
+
|
|
325
|
+
@include list-modifier('panel', 'cut', 'top-left', 'corners')
|
|
326
|
+
{
|
|
327
|
+
--sk-panel-cut-tl: var(--sk-panel-cut-size);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
@include list-modifier('panel', 'cut', 'top-right', 'corners')
|
|
331
|
+
{
|
|
332
|
+
--sk-panel-cut-tr: var(--sk-panel-cut-size);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
@include list-modifier('panel', 'cut', 'bottom-right', 'corners')
|
|
336
|
+
{
|
|
337
|
+
--sk-panel-cut-br: var(--sk-panel-cut-size);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
@include list-modifier('panel', 'cut', 'bottom-left', 'corners')
|
|
341
|
+
{
|
|
342
|
+
--sk-panel-cut-bl: var(--sk-panel-cut-size);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
346
|
+
// Decoration Corner Modifiers
|
|
347
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
348
|
+
|
|
349
|
+
@include single-choice-modifier('panel', 'decoration', 'bottom-right', 'decoration-corner')
|
|
350
|
+
{
|
|
351
|
+
&::after
|
|
352
|
+
{
|
|
353
|
+
right: var(--sk-panel-decoration-offset);
|
|
354
|
+
bottom: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
|
|
355
|
+
transform: rotate(135deg);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
@include single-choice-modifier('panel', 'decoration', 'top-left', 'decoration-corner')
|
|
360
|
+
{
|
|
361
|
+
&::after
|
|
362
|
+
{
|
|
363
|
+
left: var(--sk-panel-decoration-offset);
|
|
364
|
+
top: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
|
|
365
|
+
transform: rotate(135deg);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
@include single-choice-modifier('panel', 'decoration', 'top-right', 'decoration-corner')
|
|
370
|
+
{
|
|
371
|
+
&::after
|
|
372
|
+
{
|
|
373
|
+
right: var(--sk-panel-decoration-offset);
|
|
374
|
+
top: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
|
|
375
|
+
transform: rotate(45deg);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
@include single-choice-modifier('panel', 'decoration', 'bottom-left', 'decoration-corner')
|
|
380
|
+
{
|
|
381
|
+
&::after
|
|
382
|
+
{
|
|
383
|
+
left: var(--sk-panel-decoration-offset);
|
|
384
|
+
bottom: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
|
|
385
|
+
transform: rotate(45deg);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
390
|
+
// No Border Modifier
|
|
391
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
392
|
+
|
|
393
|
+
@include bool-modifier('panel', 'no-border')
|
|
394
|
+
{
|
|
395
|
+
// Remove border and glow but keep the bevel shape
|
|
396
|
+
--sk-panel-border-width: 0;
|
|
397
|
+
box-shadow: none;
|
|
398
|
+
|
|
399
|
+
// Remove the decoration as well
|
|
400
|
+
&::after
|
|
401
|
+
{
|
|
402
|
+
display: none;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
407
|
+
// No Decoration Modifier
|
|
408
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
409
|
+
|
|
410
|
+
@include bool-modifier('panel', 'no-decoration')
|
|
411
|
+
{
|
|
412
|
+
&::after
|
|
413
|
+
{
|
|
414
|
+
display: none;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// Per-corner fallback: hide decoration automatically when the targeted corner isn't cut.
|
|
419
|
+
// This is the pure-CSS equivalent of the `decorationCorner not in corners` check in SkPanel.vue.
|
|
420
|
+
|
|
421
|
+
.sk-panel.sk-decoration-bottom-right:not(.sk-cut-bottom-right)::after,
|
|
422
|
+
sk-panel[decoration-corner="bottom-right"]:not([corners~="bottom-right"])::after
|
|
423
|
+
{
|
|
424
|
+
display: none;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.sk-panel.sk-decoration-top-left:not(.sk-cut-top-left)::after,
|
|
428
|
+
sk-panel[decoration-corner="top-left"]:not([corners~="top-left"])::after
|
|
429
|
+
{
|
|
430
|
+
display: none;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.sk-panel.sk-decoration-top-right:not(.sk-cut-top-right)::after,
|
|
434
|
+
sk-panel[decoration-corner="top-right"]:not([corners~="top-right"])::after
|
|
435
|
+
{
|
|
436
|
+
display: none;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.sk-panel.sk-decoration-bottom-left:not(.sk-cut-bottom-left)::after,
|
|
440
|
+
sk-panel[decoration-corner="bottom-left"]:not([corners~="bottom-left"])::after
|
|
441
|
+
{
|
|
442
|
+
display: none;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
446
|
+
// Defaults When Absent
|
|
447
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
448
|
+
|
|
449
|
+
// Default size: md — fires when no sk-size-* class is present (zero specificity via :where).
|
|
450
|
+
// Note: Vue emits sk-md (bare), which also matches .sk-panel.sk-md (higher specificity) — so
|
|
451
|
+
// explicit size rules always win. This default only affects bare `.sk-panel` with no size class.
|
|
452
|
+
// Default cut size = md factor (1.0). Keep in sync with $_panel-size-factors's md entry.
|
|
453
|
+
@include defaults-when-absent('panel', 'sk-size-')
|
|
454
|
+
{
|
|
455
|
+
--sk-panel-cut-size: calc(var(--sk-panel-min-height) * 1.0 / var(--sk-panel-radius-factor));
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
// Default kind: neutral — can't use [class*="sk-"] because every Sleekspace class starts with
|
|
459
|
+
// "sk-". Instead we build an explicit :not() chain for all kinds from $kinds, wrapped in
|
|
460
|
+
// :where() for zero specificity so any explicit kind class wins.
|
|
461
|
+
$_panel-kind-not: '';
|
|
462
|
+
@each $kind in $kinds
|
|
463
|
+
{
|
|
464
|
+
$_panel-kind-not: $_panel-kind-not + ':not(.sk-' + $kind + ')';
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.sk-panel:where(#{ $_panel-kind-not })
|
|
468
|
+
{
|
|
469
|
+
--sk-panel-color-base: var(--sk-neutral-base);
|
|
470
|
+
--sk-panel-fg: var(--sk-neutral-text);
|
|
471
|
+
--sk-kind-color: var(--sk-neutral-base);
|
|
472
|
+
--sk-panel-border-color: var(--sk-panel-border-base);
|
|
473
|
+
background-color: var(--sk-panel-bg);
|
|
474
|
+
color: var(--sk-panel-fg);
|
|
475
|
+
box-shadow: var(--sk-panel-glow);
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
// Default cut: bottom-right — fires when no sk-cut-* class is present.
|
|
479
|
+
@include defaults-when-absent('panel', 'sk-cut-')
|
|
480
|
+
{
|
|
481
|
+
--sk-panel-cut-br: var(--sk-panel-cut-size);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
// Default decoration corner = bottom-right. Keep in sync with the bottom-right
|
|
485
|
+
// single-choice-modifier block above.
|
|
486
|
+
@include defaults-when-absent('panel', 'sk-decoration-')
|
|
487
|
+
{
|
|
488
|
+
&::after
|
|
489
|
+
{
|
|
490
|
+
right: var(--sk-panel-decoration-offset);
|
|
491
|
+
bottom: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
|
|
492
|
+
transform: rotate(135deg);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
497
|
+
// Custom-Element API Defaults (attribute-absence path)
|
|
498
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
499
|
+
// Parallel defaults for <sk-panel> (no class API). Zero-specificity via :where() so any
|
|
500
|
+
// explicit attribute value wins. These mirror the class-API defaults above, but key on
|
|
501
|
+
// the absence of the HTML attribute rather than the absence of a class prefix.
|
|
502
|
+
|
|
503
|
+
// Default kind: neutral — fires when <sk-panel> has no kind attribute.
|
|
504
|
+
@include defaults-when-no-attr('panel', 'kind')
|
|
505
|
+
{
|
|
506
|
+
--sk-panel-color-base: var(--sk-neutral-base);
|
|
507
|
+
--sk-panel-fg: var(--sk-neutral-text);
|
|
508
|
+
--sk-kind-color: var(--sk-neutral-base);
|
|
509
|
+
--sk-panel-border-color: var(--sk-panel-border-base);
|
|
510
|
+
background-color: var(--sk-panel-bg);
|
|
511
|
+
color: var(--sk-panel-fg);
|
|
512
|
+
box-shadow: var(--sk-panel-glow);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
// Default size: md — fires when <sk-panel> has no size attribute.
|
|
516
|
+
@include defaults-when-no-attr('panel', 'size')
|
|
517
|
+
{
|
|
518
|
+
--sk-panel-cut-size: calc(var(--sk-panel-min-height) * 1.0 / var(--sk-panel-radius-factor));
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
// Default cut: bottom-right — fires when <sk-panel> has no corners attribute.
|
|
522
|
+
@include defaults-when-no-attr('panel', 'corners')
|
|
523
|
+
{
|
|
524
|
+
--sk-panel-cut-br: var(--sk-panel-cut-size);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
// Default decoration corner: bottom-right — fires when <sk-panel> has no decoration-corner attribute.
|
|
528
|
+
@include defaults-when-no-attr('panel', 'decoration-corner')
|
|
529
|
+
{
|
|
530
|
+
&::after
|
|
531
|
+
{
|
|
532
|
+
right: var(--sk-panel-decoration-offset);
|
|
533
|
+
bottom: calc(var(--sk-panel-cut-size) / 2 + var(--sk-panel-decoration-offset) - 1px);
|
|
534
|
+
transform: rotate(135deg);
|
|
389
535
|
}
|
|
390
536
|
}
|
|
391
537
|
|