@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
|
@@ -2,19 +2,28 @@
|
|
|
2
2
|
// Skeleton Component Styles
|
|
3
3
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
-
@use '
|
|
5
|
+
@use '../mixins' as *;
|
|
6
6
|
|
|
7
7
|
//----------------------------------------------------------------------------------------------------------------------
|
|
8
|
-
//
|
|
8
|
+
// Skeleton Design Tokens
|
|
9
9
|
//----------------------------------------------------------------------------------------------------------------------
|
|
10
10
|
|
|
11
|
-
.sk-skeleton
|
|
11
|
+
.sk-skeleton,
|
|
12
|
+
sk-skeleton
|
|
12
13
|
{
|
|
13
14
|
// CSS Variables
|
|
14
15
|
--sk-skeleton-base: oklch(from var(--sk-neutral-base) l c h / 0.12);
|
|
15
16
|
--sk-skeleton-highlight: oklch(from var(--sk-neutral-base) calc(l * 1.3) c h / 0.25);
|
|
16
17
|
--sk-skeleton-bevel: 0.35em;
|
|
18
|
+
}
|
|
17
19
|
|
|
20
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
21
|
+
// Base Skeleton
|
|
22
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
23
|
+
|
|
24
|
+
.sk-skeleton,
|
|
25
|
+
sk-skeleton
|
|
26
|
+
{
|
|
18
27
|
position: relative;
|
|
19
28
|
display: block;
|
|
20
29
|
background: var(--sk-skeleton-base);
|
|
@@ -22,67 +31,71 @@
|
|
|
22
31
|
|
|
23
32
|
// Default dimensions
|
|
24
33
|
min-height: 1em;
|
|
34
|
+
}
|
|
25
35
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
37
|
+
// Shape Modifiers
|
|
38
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
29
39
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
// Text variant — beveled corners (top-left and bottom-right) for text lines
|
|
41
|
+
@include single-choice-modifier('skeleton', 'shape', 'text')
|
|
42
|
+
{
|
|
43
|
+
--sk-skeleton-bevel: 0.35em;
|
|
44
|
+
height: 1em;
|
|
45
|
+
min-width: 2em;
|
|
46
|
+
clip-path: polygon(
|
|
47
|
+
var(--sk-skeleton-bevel) 0,
|
|
48
|
+
100% 0,
|
|
49
|
+
100% calc(100% - var(--sk-skeleton-bevel)),
|
|
50
|
+
calc(100% - var(--sk-skeleton-bevel)) 100%,
|
|
51
|
+
0 100%,
|
|
52
|
+
0 var(--sk-skeleton-bevel)
|
|
53
|
+
);
|
|
54
|
+
}
|
|
45
55
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
56
|
+
// Circular variant — perfect circle (avatar, icon placeholder)
|
|
57
|
+
@include single-choice-modifier('skeleton', 'shape', 'circular')
|
|
58
|
+
{
|
|
59
|
+
border-radius: 50%;
|
|
60
|
+
aspect-ratio: 1;
|
|
61
|
+
}
|
|
52
62
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
// Square variant — beveled top-left and bottom-right (avatar placeholder)
|
|
64
|
+
@include single-choice-modifier('skeleton', 'shape', 'square')
|
|
65
|
+
{
|
|
66
|
+
--sk-skeleton-bevel: var(--sk-radius-lg);
|
|
67
|
+
aspect-ratio: 1;
|
|
68
|
+
clip-path: polygon(
|
|
69
|
+
var(--sk-skeleton-bevel) 0,
|
|
70
|
+
100% 0,
|
|
71
|
+
100% calc(100% - var(--sk-skeleton-bevel)),
|
|
72
|
+
calc(100% - var(--sk-skeleton-bevel)) 100%,
|
|
73
|
+
0 100%,
|
|
74
|
+
0 var(--sk-skeleton-bevel)
|
|
75
|
+
);
|
|
76
|
+
}
|
|
67
77
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
// Rectangular variant — beveled bottom-right corner only (card, image placeholder)
|
|
79
|
+
@include single-choice-modifier('skeleton', 'shape', 'rectangular')
|
|
80
|
+
{
|
|
81
|
+
--sk-skeleton-bevel: var(--sk-radius-lg);
|
|
82
|
+
clip-path: polygon(
|
|
83
|
+
0 0,
|
|
84
|
+
100% 0,
|
|
85
|
+
100% calc(100% - var(--sk-skeleton-bevel)),
|
|
86
|
+
calc(100% - var(--sk-skeleton-bevel)) 100%,
|
|
87
|
+
0 100%
|
|
88
|
+
);
|
|
89
|
+
}
|
|
80
90
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
91
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
92
|
+
// Animation Modifiers
|
|
93
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
84
94
|
|
|
85
|
-
|
|
95
|
+
// Shimmer animation — sweeping highlight from left to right
|
|
96
|
+
@include bool-modifier('skeleton', 'shimmer')
|
|
97
|
+
{
|
|
98
|
+
&::after
|
|
86
99
|
{
|
|
87
100
|
content: '';
|
|
88
101
|
position: absolute;
|
|
@@ -95,15 +108,12 @@
|
|
|
95
108
|
);
|
|
96
109
|
animation: sk-skeleton-shimmer 1.5s ease-in-out infinite;
|
|
97
110
|
}
|
|
111
|
+
}
|
|
98
112
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
&.sk-pulse
|
|
104
|
-
{
|
|
105
|
-
animation: sk-skeleton-pulse 1.5s ease-in-out infinite;
|
|
106
|
-
}
|
|
113
|
+
// Pulse animation — opacity fade in/out
|
|
114
|
+
@include bool-modifier('skeleton', 'pulse')
|
|
115
|
+
{
|
|
116
|
+
animation: sk-skeleton-pulse 1.5s ease-in-out infinite;
|
|
107
117
|
}
|
|
108
118
|
|
|
109
119
|
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -146,7 +156,9 @@
|
|
|
146
156
|
@include reduced-motion
|
|
147
157
|
{
|
|
148
158
|
.sk-skeleton,
|
|
159
|
+
sk-skeleton,
|
|
149
160
|
.sk-skeleton::after,
|
|
161
|
+
sk-skeleton::after,
|
|
150
162
|
.sk-skeleton-shimmer::after
|
|
151
163
|
{
|
|
152
164
|
animation: none;
|
|
@@ -154,3 +166,37 @@
|
|
|
154
166
|
}
|
|
155
167
|
|
|
156
168
|
//----------------------------------------------------------------------------------------------------------------------
|
|
169
|
+
// Defaults When Absent
|
|
170
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
171
|
+
|
|
172
|
+
// Default shape: rectangular — fires when no sk-shape-* class is present.
|
|
173
|
+
@include defaults-when-absent('skeleton', 'sk-shape-')
|
|
174
|
+
{
|
|
175
|
+
--sk-skeleton-bevel: var(--sk-radius-lg);
|
|
176
|
+
clip-path: polygon(
|
|
177
|
+
0 0,
|
|
178
|
+
100% 0,
|
|
179
|
+
100% calc(100% - var(--sk-skeleton-bevel)),
|
|
180
|
+
calc(100% - var(--sk-skeleton-bevel)) 100%,
|
|
181
|
+
0 100%
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
186
|
+
// Custom-Element API Defaults (attribute-absence path)
|
|
187
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
188
|
+
|
|
189
|
+
// Default shape: rectangular — fires when <sk-skeleton> has no shape attribute.
|
|
190
|
+
@include defaults-when-no-attr('skeleton', 'shape')
|
|
191
|
+
{
|
|
192
|
+
--sk-skeleton-bevel: var(--sk-radius-lg);
|
|
193
|
+
clip-path: polygon(
|
|
194
|
+
0 0,
|
|
195
|
+
100% 0,
|
|
196
|
+
100% calc(100% - var(--sk-skeleton-bevel)),
|
|
197
|
+
calc(100% - var(--sk-skeleton-bevel)) 100%,
|
|
198
|
+
0 100%
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
// Slider Component Styles
|
|
3
3
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
-
@use '
|
|
6
|
-
|
|
7
|
-
//----------------------------------------------------------------------------------------------------------------------
|
|
8
|
-
|
|
9
|
-
$kinds: (neutral, primary, accent, info, success, warning, danger);
|
|
5
|
+
@use '../mixins/cut-border' as *;
|
|
6
|
+
@use '../theme/variables' as *;
|
|
10
7
|
|
|
11
8
|
//----------------------------------------------------------------------------------------------------------------------
|
|
12
9
|
// Kind Mixin
|
|
@@ -61,31 +58,43 @@ $kinds: (neutral, primary, accent, info, success, warning, danger);
|
|
|
61
58
|
// Size Variants
|
|
62
59
|
//------------------------------------------------------------------------------------------------------------------
|
|
63
60
|
|
|
64
|
-
|
|
61
|
+
// Default: md when no sk-size-* class is present (zero-specificity, explicit class wins)
|
|
62
|
+
&:where(:not([class*="sk-size-"]))
|
|
63
|
+
{
|
|
64
|
+
--sk-slider-track-size: 0.75rem;
|
|
65
|
+
--sk-slider-thumb-size: 1.25rem;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.sk-xs,
|
|
69
|
+
&.sk-size-xs
|
|
65
70
|
{
|
|
66
71
|
--sk-slider-track-size: 0.375rem;
|
|
67
72
|
--sk-slider-thumb-size: 0.75rem;
|
|
68
73
|
}
|
|
69
74
|
|
|
70
|
-
&.sk-sm
|
|
75
|
+
&.sk-sm,
|
|
76
|
+
&.sk-size-sm
|
|
71
77
|
{
|
|
72
78
|
--sk-slider-track-size: 0.5rem;
|
|
73
79
|
--sk-slider-thumb-size: 1rem;
|
|
74
80
|
}
|
|
75
81
|
|
|
76
|
-
&.sk-md
|
|
82
|
+
&.sk-md,
|
|
83
|
+
&.sk-size-md
|
|
77
84
|
{
|
|
78
85
|
--sk-slider-track-size: 0.75rem;
|
|
79
86
|
--sk-slider-thumb-size: 1.25rem;
|
|
80
87
|
}
|
|
81
88
|
|
|
82
|
-
&.sk-lg
|
|
89
|
+
&.sk-lg,
|
|
90
|
+
&.sk-size-lg
|
|
83
91
|
{
|
|
84
92
|
--sk-slider-track-size: 1rem;
|
|
85
93
|
--sk-slider-thumb-size: 1.5rem;
|
|
86
94
|
}
|
|
87
95
|
|
|
88
|
-
&.sk-xl
|
|
96
|
+
&.sk-xl,
|
|
97
|
+
&.sk-size-xl
|
|
89
98
|
{
|
|
90
99
|
--sk-slider-track-size: 1.25rem;
|
|
91
100
|
--sk-slider-thumb-size: 1.75rem;
|
|
@@ -261,3 +270,18 @@ $kinds: (neutral, primary, accent, info, success, warning, danger);
|
|
|
261
270
|
}
|
|
262
271
|
|
|
263
272
|
//----------------------------------------------------------------------------------------------------------------------
|
|
273
|
+
// Defaults-when-absent: kind — primary when no explicit kind class is present.
|
|
274
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
275
|
+
|
|
276
|
+
$_slider-kind-not: '';
|
|
277
|
+
@each $kind in $kinds
|
|
278
|
+
{
|
|
279
|
+
$_slider-kind-not: $_slider-kind-not + ':not(.sk-' + $kind + ')';
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.sk-slider:where(#{ $_slider-kind-not })
|
|
283
|
+
{
|
|
284
|
+
--sk-slider-color-base: var(--sk-primary-base);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -2,81 +2,81 @@
|
|
|
2
2
|
// Spinner Component Styles
|
|
3
3
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
-
@use '
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
@use '../theme/variables' as *;
|
|
6
|
+
@use '../mixins/dual-selector' as *;
|
|
7
|
+
@use '../mixins/responsive' as *;
|
|
8
8
|
|
|
9
9
|
//----------------------------------------------------------------------------------------------------------------------
|
|
10
|
-
//
|
|
10
|
+
// Spinner Design Tokens
|
|
11
11
|
//----------------------------------------------------------------------------------------------------------------------
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
.sk-spinner,
|
|
14
|
+
sk-spinner
|
|
14
15
|
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
// CSS Variables
|
|
17
|
+
--sk-spinner-color: var(--sk-primary-base);
|
|
18
|
+
--sk-spinner-size: 2rem;
|
|
19
|
+
--sk-spinner-border-width: var(--sk-border-width-normal);
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
//----------------------------------------------------------------------------------------------------------------------
|
|
22
23
|
// Spinner Root
|
|
23
24
|
//----------------------------------------------------------------------------------------------------------------------
|
|
24
25
|
|
|
25
|
-
.sk-spinner
|
|
26
|
+
.sk-spinner,
|
|
27
|
+
sk-spinner
|
|
26
28
|
{
|
|
27
|
-
// CSS Variables
|
|
28
|
-
--sk-spinner-color: var(--sk-primary-base);
|
|
29
|
-
--sk-spinner-size: 2rem;
|
|
30
|
-
--sk-spinner-border-width: var(--sk-border-width-normal);
|
|
31
|
-
|
|
32
29
|
display: inline-flex;
|
|
33
30
|
align-items: center;
|
|
34
31
|
justify-content: center;
|
|
35
32
|
width: var(--sk-spinner-size);
|
|
36
33
|
height: var(--sk-spinner-size);
|
|
34
|
+
}
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
37
|
+
// Kind Variants
|
|
38
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
@each $kind in $kinds
|
|
41
|
+
{
|
|
42
|
+
@include kind-variant('spinner', $kind)
|
|
43
43
|
{
|
|
44
|
-
--sk-spinner-
|
|
45
|
-
--sk-spinner-border-width: var(--sk-border-width-thin);
|
|
44
|
+
--sk-spinner-color: var(--sk-#{ $kind }-base);
|
|
46
45
|
}
|
|
46
|
+
}
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
--sk-spinner-border-width: var(--sk-border-width-thin);
|
|
52
|
-
}
|
|
48
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
49
|
+
// Size Variants
|
|
50
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
@include size-variant('spinner', 'xs')
|
|
53
|
+
{
|
|
54
|
+
--sk-spinner-size: 1rem;
|
|
55
|
+
--sk-spinner-border-width: var(--sk-border-width-thin);
|
|
56
|
+
}
|
|
59
57
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
@include size-variant('spinner', 'sm')
|
|
59
|
+
{
|
|
60
|
+
--sk-spinner-size: 1.5rem;
|
|
61
|
+
--sk-spinner-border-width: var(--sk-border-width-thin);
|
|
62
|
+
}
|
|
65
63
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
64
|
+
@include size-variant('spinner', 'md')
|
|
65
|
+
{
|
|
66
|
+
--sk-spinner-size: 2rem;
|
|
67
|
+
--sk-spinner-border-width: var(--sk-border-width-normal);
|
|
68
|
+
}
|
|
71
69
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
@include size-variant('spinner', 'lg')
|
|
71
|
+
{
|
|
72
|
+
--sk-spinner-size: 2.5rem;
|
|
73
|
+
--sk-spinner-border-width: var(--sk-border-width-normal);
|
|
74
|
+
}
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
@include size-variant('spinner', 'xl')
|
|
77
|
+
{
|
|
78
|
+
--sk-spinner-size: 3rem;
|
|
79
|
+
--sk-spinner-border-width: var(--sk-border-width-thick);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -287,7 +287,8 @@ $kinds: (neutral, primary, accent, info, success, warning, danger);
|
|
|
287
287
|
// Folding Variant - Expanding Orbit
|
|
288
288
|
//----------------------------------------------------------------------------------------------------------------------
|
|
289
289
|
|
|
290
|
-
.sk-crosshair-loader
|
|
290
|
+
.sk-crosshair-loader
|
|
291
|
+
{
|
|
291
292
|
width: var(--sk-spinner-size);
|
|
292
293
|
aspect-ratio: 1;
|
|
293
294
|
color: var(--sk-spinner-color);
|
|
@@ -295,7 +296,8 @@ $kinds: (neutral, primary, accent, info, success, warning, danger);
|
|
|
295
296
|
background: radial-gradient(calc(var(--sk-spinner-size) * 0.25), currentColor 94%, #0000);
|
|
296
297
|
}
|
|
297
298
|
|
|
298
|
-
.sk-crosshair-loader
|
|
299
|
+
.sk-crosshair-loader::before
|
|
300
|
+
{
|
|
299
301
|
content: '';
|
|
300
302
|
position: absolute;
|
|
301
303
|
inset: 0;
|
|
@@ -309,21 +311,29 @@ $kinds: (neutral, primary, accent, info, success, warning, danger);
|
|
|
309
311
|
animation: l18 1.5s infinite cubic-bezier(0.3, 1, 0, 1);
|
|
310
312
|
}
|
|
311
313
|
|
|
312
|
-
@keyframes l18
|
|
313
|
-
|
|
314
|
+
@keyframes l18
|
|
315
|
+
{
|
|
316
|
+
0%
|
|
317
|
+
{
|
|
314
318
|
opacity: 0.3;
|
|
315
319
|
}
|
|
316
|
-
|
|
320
|
+
|
|
321
|
+
33%
|
|
322
|
+
{
|
|
317
323
|
inset: calc(var(--sk-spinner-size) * -0.25);
|
|
318
324
|
transform: rotate(0deg);
|
|
319
325
|
opacity: 1;
|
|
320
326
|
}
|
|
321
|
-
|
|
327
|
+
|
|
328
|
+
66%
|
|
329
|
+
{
|
|
322
330
|
inset: calc(var(--sk-spinner-size) * -0.25);
|
|
323
331
|
transform: rotate(90deg);
|
|
324
332
|
opacity: 1;
|
|
325
333
|
}
|
|
326
|
-
|
|
334
|
+
|
|
335
|
+
100%
|
|
336
|
+
{
|
|
327
337
|
inset: 0;
|
|
328
338
|
transform: rotate(90deg);
|
|
329
339
|
opacity: 0.3;
|
|
@@ -337,10 +347,51 @@ $kinds: (neutral, primary, accent, info, success, warning, danger);
|
|
|
337
347
|
|
|
338
348
|
@include reduced-motion
|
|
339
349
|
{
|
|
340
|
-
.sk-spinner
|
|
350
|
+
.sk-spinner *,
|
|
351
|
+
sk-spinner *
|
|
341
352
|
{
|
|
342
353
|
animation-duration: 8s !important;
|
|
343
354
|
}
|
|
344
355
|
}
|
|
345
356
|
|
|
346
357
|
//----------------------------------------------------------------------------------------------------------------------
|
|
358
|
+
// Defaults When Absent
|
|
359
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
360
|
+
|
|
361
|
+
// Default size: md — fires when no sk-size-* class is present.
|
|
362
|
+
@include defaults-when-absent('spinner', 'sk-size-')
|
|
363
|
+
{
|
|
364
|
+
--sk-spinner-size: 2rem;
|
|
365
|
+
--sk-spinner-border-width: var(--sk-border-width-normal);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// Default kind: primary — explicit :not() chain for zero-specificity default.
|
|
369
|
+
$_spinner-kind-not: '';
|
|
370
|
+
@each $kind in $kinds
|
|
371
|
+
{
|
|
372
|
+
$_spinner-kind-not: $_spinner-kind-not + ':not(.sk-' + $kind + ')';
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
.sk-spinner:where(#{ $_spinner-kind-not })
|
|
376
|
+
{
|
|
377
|
+
--sk-spinner-color: var(--sk-primary-base);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
381
|
+
// Custom-Element API Defaults (attribute-absence path)
|
|
382
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
383
|
+
|
|
384
|
+
// Default kind: primary — fires when <sk-spinner> has no kind attribute.
|
|
385
|
+
@include defaults-when-no-attr('spinner', 'kind')
|
|
386
|
+
{
|
|
387
|
+
--sk-spinner-color: var(--sk-primary-base);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// Default size: md — fires when <sk-spinner> has no size attribute.
|
|
391
|
+
@include defaults-when-no-attr('spinner', 'size')
|
|
392
|
+
{
|
|
393
|
+
--sk-spinner-size: 2rem;
|
|
394
|
+
--sk-spinner-border-width: var(--sk-border-width-normal);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -85,6 +85,25 @@
|
|
|
85
85
|
--sk-switch-track-border-color: var(--sk-switch-color-base);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
89
|
+
// Defaults-when-absent: kind — primary when no explicit kind class is present.
|
|
90
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
91
|
+
|
|
92
|
+
$_switch-kind-not: '';
|
|
93
|
+
@each $kind in $kinds
|
|
94
|
+
{
|
|
95
|
+
$_switch-kind-not: $_switch-kind-not + ':not(.sk-' + $kind + ')';
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.sk-switch:where(#{ $_switch-kind-not })
|
|
99
|
+
{
|
|
100
|
+
--sk-switch-color-base: var(--sk-primary-base);
|
|
101
|
+
--sk-switch-fg: var(--sk-primary-text);
|
|
102
|
+
--sk-switch-track-border-color: var(--sk-primary-base);
|
|
103
|
+
--sk-switch-thumb-color: color-mix(in oklch, var(--sk-primary-base), black 20%);
|
|
104
|
+
--sk-switch-thumb-border-color: color-mix(in oklch, var(--sk-primary-base), black 20%);
|
|
105
|
+
}
|
|
106
|
+
|
|
88
107
|
//----------------------------------------------------------------------------------------------------------------------
|
|
89
108
|
// Switch Wrapper (contains switch + label)
|
|
90
109
|
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -114,6 +133,13 @@
|
|
|
114
133
|
|
|
115
134
|
.sk-switch
|
|
116
135
|
{
|
|
136
|
+
// Default: md when no sk-size-* class is present (zero-specificity, explicit class wins)
|
|
137
|
+
&:where(:not([class*="sk-size-"]))
|
|
138
|
+
{
|
|
139
|
+
// md is the default; .sk-switch-wrapper:has(.sk-switch:not(.sk-size-*)) will use md tokens
|
|
140
|
+
--sk-switch-size: md;
|
|
141
|
+
}
|
|
142
|
+
|
|
117
143
|
position: relative;
|
|
118
144
|
width: var(--sk-switch-track-width);
|
|
119
145
|
height: var(--sk-switch-track-height);
|
|
@@ -277,35 +303,40 @@
|
|
|
277
303
|
|
|
278
304
|
.sk-switch-wrapper
|
|
279
305
|
{
|
|
280
|
-
&:has(.sk-switch.sk-xs)
|
|
306
|
+
&:has(.sk-switch.sk-xs),
|
|
307
|
+
&:has(.sk-switch.sk-size-xs)
|
|
281
308
|
{
|
|
282
309
|
--sk-switch-track-width: 24px;
|
|
283
310
|
--sk-switch-track-height: 14px;
|
|
284
311
|
--sk-switch-thumb-size: 8px;
|
|
285
312
|
}
|
|
286
313
|
|
|
287
|
-
&:has(.sk-switch.sk-sm)
|
|
314
|
+
&:has(.sk-switch.sk-sm),
|
|
315
|
+
&:has(.sk-switch.sk-size-sm)
|
|
288
316
|
{
|
|
289
317
|
--sk-switch-track-width: 28px;
|
|
290
318
|
--sk-switch-track-height: 16px;
|
|
291
319
|
--sk-switch-thumb-size: 8px;
|
|
292
320
|
}
|
|
293
321
|
|
|
294
|
-
&:has(.sk-switch.sk-md)
|
|
322
|
+
&:has(.sk-switch.sk-md),
|
|
323
|
+
&:has(.sk-switch.sk-size-md)
|
|
295
324
|
{
|
|
296
325
|
--sk-switch-track-width: 36px;
|
|
297
326
|
--sk-switch-track-height: 20px;
|
|
298
327
|
--sk-switch-thumb-size: 12px;
|
|
299
328
|
}
|
|
300
329
|
|
|
301
|
-
&:has(.sk-switch.sk-lg)
|
|
330
|
+
&:has(.sk-switch.sk-lg),
|
|
331
|
+
&:has(.sk-switch.sk-size-lg)
|
|
302
332
|
{
|
|
303
333
|
--sk-switch-track-width: 44px;
|
|
304
334
|
--sk-switch-track-height: 24px;
|
|
305
335
|
--sk-switch-thumb-size: 16px;
|
|
306
336
|
}
|
|
307
337
|
|
|
308
|
-
&:has(.sk-switch.sk-xl)
|
|
338
|
+
&:has(.sk-switch.sk-xl),
|
|
339
|
+
&:has(.sk-switch.sk-size-xl)
|
|
309
340
|
{
|
|
310
341
|
--sk-switch-track-width: 52px;
|
|
311
342
|
--sk-switch-track-height: 28px;
|