@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
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
// NavBar Design Tokens
|
|
10
10
|
//----------------------------------------------------------------------------------------------------------------------
|
|
11
11
|
|
|
12
|
-
.sk-navbar
|
|
12
|
+
.sk-navbar,
|
|
13
|
+
sk-navbar
|
|
13
14
|
{
|
|
14
15
|
//------------------------------------------------------------------------------------------------------------------
|
|
15
16
|
// Dimension Tokens
|
|
@@ -76,38 +77,12 @@
|
|
|
76
77
|
oklch(from var(--sk-navbar-color-base) l c h / var(--sk-navbar-glow-opacity));
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
//----------------------------------------------------------------------------------------------------------------------
|
|
80
|
-
// Kind Mixin
|
|
81
|
-
//----------------------------------------------------------------------------------------------------------------------
|
|
82
|
-
|
|
83
|
-
@mixin navbar-kind($kind)
|
|
84
|
-
{
|
|
85
|
-
&.sk-#{ "" + $kind }
|
|
86
|
-
{
|
|
87
|
-
// Override base color tokens for this kind
|
|
88
|
-
--sk-navbar-color-base: var(--sk-#{ $kind }-base);
|
|
89
|
-
--sk-navbar-fg: var(--sk-#{ $kind }-text);
|
|
90
|
-
|
|
91
|
-
// Set generic kind color for list markers and other cross-component features
|
|
92
|
-
--sk-kind-color: var(--sk-#{ $kind }-base);
|
|
93
|
-
|
|
94
|
-
// Set dynamic border color
|
|
95
|
-
--sk-navbar-border-color: var(--sk-navbar-border-base);
|
|
96
|
-
|
|
97
|
-
// Use calculated background and foreground
|
|
98
|
-
background-color: var(--sk-navbar-bg);
|
|
99
|
-
color: var(--sk-navbar-fg);
|
|
100
|
-
|
|
101
|
-
// Apply inner glow
|
|
102
|
-
box-shadow: var(--sk-navbar-glow);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
80
|
//----------------------------------------------------------------------------------------------------------------------
|
|
107
81
|
// Base NavBar Styles
|
|
108
82
|
//----------------------------------------------------------------------------------------------------------------------
|
|
109
83
|
|
|
110
|
-
.sk-navbar
|
|
84
|
+
.sk-navbar,
|
|
85
|
+
sk-navbar
|
|
111
86
|
{
|
|
112
87
|
// Base structure
|
|
113
88
|
display: block;
|
|
@@ -136,17 +111,6 @@
|
|
|
136
111
|
$corners: (bottom-left bottom-right)
|
|
137
112
|
);
|
|
138
113
|
|
|
139
|
-
//------------------------------------------------------------------------------------------------------------------
|
|
140
|
-
// Sticky positioning
|
|
141
|
-
//------------------------------------------------------------------------------------------------------------------
|
|
142
|
-
|
|
143
|
-
&.sk-sticky
|
|
144
|
-
{
|
|
145
|
-
position: sticky;
|
|
146
|
-
top: 0;
|
|
147
|
-
z-index: var(--sk-z-sticky);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
114
|
//------------------------------------------------------------------------------------------------------------------
|
|
151
115
|
// Content container
|
|
152
116
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -260,15 +224,82 @@
|
|
|
260
224
|
flex-shrink: 0;
|
|
261
225
|
margin-left: auto;
|
|
262
226
|
}
|
|
227
|
+
}
|
|
263
228
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
229
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
230
|
+
// Kind Variants
|
|
231
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
267
232
|
|
|
268
|
-
|
|
233
|
+
@each $kind in $kinds
|
|
234
|
+
{
|
|
235
|
+
@include kind-variant('navbar', $kind)
|
|
269
236
|
{
|
|
270
|
-
|
|
237
|
+
// Override base color tokens for this kind
|
|
238
|
+
--sk-navbar-color-base: var(--sk-#{ $kind }-base);
|
|
239
|
+
--sk-navbar-fg: var(--sk-#{ $kind }-text);
|
|
240
|
+
|
|
241
|
+
// Set generic kind color for list markers and other cross-component features
|
|
242
|
+
--sk-kind-color: var(--sk-#{ $kind }-base);
|
|
243
|
+
|
|
244
|
+
// Set dynamic border color
|
|
245
|
+
--sk-navbar-border-color: var(--sk-navbar-border-base);
|
|
246
|
+
|
|
247
|
+
// Use calculated background and foreground
|
|
248
|
+
background-color: var(--sk-navbar-bg);
|
|
249
|
+
color: var(--sk-navbar-fg);
|
|
250
|
+
|
|
251
|
+
// Apply inner glow
|
|
252
|
+
box-shadow: var(--sk-navbar-glow);
|
|
271
253
|
}
|
|
272
254
|
}
|
|
273
255
|
|
|
274
256
|
//----------------------------------------------------------------------------------------------------------------------
|
|
257
|
+
// Sticky Modifier
|
|
258
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
259
|
+
|
|
260
|
+
@include bool-modifier('navbar', 'sticky')
|
|
261
|
+
{
|
|
262
|
+
position: sticky;
|
|
263
|
+
top: 0;
|
|
264
|
+
z-index: var(--sk-z-sticky);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
268
|
+
// Defaults When Absent
|
|
269
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
270
|
+
|
|
271
|
+
// Default kind: neutral — explicit :not() chain for zero-specificity default.
|
|
272
|
+
$_navbar-kind-not: '';
|
|
273
|
+
@each $kind in $kinds
|
|
274
|
+
{
|
|
275
|
+
$_navbar-kind-not: $_navbar-kind-not + ':not(.sk-' + $kind + ')';
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.sk-navbar:where(#{ $_navbar-kind-not })
|
|
279
|
+
{
|
|
280
|
+
--sk-navbar-color-base: var(--sk-neutral-base);
|
|
281
|
+
--sk-navbar-fg: var(--sk-neutral-text);
|
|
282
|
+
--sk-kind-color: var(--sk-neutral-base);
|
|
283
|
+
--sk-navbar-border-color: var(--sk-navbar-border-base);
|
|
284
|
+
background-color: var(--sk-navbar-bg);
|
|
285
|
+
color: var(--sk-navbar-fg);
|
|
286
|
+
box-shadow: var(--sk-navbar-glow);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
290
|
+
// Custom-Element API Defaults (attribute-absence path)
|
|
291
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
292
|
+
|
|
293
|
+
// Default kind: neutral — fires when <sk-navbar> has no kind attribute.
|
|
294
|
+
@include defaults-when-no-attr('navbar', 'kind')
|
|
295
|
+
{
|
|
296
|
+
--sk-navbar-color-base: var(--sk-neutral-base);
|
|
297
|
+
--sk-navbar-fg: var(--sk-neutral-text);
|
|
298
|
+
--sk-kind-color: var(--sk-neutral-base);
|
|
299
|
+
--sk-navbar-border-color: var(--sk-navbar-border-base);
|
|
300
|
+
background-color: var(--sk-navbar-bg);
|
|
301
|
+
color: var(--sk-navbar-fg);
|
|
302
|
+
box-shadow: var(--sk-navbar-glow);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
-
@use '
|
|
1
|
+
@use '../mixins/cut-border' as *;
|
|
2
|
+
@use '../theme/variables' as *;
|
|
2
3
|
|
|
3
4
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
5
|
// NumberInput Component Styles
|
|
6
|
+
//
|
|
7
|
+
// The wrapper carries a fixed intrinsic height per size variant so that flex/grid parents with
|
|
8
|
+
// `align-items: stretch` (or taller siblings) don't inflate the component and strand the input
|
|
9
|
+
// and stepper buttons in dead space. Internal layout stretches to fill that height: the input
|
|
10
|
+
// field and steppers use `height: 100%`, and the two stepper buttons share the space via
|
|
11
|
+
// `flex: 1`, which also eliminates the 1px mismatch caused by the increment's bottom border.
|
|
5
12
|
//----------------------------------------------------------------------------------------------------------------------
|
|
6
13
|
|
|
7
14
|
.sk-number-input-wrapper
|
|
@@ -10,12 +17,21 @@
|
|
|
10
17
|
--sk-number-input-color-base: var(--sk-neutral-base);
|
|
11
18
|
--sk-number-input-fg: var(--sk-neutral-text);
|
|
12
19
|
|
|
13
|
-
//
|
|
20
|
+
// Size tokens (overridden per size variant below)
|
|
21
|
+
--sk-number-input-height: 2.5rem;
|
|
22
|
+
--sk-number-input-padding-x: var(--sk-space-md);
|
|
23
|
+
--sk-number-input-font-size: 1rem;
|
|
24
|
+
--sk-number-input-stepper-width: 2rem;
|
|
25
|
+
--sk-number-input-stepper-icon: 1rem;
|
|
14
26
|
--sk-number-input-cut: 0.5rem;
|
|
15
27
|
|
|
16
28
|
position: relative;
|
|
17
|
-
display:
|
|
29
|
+
display: flex;
|
|
18
30
|
width: 100%;
|
|
31
|
+
height: var(--sk-number-input-height);
|
|
32
|
+
flex: 0 0 auto;
|
|
33
|
+
align-self: center;
|
|
34
|
+
vertical-align: middle;
|
|
19
35
|
|
|
20
36
|
// Kind variants
|
|
21
37
|
&.sk-neutral
|
|
@@ -110,23 +126,59 @@
|
|
|
110
126
|
}
|
|
111
127
|
|
|
112
128
|
// Size variants
|
|
113
|
-
|
|
129
|
+
|
|
130
|
+
// Default: md when no sk-size-* class is present (zero-specificity, explicit class wins)
|
|
131
|
+
&:where(:not([class*="sk-size-"]))
|
|
132
|
+
{
|
|
133
|
+
--sk-number-input-height: 2.5rem;
|
|
134
|
+
--sk-number-input-padding-x: var(--sk-space-md);
|
|
135
|
+
--sk-number-input-font-size: 1rem;
|
|
136
|
+
--sk-number-input-stepper-width: 2rem;
|
|
137
|
+
--sk-number-input-stepper-icon: 1rem;
|
|
138
|
+
--sk-number-input-cut: 0.5rem;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&.sk-sm,
|
|
142
|
+
&.sk-size-sm
|
|
114
143
|
{
|
|
144
|
+
--sk-number-input-height: 2rem;
|
|
145
|
+
--sk-number-input-padding-x: var(--sk-space-sm);
|
|
146
|
+
--sk-number-input-font-size: 0.875rem;
|
|
147
|
+
--sk-number-input-stepper-width: 1.5rem;
|
|
148
|
+
--sk-number-input-stepper-icon: 0.75rem;
|
|
115
149
|
--sk-number-input-cut: 0.4rem;
|
|
116
150
|
}
|
|
117
151
|
|
|
118
|
-
&.sk-md
|
|
152
|
+
&.sk-md,
|
|
153
|
+
&.sk-size-md
|
|
119
154
|
{
|
|
155
|
+
--sk-number-input-height: 2.5rem;
|
|
156
|
+
--sk-number-input-padding-x: var(--sk-space-md);
|
|
157
|
+
--sk-number-input-font-size: 1rem;
|
|
158
|
+
--sk-number-input-stepper-width: 2rem;
|
|
159
|
+
--sk-number-input-stepper-icon: 1rem;
|
|
120
160
|
--sk-number-input-cut: 0.5rem;
|
|
121
161
|
}
|
|
122
162
|
|
|
123
|
-
&.sk-lg
|
|
163
|
+
&.sk-lg,
|
|
164
|
+
&.sk-size-lg
|
|
124
165
|
{
|
|
166
|
+
--sk-number-input-height: 3rem;
|
|
167
|
+
--sk-number-input-padding-x: var(--sk-space-md);
|
|
168
|
+
--sk-number-input-font-size: 1.125rem;
|
|
169
|
+
--sk-number-input-stepper-width: 2.25rem;
|
|
170
|
+
--sk-number-input-stepper-icon: 1.125rem;
|
|
125
171
|
--sk-number-input-cut: 0.6rem;
|
|
126
172
|
}
|
|
127
173
|
|
|
128
|
-
&.sk-xl
|
|
174
|
+
&.sk-xl,
|
|
175
|
+
&.sk-size-xl
|
|
129
176
|
{
|
|
177
|
+
--sk-number-input-height: 3.5rem;
|
|
178
|
+
--sk-number-input-padding-x: var(--sk-space-md);
|
|
179
|
+
--sk-number-input-font-size: 1.25rem;
|
|
180
|
+
--sk-number-input-stepper-width: 2.5rem;
|
|
181
|
+
--sk-number-input-stepper-icon: 1.25rem;
|
|
130
182
|
--sk-number-input-cut: 0.7rem;
|
|
131
183
|
}
|
|
132
184
|
}
|
|
@@ -136,8 +188,9 @@
|
|
|
136
188
|
.sk-number-input
|
|
137
189
|
{
|
|
138
190
|
display: flex;
|
|
139
|
-
align-items:
|
|
191
|
+
align-items: stretch;
|
|
140
192
|
width: 100%;
|
|
193
|
+
height: 100%;
|
|
141
194
|
position: relative;
|
|
142
195
|
|
|
143
196
|
@include cut-border(
|
|
@@ -189,6 +242,10 @@
|
|
|
189
242
|
.sk-number-input-field
|
|
190
243
|
{
|
|
191
244
|
flex: 1;
|
|
245
|
+
min-width: 0;
|
|
246
|
+
height: 100%;
|
|
247
|
+
padding: 0 var(--sk-number-input-padding-x);
|
|
248
|
+
font-size: var(--sk-number-input-font-size);
|
|
192
249
|
background: transparent;
|
|
193
250
|
border: none;
|
|
194
251
|
color: var(--sk-number-input-fg);
|
|
@@ -196,35 +253,6 @@
|
|
|
196
253
|
outline: none;
|
|
197
254
|
cursor: text;
|
|
198
255
|
|
|
199
|
-
// Size variants (match input heights)
|
|
200
|
-
.sk-number-input-wrapper.sk-sm &
|
|
201
|
-
{
|
|
202
|
-
height: 2rem;
|
|
203
|
-
padding: 0 var(--sk-space-sm);
|
|
204
|
-
font-size: 0.875rem;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.sk-number-input-wrapper.sk-md &
|
|
208
|
-
{
|
|
209
|
-
height: 2.5rem;
|
|
210
|
-
padding: 0 var(--sk-space-md);
|
|
211
|
-
font-size: 1rem;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.sk-number-input-wrapper.sk-lg &
|
|
215
|
-
{
|
|
216
|
-
height: 3rem;
|
|
217
|
-
padding: 0 var(--sk-space-md);
|
|
218
|
-
font-size: 1.125rem;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.sk-number-input-wrapper.sk-xl &
|
|
222
|
-
{
|
|
223
|
-
height: 3.5rem;
|
|
224
|
-
padding: 0 var(--sk-space-md);
|
|
225
|
-
font-size: 1.25rem;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
256
|
&::placeholder
|
|
229
257
|
{
|
|
230
258
|
color: color-mix(in oklch, var(--sk-number-input-fg), transparent 50%);
|
|
@@ -242,6 +270,8 @@
|
|
|
242
270
|
{
|
|
243
271
|
display: flex;
|
|
244
272
|
flex-direction: column;
|
|
273
|
+
flex: 0 0 var(--sk-number-input-stepper-width);
|
|
274
|
+
height: 100%;
|
|
245
275
|
border-left: var(--sk-border-width-thin) solid var(--sk-number-input-color-base);
|
|
246
276
|
}
|
|
247
277
|
|
|
@@ -250,6 +280,8 @@
|
|
|
250
280
|
.sk-number-input-increment,
|
|
251
281
|
.sk-number-input-decrement
|
|
252
282
|
{
|
|
283
|
+
flex: 1 1 0;
|
|
284
|
+
min-height: 0;
|
|
253
285
|
display: flex;
|
|
254
286
|
align-items: center;
|
|
255
287
|
justify-content: center;
|
|
@@ -261,53 +293,10 @@
|
|
|
261
293
|
transition-duration: var(--sk-transition-duration-base);
|
|
262
294
|
padding: 0 var(--sk-space-xs);
|
|
263
295
|
|
|
264
|
-
|
|
265
|
-
.sk-number-input-wrapper.sk-sm &
|
|
266
|
-
{
|
|
267
|
-
width: 1.5rem;
|
|
268
|
-
height: 1rem;
|
|
269
|
-
|
|
270
|
-
svg
|
|
271
|
-
{
|
|
272
|
-
width: 0.75rem;
|
|
273
|
-
height: 0.75rem;
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
.sk-number-input-wrapper.sk-md &
|
|
278
|
-
{
|
|
279
|
-
width: 2rem;
|
|
280
|
-
height: 1.25rem;
|
|
281
|
-
|
|
282
|
-
svg
|
|
283
|
-
{
|
|
284
|
-
width: 1rem;
|
|
285
|
-
height: 1rem;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.sk-number-input-wrapper.sk-lg &
|
|
296
|
+
svg
|
|
290
297
|
{
|
|
291
|
-
width:
|
|
292
|
-
height:
|
|
293
|
-
|
|
294
|
-
svg
|
|
295
|
-
{
|
|
296
|
-
width: 1.125rem;
|
|
297
|
-
height: 1.125rem;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.sk-number-input-wrapper.sk-xl &
|
|
302
|
-
{
|
|
303
|
-
width: 2.5rem;
|
|
304
|
-
height: 1.75rem;
|
|
305
|
-
|
|
306
|
-
svg
|
|
307
|
-
{
|
|
308
|
-
width: 1.25rem;
|
|
309
|
-
height: 1.25rem;
|
|
310
|
-
}
|
|
298
|
+
width: var(--sk-number-input-stepper-icon);
|
|
299
|
+
height: var(--sk-number-input-stepper-icon);
|
|
311
300
|
}
|
|
312
301
|
|
|
313
302
|
&:hover:not(:disabled)
|
|
@@ -351,3 +340,19 @@
|
|
|
351
340
|
}
|
|
352
341
|
|
|
353
342
|
//----------------------------------------------------------------------------------------------------------------------
|
|
343
|
+
// Defaults-when-absent: kind — neutral when no explicit kind class is present on the wrapper.
|
|
344
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
345
|
+
|
|
346
|
+
$_number-input-kind-not: '';
|
|
347
|
+
@each $kind in $kinds
|
|
348
|
+
{
|
|
349
|
+
$_number-input-kind-not: $_number-input-kind-not + ':not(.sk-' + $kind + ')';
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.sk-number-input-wrapper:where(#{ $_number-input-kind-not })
|
|
353
|
+
{
|
|
354
|
+
--sk-number-input-color-base: var(--sk-neutral-base);
|
|
355
|
+
--sk-number-input-fg: var(--sk-neutral-text);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -4,7 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
@use '../mixins' as *;
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
8
|
+
// Page Design Tokens
|
|
9
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
10
|
+
|
|
11
|
+
.sk-page,
|
|
12
|
+
sk-page
|
|
8
13
|
{
|
|
9
14
|
// CSS Variables
|
|
10
15
|
--sk-page-header-height: auto;
|
|
@@ -22,12 +27,15 @@
|
|
|
22
27
|
// `.sk-page-main` applies this as padding; the center content fills it without adding its own.
|
|
23
28
|
// Use the `flush` prop (or override `--sk-page-gap: 0`) for a full-bleed layout.
|
|
24
29
|
--sk-page-gap: 1rem;
|
|
30
|
+
}
|
|
25
31
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
32
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
33
|
+
// Base Page Styles
|
|
34
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
30
35
|
|
|
36
|
+
.sk-page,
|
|
37
|
+
sk-page
|
|
38
|
+
{
|
|
31
39
|
// position: relative so drawers (absolute) are bounded by the page, not the viewport. In
|
|
32
40
|
// full-viewport usage this naturally covers the screen; in embedded usage (e.g. docs demos)
|
|
33
41
|
// the drawer stays inside the page container.
|
|
@@ -53,15 +61,6 @@
|
|
|
53
61
|
z-index: 10;
|
|
54
62
|
}
|
|
55
63
|
|
|
56
|
-
&.sk-fixed-header
|
|
57
|
-
{
|
|
58
|
-
.sk-page-header
|
|
59
|
-
{
|
|
60
|
-
position: sticky;
|
|
61
|
-
top: 0;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
64
|
//------------------------------------------------------------------------------------------------------------------
|
|
66
65
|
// Subheader (full-width row below header, above the main row)
|
|
67
66
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -176,15 +175,6 @@
|
|
|
176
175
|
z-index: 10;
|
|
177
176
|
}
|
|
178
177
|
|
|
179
|
-
&.sk-fixed-footer
|
|
180
|
-
{
|
|
181
|
-
.sk-page-footer
|
|
182
|
-
{
|
|
183
|
-
position: sticky;
|
|
184
|
-
bottom: 0;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
178
|
//------------------------------------------------------------------------------------------------------------------
|
|
189
179
|
// Drawer (off-canvas). One ruleset serves both sides; positioning differs per class.
|
|
190
180
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -243,6 +233,62 @@
|
|
|
243
233
|
}
|
|
244
234
|
}
|
|
245
235
|
|
|
236
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
237
|
+
// Flush Modifier (zero gap / full-bleed layout)
|
|
238
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
239
|
+
|
|
240
|
+
@include bool-modifier('page', 'flush')
|
|
241
|
+
{
|
|
242
|
+
--sk-page-gap: 0;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
246
|
+
// No-Bounce Modifier (disable rubber-band overscroll on SkPage's scroll containers)
|
|
247
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
248
|
+
// `overscroll-behavior` is per-scroll-container, not inherited, so we have to hit each
|
|
249
|
+
// scrollable region explicitly. Also applied to the root in case SkPage itself is the
|
|
250
|
+
// scroller (e.g. wrapped in a height-constrained ancestor with overflow on .sk-page).
|
|
251
|
+
// The document-level bounce from scrolling the page itself lives on html/body and is
|
|
252
|
+
// outside SkPage's reach.
|
|
253
|
+
|
|
254
|
+
@include bool-modifier('page', 'no-bounce')
|
|
255
|
+
{
|
|
256
|
+
overscroll-behavior: none;
|
|
257
|
+
|
|
258
|
+
.sk-page-content,
|
|
259
|
+
.sk-page-sidebar-body,
|
|
260
|
+
.sk-page-aside-body
|
|
261
|
+
{
|
|
262
|
+
overscroll-behavior: none;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
267
|
+
// Fixed Header Modifier
|
|
268
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
269
|
+
|
|
270
|
+
@include bool-modifier('page', 'fixed-header')
|
|
271
|
+
{
|
|
272
|
+
.sk-page-header
|
|
273
|
+
{
|
|
274
|
+
position: sticky;
|
|
275
|
+
top: 0;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
280
|
+
// Fixed Footer Modifier
|
|
281
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
282
|
+
|
|
283
|
+
@include bool-modifier('page', 'fixed-footer')
|
|
284
|
+
{
|
|
285
|
+
.sk-page-footer
|
|
286
|
+
{
|
|
287
|
+
position: sticky;
|
|
288
|
+
bottom: 0;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
246
292
|
//----------------------------------------------------------------------------------------------------------------------
|
|
247
293
|
// Drawer Transitions (left and right slide-in variants)
|
|
248
294
|
//
|
|
@@ -304,3 +350,16 @@
|
|
|
304
350
|
}
|
|
305
351
|
|
|
306
352
|
//----------------------------------------------------------------------------------------------------------------------
|
|
353
|
+
// Custom-Element API Defaults (attribute-absence path)
|
|
354
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
355
|
+
// Parallel defaults for <sk-page> (no class API). Zero-specificity via :where() so any
|
|
356
|
+
// explicit attribute value wins. Page has no kind/size families, only boolean modifiers — no
|
|
357
|
+
// defaults-when-absent needed for the class API (booleans are off by default).
|
|
358
|
+
|
|
359
|
+
// Default flush: off — fires when <sk-page> has no flush attribute.
|
|
360
|
+
@include defaults-when-no-attr('page', 'flush')
|
|
361
|
+
{
|
|
362
|
+
--sk-page-gap: 1rem;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
//----------------------------------------------------------------------------------------------------------------------
|