@skewedaspect/sleekspace-ui 0.8.1 → 0.9.0
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/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 +4253 -1251
- package/dist/sleekspace-ui.es.js +204 -109
- package/dist/sleekspace-ui.umd.js +204 -109
- 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/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 +3736 -261
- package/package.json +16 -5
- package/src/components/Card/SkCard.vue +1 -0
- 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/NavBar/SkNavBar.vue +14 -4
- package/src/components/NavBar/context.ts +4 -2
- package/src/components/NavBar/types.ts +6 -1
- package/src/components/Page/SkPage.vue +11 -0
- package/src/components/Panel/SkPanel.vue +2 -1
- package/src/components/ScrollArea/SkScrollArea.vue +78 -5
- 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 +378 -0
- package/src/static/generated/propTypes.ts +425 -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 +88 -83
- 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/web-types.json +970 -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
|
@@ -4,12 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
@use '../theme/variables' as *;
|
|
6
6
|
@use '../mixins' as *;
|
|
7
|
+
@use '../mixins/dual-selector' as *;
|
|
7
8
|
|
|
8
9
|
//----------------------------------------------------------------------------------------------------------------------
|
|
9
10
|
// Alert Design Tokens
|
|
10
11
|
//----------------------------------------------------------------------------------------------------------------------
|
|
11
12
|
|
|
12
|
-
.sk-alert
|
|
13
|
+
.sk-alert,
|
|
14
|
+
sk-alert
|
|
13
15
|
{
|
|
14
16
|
//------------------------------------------------------------------------------------------------------------------
|
|
15
17
|
// Dimension Tokens
|
|
@@ -85,41 +87,12 @@
|
|
|
85
87
|
oklch(from var(--sk-alert-color-base) l c h / var(--sk-alert-glow-opacity));
|
|
86
88
|
}
|
|
87
89
|
|
|
88
|
-
//----------------------------------------------------------------------------------------------------------------------
|
|
89
|
-
// Kind Mixin
|
|
90
|
-
//----------------------------------------------------------------------------------------------------------------------
|
|
91
|
-
|
|
92
|
-
@mixin alert-kind($kind)
|
|
93
|
-
{
|
|
94
|
-
&.sk-#{ "" + $kind }
|
|
95
|
-
{
|
|
96
|
-
// Override base color tokens for this kind
|
|
97
|
-
--sk-alert-color-base: var(--sk-#{ $kind }-base);
|
|
98
|
-
|
|
99
|
-
// Set generic kind color for list markers and other cross-component features
|
|
100
|
-
--sk-kind-color: var(--sk-#{ $kind }-base);
|
|
101
|
-
|
|
102
|
-
// Set dynamic border color
|
|
103
|
-
--sk-alert-border-color: var(--sk-alert-border-base);
|
|
104
|
-
|
|
105
|
-
// Use calculated background and foreground
|
|
106
|
-
background-color: var(--sk-alert-bg);
|
|
107
|
-
color: var(--sk-alert-fg);
|
|
108
|
-
border-color: var(--sk-alert-border-color);
|
|
109
|
-
|
|
110
|
-
// Non-subtle variants get the dark foreground color
|
|
111
|
-
&:not(.sk-subtle)
|
|
112
|
-
{
|
|
113
|
-
--sk-alert-fg: var(--sk-#{ $kind }-text);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
90
|
//----------------------------------------------------------------------------------------------------------------------
|
|
119
91
|
// Base Alert Styles
|
|
120
92
|
//----------------------------------------------------------------------------------------------------------------------
|
|
121
93
|
|
|
122
|
-
.sk-alert
|
|
94
|
+
.sk-alert,
|
|
95
|
+
sk-alert
|
|
123
96
|
{
|
|
124
97
|
// Base structure
|
|
125
98
|
position: relative;
|
|
@@ -186,10 +159,10 @@
|
|
|
186
159
|
}
|
|
187
160
|
|
|
188
161
|
//------------------------------------------------------------------------------------------------------------------
|
|
189
|
-
// Non-subtle (prominent) variant
|
|
162
|
+
// Non-subtle (prominent) variant — applied when NOT subtle
|
|
190
163
|
//------------------------------------------------------------------------------------------------------------------
|
|
191
164
|
|
|
192
|
-
&:not(.sk-subtle)
|
|
165
|
+
&:not(.sk-subtle):not([subtle])
|
|
193
166
|
{
|
|
194
167
|
--sk-alert-padding: 1rem;
|
|
195
168
|
--sk-alert-icon-size: 1.5rem;
|
|
@@ -204,15 +177,85 @@
|
|
|
204
177
|
// Apply inner glow
|
|
205
178
|
box-shadow: var(--sk-alert-glow);
|
|
206
179
|
}
|
|
180
|
+
}
|
|
207
181
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
182
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
183
|
+
// Kind Variants
|
|
184
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
211
185
|
|
|
212
|
-
|
|
186
|
+
@each $kind in $kinds
|
|
187
|
+
{
|
|
188
|
+
@include kind-variant('alert', $kind)
|
|
213
189
|
{
|
|
214
|
-
|
|
190
|
+
// Override base color tokens for this kind
|
|
191
|
+
--sk-alert-color-base: var(--sk-#{ $kind }-base);
|
|
192
|
+
|
|
193
|
+
// Set generic kind color for list markers and other cross-component features
|
|
194
|
+
--sk-kind-color: var(--sk-#{ $kind }-base);
|
|
195
|
+
|
|
196
|
+
// Set dynamic border color
|
|
197
|
+
--sk-alert-border-color: var(--sk-alert-border-base);
|
|
198
|
+
|
|
199
|
+
// Use calculated background and foreground
|
|
200
|
+
background-color: var(--sk-alert-bg);
|
|
201
|
+
color: var(--sk-alert-fg);
|
|
202
|
+
border-color: var(--sk-alert-border-color);
|
|
203
|
+
|
|
204
|
+
// Non-subtle variants get the dark foreground color (for contrast on solid bg)
|
|
205
|
+
&:not(.sk-subtle):not([subtle])
|
|
206
|
+
{
|
|
207
|
+
--sk-alert-fg: var(--sk-#{ $kind }-text);
|
|
208
|
+
}
|
|
215
209
|
}
|
|
216
210
|
}
|
|
217
211
|
|
|
218
212
|
//----------------------------------------------------------------------------------------------------------------------
|
|
213
|
+
// Subtle Modifier
|
|
214
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
215
|
+
// Emits .sk-alert.sk-subtle and sk-alert[subtle] for Layer 2 custom-element API support.
|
|
216
|
+
// Subtle alerts use reduced opacity background and the base color as text (already the default).
|
|
217
|
+
// The selector pair is emitted here so sk-alert[subtle] resolves consistently with .sk-subtle.
|
|
218
|
+
|
|
219
|
+
@include bool-modifier('alert', 'subtle')
|
|
220
|
+
{
|
|
221
|
+
// Subtle uses the semi-transparent background (already the default via --sk-alert-bg).
|
|
222
|
+
// Explicitly set to ensure this wins over any non-subtle rules at the same specificity.
|
|
223
|
+
--sk-alert-bg: oklch(from var(--sk-alert-bg-solid) l c h / var(--sk-alert-subtle-opacity));
|
|
224
|
+
--sk-alert-fg: var(--sk-alert-color-base);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
228
|
+
// Defaults When Absent
|
|
229
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
230
|
+
|
|
231
|
+
// Default kind: info — alert defaults to 'info' kind per Vue component props.
|
|
232
|
+
// Can't use [class*="sk-"] because every Sleekspace class starts with "sk-".
|
|
233
|
+
// Use explicit :not() chain for each kind, wrapped in :where() for zero specificity.
|
|
234
|
+
$_alert-kind-not: '';
|
|
235
|
+
@each $kind in $kinds
|
|
236
|
+
{
|
|
237
|
+
$_alert-kind-not: $_alert-kind-not + ':not(.sk-' + $kind + ')';
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.sk-alert:where(#{ $_alert-kind-not })
|
|
241
|
+
{
|
|
242
|
+
--sk-alert-color-base: var(--sk-info-base);
|
|
243
|
+
--sk-kind-color: var(--sk-info-base);
|
|
244
|
+
--sk-alert-border-color: var(--sk-alert-border-base);
|
|
245
|
+
background-color: var(--sk-alert-bg);
|
|
246
|
+
color: var(--sk-alert-fg);
|
|
247
|
+
border-color: var(--sk-alert-border-color);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// Default kind for custom-element API — fires when <sk-alert> has no kind attribute.
|
|
251
|
+
@include defaults-when-no-attr('alert', 'kind')
|
|
252
|
+
{
|
|
253
|
+
--sk-alert-color-base: var(--sk-info-base);
|
|
254
|
+
--sk-kind-color: var(--sk-info-base);
|
|
255
|
+
--sk-alert-border-color: var(--sk-alert-border-base);
|
|
256
|
+
background-color: var(--sk-alert-bg);
|
|
257
|
+
color: var(--sk-alert-fg);
|
|
258
|
+
border-color: var(--sk-alert-border-color);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -2,37 +2,30 @@
|
|
|
2
2
|
// Avatar Component Styles
|
|
3
3
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
-
@use '
|
|
5
|
+
@use '../theme/variables' as *;
|
|
6
|
+
@use '../mixins' as *;
|
|
6
7
|
|
|
7
8
|
//----------------------------------------------------------------------------------------------------------------------
|
|
8
|
-
|
|
9
|
-
$kinds: (neutral, primary, accent, info, success, warning, danger);
|
|
10
|
-
|
|
11
|
-
//----------------------------------------------------------------------------------------------------------------------
|
|
12
|
-
// Kind Mixin
|
|
9
|
+
// Avatar Design Tokens
|
|
13
10
|
//----------------------------------------------------------------------------------------------------------------------
|
|
14
11
|
|
|
15
|
-
|
|
12
|
+
.sk-avatar,
|
|
13
|
+
sk-avatar
|
|
16
14
|
{
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
// CSS Variables
|
|
16
|
+
--sk-avatar-color-base: var(--sk-neutral-base);
|
|
17
|
+
--sk-avatar-fg: var(--sk-neutral-text);
|
|
18
|
+
--sk-avatar-size: 2.5rem;
|
|
19
|
+
--sk-avatar-bevel: calc(var(--sk-avatar-size) * 0.25);
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
//----------------------------------------------------------------------------------------------------------------------
|
|
25
23
|
// Avatar Root
|
|
26
24
|
//----------------------------------------------------------------------------------------------------------------------
|
|
27
25
|
|
|
28
|
-
.sk-avatar
|
|
26
|
+
.sk-avatar,
|
|
27
|
+
sk-avatar
|
|
29
28
|
{
|
|
30
|
-
// CSS Variables
|
|
31
|
-
--sk-avatar-color-base: var(--sk-neutral-base);
|
|
32
|
-
--sk-avatar-fg: var(--sk-neutral-text);
|
|
33
|
-
--sk-avatar-size: 2.5rem;
|
|
34
|
-
--sk-avatar-bevel: calc(var(--sk-avatar-size) * 0.25);
|
|
35
|
-
|
|
36
29
|
position: relative;
|
|
37
30
|
display: inline-flex;
|
|
38
31
|
align-items: center;
|
|
@@ -55,44 +48,106 @@ $kinds: (neutral, primary, accent, info, success, warning, danger);
|
|
|
55
48
|
|
|
56
49
|
// Prevent image from overflowing the beveled corners
|
|
57
50
|
overflow: hidden;
|
|
51
|
+
}
|
|
58
52
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
53
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
54
|
+
// Kind Variants
|
|
55
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
62
56
|
|
|
63
|
-
|
|
57
|
+
@each $kind in $kinds
|
|
58
|
+
{
|
|
59
|
+
@include kind-variant('avatar', $kind)
|
|
64
60
|
{
|
|
65
|
-
--sk-avatar-
|
|
61
|
+
--sk-avatar-color-base: var(--sk-#{ $kind }-base);
|
|
62
|
+
--sk-avatar-fg: var(--sk-#{ $kind }-text);
|
|
66
63
|
}
|
|
64
|
+
}
|
|
67
65
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
66
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
67
|
+
// Size Variants
|
|
68
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
72
69
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
@include size-variant('avatar', 'xs')
|
|
71
|
+
{
|
|
72
|
+
--sk-avatar-size: 1.5rem;
|
|
73
|
+
}
|
|
77
74
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
75
|
+
@include size-variant('avatar', 'sm')
|
|
76
|
+
{
|
|
77
|
+
--sk-avatar-size: 2rem;
|
|
78
|
+
}
|
|
82
79
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
80
|
+
@include size-variant('avatar', 'md')
|
|
81
|
+
{
|
|
82
|
+
--sk-avatar-size: 2.5rem;
|
|
83
|
+
}
|
|
87
84
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
@include size-variant('avatar', 'lg')
|
|
86
|
+
{
|
|
87
|
+
--sk-avatar-size: 3rem;
|
|
88
|
+
}
|
|
91
89
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
90
|
+
@include size-variant('avatar', 'xl')
|
|
91
|
+
{
|
|
92
|
+
--sk-avatar-size: 4rem;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
96
|
+
// Shape Modifier (single-choice)
|
|
97
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
98
|
+
|
|
99
|
+
@include single-choice-modifier('avatar', 'shape', 'circle', 'shape')
|
|
100
|
+
{
|
|
101
|
+
border-radius: 50%;
|
|
102
|
+
|
|
103
|
+
// Override cut-border with a round shape
|
|
104
|
+
clip-path: circle(50%);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@include single-choice-modifier('avatar', 'shape', 'square', 'shape')
|
|
108
|
+
{
|
|
109
|
+
--sk-avatar-bevel: 0px;
|
|
110
|
+
border-radius: 0;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
114
|
+
// Defaults When Absent
|
|
115
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
116
|
+
|
|
117
|
+
// Default kind: neutral
|
|
118
|
+
$_avatar-kind-not: '';
|
|
119
|
+
@each $kind in $kinds
|
|
120
|
+
{
|
|
121
|
+
$_avatar-kind-not: $_avatar-kind-not + ':not(.sk-' + $kind + ')';
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.sk-avatar:where(#{ $_avatar-kind-not })
|
|
125
|
+
{
|
|
126
|
+
--sk-avatar-color-base: var(--sk-neutral-base);
|
|
127
|
+
--sk-avatar-fg: var(--sk-neutral-text);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Default size: md
|
|
131
|
+
@include defaults-when-absent('avatar', 'sk-size-')
|
|
132
|
+
{
|
|
133
|
+
--sk-avatar-size: 2.5rem;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
137
|
+
// Custom-Element API Defaults (attribute-absence path)
|
|
138
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
139
|
+
|
|
140
|
+
// Default kind: neutral
|
|
141
|
+
@include defaults-when-no-attr('avatar', 'kind')
|
|
142
|
+
{
|
|
143
|
+
--sk-avatar-color-base: var(--sk-neutral-base);
|
|
144
|
+
--sk-avatar-fg: var(--sk-neutral-text);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Default size: md
|
|
148
|
+
@include defaults-when-no-attr('avatar', 'size')
|
|
149
|
+
{
|
|
150
|
+
--sk-avatar-size: 2.5rem;
|
|
96
151
|
}
|
|
97
152
|
|
|
98
153
|
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -1,59 +1,61 @@
|
|
|
1
1
|
//----------------------------------------------------------------------------------------------------------------------
|
|
2
|
-
// Breadcrumbs Styles
|
|
2
|
+
// Breadcrumbs Component Styles
|
|
3
3
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
-
@use '
|
|
5
|
+
@use '../theme/variables' as *;
|
|
6
|
+
@use '../mixins' as *;
|
|
6
7
|
|
|
8
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
9
|
+
// Breadcrumbs Root
|
|
7
10
|
//----------------------------------------------------------------------------------------------------------------------
|
|
8
11
|
|
|
9
|
-
.sk-breadcrumbs
|
|
12
|
+
.sk-breadcrumbs,
|
|
13
|
+
sk-breadcrumbs
|
|
10
14
|
{
|
|
11
15
|
// Color tokens - Default to neutral
|
|
12
16
|
--sk-breadcrumbs-color-base: var(--sk-neutral-base);
|
|
13
17
|
--sk-breadcrumbs-fg: var(--sk-neutral-text);
|
|
18
|
+
}
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
--sk-breadcrumbs-color-base: var(--sk-neutral-base);
|
|
19
|
-
--sk-breadcrumbs-fg: var(--sk-neutral-text);
|
|
20
|
-
}
|
|
20
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
21
|
+
// Kind Variants
|
|
22
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
@each $kind in $semantic-kinds
|
|
25
|
+
{
|
|
26
|
+
@include kind-variant('breadcrumbs', $kind)
|
|
23
27
|
{
|
|
24
|
-
--sk-breadcrumbs-color-base: var(--sk-
|
|
25
|
-
--sk-breadcrumbs-fg: var(--sk-
|
|
28
|
+
--sk-breadcrumbs-color-base: var(--sk-#{ $kind }-base);
|
|
29
|
+
--sk-breadcrumbs-fg: var(--sk-#{ $kind }-text);
|
|
26
30
|
}
|
|
31
|
+
}
|
|
27
32
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
--sk-breadcrumbs-fg: var(--sk-accent-text);
|
|
32
|
-
}
|
|
33
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
34
|
+
// Defaults When Absent
|
|
35
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
33
36
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
// Default kind: neutral — explicit :not() chain for zero-specificity default.
|
|
38
|
+
$_breadcrumbs-kind-not: '';
|
|
39
|
+
@each $kind in $semantic-kinds
|
|
40
|
+
{
|
|
41
|
+
$_breadcrumbs-kind-not: $_breadcrumbs-kind-not + ':not(.sk-' + $kind + ')';
|
|
42
|
+
}
|
|
39
43
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
.sk-breadcrumbs:where(#{ $_breadcrumbs-kind-not })
|
|
45
|
+
{
|
|
46
|
+
--sk-breadcrumbs-color-base: var(--sk-neutral-base);
|
|
47
|
+
--sk-breadcrumbs-fg: var(--sk-neutral-text);
|
|
48
|
+
}
|
|
45
49
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
--sk-breadcrumbs-fg: var(--sk-warning-text);
|
|
50
|
-
}
|
|
50
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
51
|
+
// Custom-Element API Defaults (attribute-absence path)
|
|
52
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
51
53
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
// Default kind: neutral — fires when <sk-breadcrumbs> has no kind attribute.
|
|
55
|
+
@include defaults-when-no-attr('breadcrumbs', 'kind')
|
|
56
|
+
{
|
|
57
|
+
--sk-breadcrumbs-color-base: var(--sk-neutral-base);
|
|
58
|
+
--sk-breadcrumbs-fg: var(--sk-neutral-text);
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -444,7 +444,17 @@
|
|
|
444
444
|
// Size variants -- set chrome sizing vars; .sk-button-chrome consumes them below.
|
|
445
445
|
//------------------------------------------------------------------------------------------------------------------
|
|
446
446
|
|
|
447
|
-
|
|
447
|
+
// Default: md when no sk-size-* class is present (zero-specificity, explicit class wins)
|
|
448
|
+
&:where(:not([class*="sk-size-"]))
|
|
449
|
+
{
|
|
450
|
+
--sk-button-current-height: calc(var(--sk-button-height-base) * var(--sk-button-scale-md));
|
|
451
|
+
--sk-button-current-padding-x: var(--sk-button-padding-base);
|
|
452
|
+
--sk-button-current-font-size: calc(var(--sk-button-font-size-base) * var(--sk-button-font-scale-md));
|
|
453
|
+
--sk-button-current-cut-size: calc(var(--sk-button-current-height) / var(--sk-button-radius-factor));
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
&.sk-xs,
|
|
457
|
+
&.sk-size-xs
|
|
448
458
|
{
|
|
449
459
|
--sk-button-current-height: calc(var(--sk-button-height-base) * var(--sk-button-scale-xs));
|
|
450
460
|
--sk-button-current-padding-x: var(--sk-button-padding-xs);
|
|
@@ -452,7 +462,8 @@
|
|
|
452
462
|
--sk-button-current-cut-size: calc(var(--sk-button-current-height) / var(--sk-button-radius-factor));
|
|
453
463
|
}
|
|
454
464
|
|
|
455
|
-
&.sk-sm
|
|
465
|
+
&.sk-sm,
|
|
466
|
+
&.sk-size-sm
|
|
456
467
|
{
|
|
457
468
|
--sk-button-current-height: calc(var(--sk-button-height-base) * var(--sk-button-scale-sm));
|
|
458
469
|
--sk-button-current-padding-x: var(--sk-button-padding-base);
|
|
@@ -460,7 +471,8 @@
|
|
|
460
471
|
--sk-button-current-cut-size: calc(var(--sk-button-current-height) / var(--sk-button-radius-factor));
|
|
461
472
|
}
|
|
462
473
|
|
|
463
|
-
&.sk-md
|
|
474
|
+
&.sk-md,
|
|
475
|
+
&.sk-size-md
|
|
464
476
|
{
|
|
465
477
|
--sk-button-current-height: calc(var(--sk-button-height-base) * var(--sk-button-scale-md));
|
|
466
478
|
--sk-button-current-padding-x: var(--sk-button-padding-base);
|
|
@@ -468,7 +480,8 @@
|
|
|
468
480
|
--sk-button-current-cut-size: calc(var(--sk-button-current-height) / var(--sk-button-radius-factor));
|
|
469
481
|
}
|
|
470
482
|
|
|
471
|
-
&.sk-lg
|
|
483
|
+
&.sk-lg,
|
|
484
|
+
&.sk-size-lg
|
|
472
485
|
{
|
|
473
486
|
--sk-button-current-height: calc(var(--sk-button-height-base) * var(--sk-button-scale-lg));
|
|
474
487
|
--sk-button-current-padding-x: var(--sk-button-padding-base);
|
|
@@ -476,7 +489,8 @@
|
|
|
476
489
|
--sk-button-current-cut-size: calc(var(--sk-button-current-height) / var(--sk-button-radius-factor));
|
|
477
490
|
}
|
|
478
491
|
|
|
479
|
-
&.sk-xl
|
|
492
|
+
&.sk-xl,
|
|
493
|
+
&.sk-size-xl
|
|
480
494
|
{
|
|
481
495
|
--sk-button-current-height: calc(var(--sk-button-height-base) * var(--sk-button-scale-xl));
|
|
482
496
|
--sk-button-current-padding-x: var(--sk-button-padding-xl);
|
|
@@ -727,6 +741,45 @@
|
|
|
727
741
|
font-size: 1.25em;
|
|
728
742
|
}
|
|
729
743
|
}
|
|
744
|
+
|
|
745
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
746
|
+
// Defaults-when-absent: variant — solid when no explicit variant class present
|
|
747
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
748
|
+
|
|
749
|
+
&:where(:not(.sk-solid):not(.sk-outline):not(.sk-subtle):not(.sk-ghost):not(.sk-link))
|
|
750
|
+
{
|
|
751
|
+
@each $kind in $kinds
|
|
752
|
+
{
|
|
753
|
+
@include button-solid-kind($kind);
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
759
|
+
// Defaults-when-absent: kind — neutral when no explicit kind class is present.
|
|
760
|
+
// Can't use [class*="sk-"] because every Sleekspace class starts with "sk-".
|
|
761
|
+
// Instead build an explicit :not() chain for all kinds from $kinds, wrapped in :where() so any
|
|
762
|
+
// explicit kind class wins (zero specificity).
|
|
763
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
764
|
+
|
|
765
|
+
$_button-kind-not: '';
|
|
766
|
+
@each $kind in $kinds
|
|
767
|
+
{
|
|
768
|
+
$_button-kind-not: $_button-kind-not + ':not(.sk-' + $kind + ')';
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
.sk-button:where(#{ $_button-kind-not })
|
|
772
|
+
{
|
|
773
|
+
--sk-button-color-base: var(--sk-neutral-base);
|
|
774
|
+
--sk-button-text: var(--sk-neutral-text);
|
|
775
|
+
--sk-kind-color: var(--sk-neutral-base);
|
|
776
|
+
--sk-button-border-color: var(--sk-button-border-base);
|
|
777
|
+
|
|
778
|
+
.sk-button-chrome
|
|
779
|
+
{
|
|
780
|
+
background-color: var(--sk-button-bg);
|
|
781
|
+
color: var(--sk-button-text);
|
|
782
|
+
}
|
|
730
783
|
}
|
|
731
784
|
|
|
732
785
|
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -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
|
// Card Design Tokens
|
|
9
10
|
//----------------------------------------------------------------------------------------------------------------------
|
|
10
11
|
|
|
11
|
-
.sk-card
|
|
12
|
+
.sk-card,
|
|
13
|
+
sk-card
|
|
12
14
|
{
|
|
13
15
|
/// Padding for card sections
|
|
14
16
|
--sk-card-padding: 1rem;
|
|
@@ -111,7 +113,12 @@
|
|
|
111
113
|
min-height: 0; // Allow flex item to shrink below content size for scrolling
|
|
112
114
|
|
|
113
115
|
// Scrollable content uses .sk-panel-scroll-content class from panel
|
|
114
|
-
// which provides overflow, margin-bottom, and scrollbar styling
|
|
116
|
+
// which provides overflow, margin-bottom, and scrollbar styling.
|
|
117
|
+
// Drop the bottom padding so the scroll fade can meet the footer/edge cleanly.
|
|
118
|
+
&.sk-panel-scroll-content
|
|
119
|
+
{
|
|
120
|
+
padding-bottom: 0;
|
|
121
|
+
}
|
|
115
122
|
}
|
|
116
123
|
|
|
117
124
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -175,3 +182,58 @@
|
|
|
175
182
|
}
|
|
176
183
|
|
|
177
184
|
//----------------------------------------------------------------------------------------------------------------------
|
|
185
|
+
// Kind Variants
|
|
186
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
187
|
+
// Card inherits its color system from Panel (it renders AS a panel). These selectors exist to
|
|
188
|
+
// support the Layer 2 custom-element API (`<sk-card kind="primary">`) and ensure kind-specific
|
|
189
|
+
// panel tokens are set when the card element carries the kind attribute directly.
|
|
190
|
+
|
|
191
|
+
@each $kind in $kinds
|
|
192
|
+
{
|
|
193
|
+
@include kind-variant('card', $kind)
|
|
194
|
+
{
|
|
195
|
+
--sk-panel-color-base: var(--sk-#{ $kind }-base);
|
|
196
|
+
--sk-panel-fg: var(--sk-#{ $kind }-text);
|
|
197
|
+
--sk-kind-color: var(--sk-#{ $kind }-base);
|
|
198
|
+
--sk-panel-border-color: var(--sk-panel-border-base);
|
|
199
|
+
background-color: var(--sk-panel-bg);
|
|
200
|
+
color: var(--sk-panel-fg);
|
|
201
|
+
box-shadow: var(--sk-panel-glow);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
206
|
+
// Defaults When Absent
|
|
207
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
208
|
+
|
|
209
|
+
// Default kind: neutral — zero-specificity :not() chain so any explicit kind class wins.
|
|
210
|
+
$_card-kind-not: '';
|
|
211
|
+
@each $kind in $kinds
|
|
212
|
+
{
|
|
213
|
+
$_card-kind-not: $_card-kind-not + ':not(.sk-' + $kind + ')';
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.sk-card:where(#{ $_card-kind-not })
|
|
217
|
+
{
|
|
218
|
+
--sk-panel-color-base: var(--sk-neutral-base);
|
|
219
|
+
--sk-panel-fg: var(--sk-neutral-text);
|
|
220
|
+
--sk-kind-color: var(--sk-neutral-base);
|
|
221
|
+
--sk-panel-border-color: var(--sk-panel-border-base);
|
|
222
|
+
background-color: var(--sk-panel-bg);
|
|
223
|
+
color: var(--sk-panel-fg);
|
|
224
|
+
box-shadow: var(--sk-panel-glow);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Default kind for custom-element API — fires when <sk-card> has no kind attribute.
|
|
228
|
+
@include defaults-when-no-attr('card', 'kind')
|
|
229
|
+
{
|
|
230
|
+
--sk-panel-color-base: var(--sk-neutral-base);
|
|
231
|
+
--sk-panel-fg: var(--sk-neutral-text);
|
|
232
|
+
--sk-kind-color: var(--sk-neutral-base);
|
|
233
|
+
--sk-panel-border-color: var(--sk-panel-border-base);
|
|
234
|
+
background-color: var(--sk-panel-bg);
|
|
235
|
+
color: var(--sk-panel-fg);
|
|
236
|
+
box-shadow: var(--sk-panel-glow);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
//----------------------------------------------------------------------------------------------------------------------
|