@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.
Files changed (177) hide show
  1. package/dist/components/Dropdown/SkDropdown.vue.d.ts +9 -1
  2. package/dist/components/Dropdown/types.d.ts +2 -1
  3. package/dist/components/NavBar/SkNavBar.vue.d.ts +9 -1
  4. package/dist/components/NavBar/context.d.ts +2 -0
  5. package/dist/components/NavBar/types.d.ts +5 -1
  6. package/dist/components/Page/SkPage.vue.d.ts +9 -0
  7. package/dist/components/ScrollArea/SkScrollArea.vue.d.ts +105 -4
  8. package/dist/composables/useCustomColors.d.ts +18 -56
  9. package/{src → dist}/global.d.ts +6 -2
  10. package/dist/sleekspace-ui.css +4253 -1251
  11. package/dist/sleekspace-ui.es.js +204 -109
  12. package/dist/sleekspace-ui.umd.js +204 -109
  13. package/dist/static/classes.d.ts +18 -0
  14. package/dist/static/components/alert.d.ts +12 -0
  15. package/dist/static/components/avatar.d.ts +9 -0
  16. package/dist/static/components/breadcrumbs.d.ts +6 -0
  17. package/dist/static/components/button.d.ts +13 -0
  18. package/dist/static/components/card.d.ts +5 -0
  19. package/dist/static/components/checkbox.d.ts +10 -0
  20. package/dist/static/components/colorPicker.d.ts +8 -0
  21. package/dist/static/components/divider.d.ts +8 -0
  22. package/dist/static/components/dropdown.d.ts +8 -0
  23. package/dist/static/components/field.d.ts +15 -0
  24. package/dist/static/components/group.d.ts +5 -0
  25. package/dist/static/components/input.d.ts +14 -0
  26. package/dist/static/components/navBar.d.ts +16 -0
  27. package/dist/static/components/numberInput.d.ts +15 -0
  28. package/dist/static/components/page.d.ts +9 -0
  29. package/dist/static/components/pagination.d.ts +5 -0
  30. package/dist/static/components/panel.d.ts +11 -0
  31. package/dist/static/components/progress.d.ts +9 -0
  32. package/dist/static/components/radio.d.ts +11 -0
  33. package/dist/static/components/select.d.ts +10 -0
  34. package/dist/static/components/sidebar.d.ts +9 -0
  35. package/dist/static/components/skeleton.d.ts +11 -0
  36. package/dist/static/components/slider.d.ts +12 -0
  37. package/dist/static/components/spinner.d.ts +12 -0
  38. package/dist/static/components/switchInput.d.ts +10 -0
  39. package/dist/static/components/table.d.ts +12 -0
  40. package/dist/static/components/tag.d.ts +8 -0
  41. package/dist/static/components/tagsInput.d.ts +7 -0
  42. package/dist/static/components/textarea.d.ts +12 -0
  43. package/dist/static/components/toolbar.d.ts +12 -0
  44. package/dist/static/components/tooltip.d.ts +7 -0
  45. package/dist/static/escape.d.ts +2 -0
  46. package/dist/static/index.cjs.js +1 -0
  47. package/dist/static/index.d.ts +68 -0
  48. package/dist/static/index.es.js +732 -0
  49. package/dist/static/render.d.ts +12 -0
  50. package/dist/static/specs.d.ts +2 -0
  51. package/dist/static/types.d.ts +43 -0
  52. package/dist/tokens.css +322 -0
  53. package/dist/types/index.d.ts +36 -0
  54. package/docs/guides/installation.md +8 -2
  55. package/docs/guides/pure-css/_meta.yaml +8 -0
  56. package/docs/guides/pure-css/class-api.md +1070 -0
  57. package/docs/guides/pure-css/custom-elements.md +574 -0
  58. package/docs/guides/pure-css/index.md +86 -0
  59. package/docs/guides/pure-css/limitations.md +152 -0
  60. package/docs/guides/pure-css/static-helpers.md +1203 -0
  61. package/llms-full.txt +3736 -261
  62. package/package.json +16 -5
  63. package/src/components/Card/SkCard.vue +1 -0
  64. package/src/components/ContextMenu/SkContextMenuRadioGroup.vue +4 -1
  65. package/src/components/Dropdown/SkDropdown.vue +20 -3
  66. package/src/components/Dropdown/SkDropdownRadioGroup.vue +4 -1
  67. package/src/components/Dropdown/types.ts +2 -1
  68. package/src/components/NavBar/SkNavBar.vue +14 -4
  69. package/src/components/NavBar/context.ts +4 -2
  70. package/src/components/NavBar/types.ts +6 -1
  71. package/src/components/Page/SkPage.vue +11 -0
  72. package/src/components/Panel/SkPanel.vue +2 -1
  73. package/src/components/ScrollArea/SkScrollArea.vue +78 -5
  74. package/src/components/TreeView/SkTreeView.vue +7 -2
  75. package/src/composables/useCustomColors.ts +86 -77
  76. package/src/composables/usePortalContext.test.ts +0 -2
  77. package/src/shims.d.ts +10 -0
  78. package/src/static/__tests__/parity.test.ts +717 -0
  79. package/src/static/__tests__/parityHarness.test.ts +98 -0
  80. package/src/static/__tests__/parityHarness.ts +260 -0
  81. package/src/static/classes.test.ts +82 -0
  82. package/src/static/classes.ts +111 -0
  83. package/src/static/components/__tests__/helpers.test.ts +837 -0
  84. package/src/static/components/alert.ts +117 -0
  85. package/src/static/components/avatar.ts +86 -0
  86. package/src/static/components/breadcrumbs.ts +28 -0
  87. package/src/static/components/button.ts +75 -0
  88. package/src/static/components/card.ts +27 -0
  89. package/src/static/components/checkbox.ts +48 -0
  90. package/src/static/components/colorPicker.ts +45 -0
  91. package/src/static/components/divider.ts +39 -0
  92. package/src/static/components/dropdown.ts +36 -0
  93. package/src/static/components/field.ts +86 -0
  94. package/src/static/components/group.ts +27 -0
  95. package/src/static/components/input.ts +55 -0
  96. package/src/static/components/navBar.ts +94 -0
  97. package/src/static/components/numberInput.ts +64 -0
  98. package/src/static/components/page.ts +31 -0
  99. package/src/static/components/pagination.ts +27 -0
  100. package/src/static/components/panel.ts +33 -0
  101. package/src/static/components/progress.ts +31 -0
  102. package/src/static/components/radio.ts +53 -0
  103. package/src/static/components/select.ts +51 -0
  104. package/src/static/components/sidebar.ts +85 -0
  105. package/src/static/components/skeleton.ts +66 -0
  106. package/src/static/components/slider.ts +50 -0
  107. package/src/static/components/spinner.ts +94 -0
  108. package/src/static/components/switchInput.ts +49 -0
  109. package/src/static/components/table.ts +88 -0
  110. package/src/static/components/tag.ts +76 -0
  111. package/src/static/components/tagsInput.ts +35 -0
  112. package/src/static/components/textarea.ts +53 -0
  113. package/src/static/components/toolbar.ts +74 -0
  114. package/src/static/components/tooltip.ts +29 -0
  115. package/src/static/escape.test.ts +53 -0
  116. package/src/static/escape.ts +28 -0
  117. package/src/static/generated/defaults.ts +378 -0
  118. package/src/static/generated/propTypes.ts +425 -0
  119. package/src/static/index.ts +116 -0
  120. package/src/static/render.test.ts +83 -0
  121. package/src/static/render.ts +76 -0
  122. package/src/static/specs.test.ts +58 -0
  123. package/src/static/specs.ts +230 -0
  124. package/src/static/types.ts +176 -0
  125. package/src/styles/__tests__/testHelpers.ts +97 -0
  126. package/src/styles/base/_custom-elements.scss +51 -0
  127. package/src/styles/base/_index.scss +4 -0
  128. package/src/styles/components/__tests__/componentSelectors.test.ts +2575 -0
  129. package/src/styles/components/_alert.scss +82 -39
  130. package/src/styles/components/_avatar.scss +102 -47
  131. package/src/styles/components/_breadcrumbs.scss +39 -37
  132. package/src/styles/components/_button.scss +58 -5
  133. package/src/styles/components/_card.scss +64 -2
  134. package/src/styles/components/_checkbox.scss +35 -5
  135. package/src/styles/components/_color-picker.scss +48 -13
  136. package/src/styles/components/_divider.scss +86 -52
  137. package/src/styles/components/_dropdown.scss +214 -0
  138. package/src/styles/components/_field.scss +76 -23
  139. package/src/styles/components/_group.scss +190 -79
  140. package/src/styles/components/_index.scss +1 -0
  141. package/src/styles/components/_input.scss +81 -5
  142. package/src/styles/components/_menu.scss +1 -1
  143. package/src/styles/components/_navbar.scss +76 -45
  144. package/src/styles/components/_number-input.scss +88 -83
  145. package/src/styles/components/_page.scss +82 -23
  146. package/src/styles/components/_pagination.scss +240 -212
  147. package/src/styles/components/_panel.scss +268 -122
  148. package/src/styles/components/_progress.scss +120 -70
  149. package/src/styles/components/_radio.scss +35 -5
  150. package/src/styles/components/_scroll-area.scss +50 -22
  151. package/src/styles/components/_select.scss +40 -9
  152. package/src/styles/components/_sidebar.scss +59 -34
  153. package/src/styles/components/_skeleton.scss +111 -65
  154. package/src/styles/components/_slider.scss +34 -10
  155. package/src/styles/components/_spinner.scss +107 -56
  156. package/src/styles/components/_switch.scss +36 -5
  157. package/src/styles/components/_table.scss +150 -166
  158. package/src/styles/components/_tag.scss +244 -154
  159. package/src/styles/components/_tags-input.scss +46 -12
  160. package/src/styles/components/_textarea.scss +36 -5
  161. package/src/styles/components/_toolbar.scss +85 -31
  162. package/src/styles/components/_tooltip.scss +172 -3
  163. package/src/styles/mixins/_cut-border.scss +18 -4
  164. package/src/styles/mixins/_dual-selector.scss +192 -0
  165. package/src/styles/mixins/_index.scss +1 -0
  166. package/src/styles/mixins/dualSelector.test.ts +151 -0
  167. package/src/styles/themes/_colorful.scss +25 -0
  168. package/src/styles/themes/_greyscale.scss +25 -0
  169. package/src/styles/themes/_shade-scale.scss +39 -0
  170. package/src/styles/tokens/_semantic-color-kinds.scss +66 -0
  171. package/src/{types.ts → types/index.ts} +19 -11
  172. package/web-types.json +970 -137
  173. package/dist/composables/useCustomColors.test.d.ts +0 -1
  174. package/dist/composables/useFocusTrap.test.d.ts +0 -1
  175. package/dist/composables/usePortalContext.test.d.ts +0 -1
  176. package/dist/styles/mixins/fluidSize.test.d.ts +0 -1
  177. package/dist/types.d.ts +0 -29
@@ -2,41 +2,94 @@
2
2
  // Field Component Styles
3
3
  //----------------------------------------------------------------------------------------------------------------------
4
4
 
5
- .sk-field
5
+ @use '../theme/variables' as *;
6
+ @use '../mixins' as *;
7
+
8
+ //----------------------------------------------------------------------------------------------------------------------
9
+ // Field Design Tokens
10
+ //----------------------------------------------------------------------------------------------------------------------
11
+
12
+ .sk-field,
13
+ sk-field
14
+ {
15
+ --sk-field-gap: var(--sk-space-xs);
16
+ }
17
+
18
+ //----------------------------------------------------------------------------------------------------------------------
19
+ // Field Root
20
+ //----------------------------------------------------------------------------------------------------------------------
21
+
22
+ .sk-field,
23
+ sk-field
6
24
  {
7
25
  display: flex;
8
26
  flex-direction: column;
9
- gap: var(--sk-space-xs);
27
+ gap: var(--sk-field-gap);
28
+ }
10
29
 
11
- //------------------------------------------------------------------------------------------------------------------
12
- // Label positioning
13
- //------------------------------------------------------------------------------------------------------------------
30
+ //----------------------------------------------------------------------------------------------------------------------
31
+ // Label Positioning Modifiers (single-choice)
32
+ //----------------------------------------------------------------------------------------------------------------------
33
+
34
+ @include single-choice-modifier('field', 'label', 'top', 'label-position')
35
+ {
36
+ flex-direction: column;
37
+ }
38
+
39
+ @include single-choice-modifier('field', 'label', 'left', 'label-position')
40
+ {
41
+ flex-direction: row;
42
+ align-items: flex-start;
43
+ gap: var(--sk-space-md);
44
+
45
+ .sk-field-label
46
+ {
47
+ flex-shrink: 0;
48
+ min-width: 120px;
49
+ padding-top: var(--sk-space-xs);
50
+ }
14
51
 
15
- &.sk-label-top
52
+ .sk-field-input-wrapper
16
53
  {
17
- flex-direction: column;
54
+ flex: 1;
18
55
  }
56
+ }
57
+
58
+ //----------------------------------------------------------------------------------------------------------------------
59
+ // Boolean Modifiers
60
+ //----------------------------------------------------------------------------------------------------------------------
19
61
 
20
- &.sk-label-left
62
+ @include bool-modifier('field', 'has-error')
63
+ {
64
+ // Anchor property ensures the selector pair is emitted by Sass.
65
+ --sk-field-error-state: 1;
66
+
67
+ .sk-field-label
21
68
  {
22
- flex-direction: row;
23
- align-items: flex-start;
24
- gap: var(--sk-space-md);
25
-
26
- .sk-field-label
27
- {
28
- flex-shrink: 0;
29
- min-width: 120px;
30
- padding-top: var(--sk-space-xs);
31
- }
32
-
33
- .sk-field-input-wrapper
34
- {
35
- flex: 1;
36
- }
69
+ color: var(--sk-danger-base);
37
70
  }
38
71
  }
39
72
 
73
+ //----------------------------------------------------------------------------------------------------------------------
74
+ // Defaults When Absent
75
+ //----------------------------------------------------------------------------------------------------------------------
76
+
77
+ // Default label-position: top (column layout)
78
+ @include defaults-when-absent('field', 'sk-label-')
79
+ {
80
+ flex-direction: column;
81
+ }
82
+
83
+ //----------------------------------------------------------------------------------------------------------------------
84
+ // Custom-Element API Defaults (attribute-absence path)
85
+ //----------------------------------------------------------------------------------------------------------------------
86
+
87
+ // Default label-position: top
88
+ @include defaults-when-no-attr('field', 'label-position')
89
+ {
90
+ flex-direction: column;
91
+ }
92
+
40
93
  //----------------------------------------------------------------------------------------------------------------------
41
94
 
42
95
  .sk-field-label
@@ -9,129 +9,240 @@
9
9
  // Base Group Styles
10
10
  //----------------------------------------------------------------------------------------------------------------------
11
11
 
12
- .sk-group
12
+ .sk-group,
13
+ sk-group
13
14
  {
14
15
  // Base styles
15
16
  display: inline-flex;
16
17
  align-items: stretch;
17
18
 
18
- // Horizontal orientation (default)
19
- &.sk-horizontal
19
+ // Ensure grouped items have higher z-index on hover
20
+ > *:hover,
21
+ > *:focus-within
20
22
  {
21
- flex-direction: row;
23
+ position: relative;
24
+ z-index: 1;
25
+ }
26
+ }
27
+
28
+ //----------------------------------------------------------------------------------------------------------------------
29
+ // Orientation Modifiers
30
+ //----------------------------------------------------------------------------------------------------------------------
31
+
32
+ @include single-choice-modifier('group', 'orientation', 'horizontal')
33
+ {
34
+ flex-direction: row;
22
35
 
23
- // Remove gaps between children
24
- > *
36
+ // Remove gaps between children
37
+ > *
38
+ {
39
+ flex-shrink: 0;
40
+ }
41
+
42
+ // Remove left border and corner shape from all but first child
43
+ > * + *
44
+ {
45
+ margin-left: calc(-1 * var(--sk-border-width, 1px));
46
+ }
47
+
48
+ // First child keeps only left corners
49
+ > *:first-child:not(:only-child)
50
+ {
51
+ @supports (corner-shape: bevel)
25
52
  {
26
- flex-shrink: 0;
53
+ corner-shape: bevel;
54
+ border-start-end-radius: 0;
55
+ border-end-end-radius: 0;
27
56
  }
57
+ }
28
58
 
29
- // Remove left border and corner shape from all but first child
30
- > * + *
59
+ // Middle children have no beveled corners
60
+ > *:not(:first-child):not(:last-child)
61
+ {
62
+ @supports (corner-shape: bevel)
31
63
  {
32
- margin-left: calc(-1 * var(--sk-border-width, 1px));
64
+ corner-shape: initial;
65
+ border-radius: 0;
33
66
  }
34
67
 
35
- // First child keeps only left corners
36
- > *:first-child:not(:only-child)
68
+ @supports not (corner-shape: bevel)
37
69
  {
38
- @supports (corner-shape: bevel)
39
- {
40
- corner-shape: bevel;
41
- border-start-end-radius: 0;
42
- border-end-end-radius: 0;
43
- }
70
+ border-radius: 0;
44
71
  }
72
+ }
45
73
 
46
- // Middle children have no beveled corners
47
- > *:not(:first-child):not(:last-child)
74
+ // Last child keeps only right corners
75
+ > *:last-child:not(:only-child)
76
+ {
77
+ @supports (corner-shape: bevel)
48
78
  {
49
- @supports (corner-shape: bevel)
50
- {
51
- corner-shape: initial;
52
- border-radius: 0;
53
- }
79
+ corner-shape: bevel;
80
+ border-start-start-radius: 0;
81
+ border-end-start-radius: 0;
82
+ }
83
+ }
84
+ }
85
+
86
+ @include single-choice-modifier('group', 'orientation', 'vertical')
87
+ {
88
+ flex-direction: column;
89
+
90
+ // Remove gaps between children
91
+ > *
92
+ {
93
+ flex-shrink: 0;
94
+ width: 100%;
95
+ }
96
+
97
+ // Remove top border from all but first child
98
+ > * + *
99
+ {
100
+ margin-top: calc(-1 * var(--sk-border-width, 1px));
101
+ }
54
102
 
55
- @supports not (corner-shape: bevel)
56
- {
57
- border-radius: 0;
58
- }
103
+ // First child keeps only top corners
104
+ > *:first-child:not(:only-child)
105
+ {
106
+ @supports (corner-shape: bevel)
107
+ {
108
+ corner-shape: bevel;
109
+ border-end-start-radius: 0;
110
+ border-end-end-radius: 0;
59
111
  }
112
+ }
60
113
 
61
- // Last child keeps only right corners
62
- > *:last-child:not(:only-child)
114
+ // Middle children have no beveled corners
115
+ > *:not(:first-child):not(:last-child)
116
+ {
117
+ @supports (corner-shape: bevel)
63
118
  {
64
- @supports (corner-shape: bevel)
65
- {
66
- corner-shape: bevel;
67
- border-start-start-radius: 0;
68
- border-end-start-radius: 0;
69
- }
119
+ corner-shape: initial;
120
+ border-radius: 0;
121
+ }
122
+
123
+ @supports not (corner-shape: bevel)
124
+ {
125
+ border-radius: 0;
70
126
  }
71
127
  }
72
128
 
73
- // Vertical orientation
74
- &.sk-vertical
129
+ // Last child keeps only bottom corners
130
+ > *:last-child:not(:only-child)
75
131
  {
76
- flex-direction: column;
132
+ @supports (corner-shape: bevel)
133
+ {
134
+ corner-shape: bevel;
135
+ border-start-start-radius: 0;
136
+ border-start-end-radius: 0;
137
+ }
138
+ }
139
+ }
77
140
 
78
- // Remove gaps between children
79
- > *
141
+ //----------------------------------------------------------------------------------------------------------------------
142
+ // Defaults When Absent
143
+ //----------------------------------------------------------------------------------------------------------------------
144
+
145
+ // Default orientation: horizontal — fires when no sk-orientation-* class is present.
146
+ @include defaults-when-absent('group', 'sk-orientation-')
147
+ {
148
+ flex-direction: row;
149
+
150
+ > *
151
+ {
152
+ flex-shrink: 0;
153
+ }
154
+
155
+ > * + *
156
+ {
157
+ margin-left: calc(-1 * var(--sk-border-width, 1px));
158
+ }
159
+
160
+ > *:first-child:not(:only-child)
161
+ {
162
+ @supports (corner-shape: bevel)
80
163
  {
81
- flex-shrink: 0;
82
- width: 100%;
164
+ corner-shape: bevel;
165
+ border-start-end-radius: 0;
166
+ border-end-end-radius: 0;
83
167
  }
168
+ }
84
169
 
85
- // Remove top border from all but first child
86
- > * + *
170
+ > *:not(:first-child):not(:last-child)
171
+ {
172
+ @supports (corner-shape: bevel)
87
173
  {
88
- margin-top: calc(-1 * var(--sk-border-width, 1px));
174
+ corner-shape: initial;
175
+ border-radius: 0;
89
176
  }
90
177
 
91
- // First child keeps only top corners
92
- > *:first-child:not(:only-child)
178
+ @supports not (corner-shape: bevel)
93
179
  {
94
- @supports (corner-shape: bevel)
95
- {
96
- corner-shape: bevel;
97
- border-end-start-radius: 0;
98
- border-end-end-radius: 0;
99
- }
180
+ border-radius: 0;
100
181
  }
182
+ }
183
+
184
+ > *:last-child:not(:only-child)
185
+ {
186
+ @supports (corner-shape: bevel)
187
+ {
188
+ corner-shape: bevel;
189
+ border-start-start-radius: 0;
190
+ border-end-start-radius: 0;
191
+ }
192
+ }
193
+ }
194
+
195
+ //----------------------------------------------------------------------------------------------------------------------
196
+ // Custom-Element API Defaults (attribute-absence path)
197
+ //----------------------------------------------------------------------------------------------------------------------
198
+
199
+ // Default orientation: horizontal — fires when <sk-group> has no orientation attribute.
200
+ @include defaults-when-no-attr('group', 'orientation')
201
+ {
202
+ flex-direction: row;
101
203
 
102
- // Middle children have no beveled corners
103
- > *:not(:first-child):not(:last-child)
204
+ > *
205
+ {
206
+ flex-shrink: 0;
207
+ }
208
+
209
+ > * + *
210
+ {
211
+ margin-left: calc(-1 * var(--sk-border-width, 1px));
212
+ }
213
+
214
+ > *:first-child:not(:only-child)
215
+ {
216
+ @supports (corner-shape: bevel)
104
217
  {
105
- @supports (corner-shape: bevel)
106
- {
107
- corner-shape: initial;
108
- border-radius: 0;
109
- }
218
+ corner-shape: bevel;
219
+ border-start-end-radius: 0;
220
+ border-end-end-radius: 0;
221
+ }
222
+ }
110
223
 
111
- @supports not (corner-shape: bevel)
112
- {
113
- border-radius: 0;
114
- }
224
+ > *:not(:first-child):not(:last-child)
225
+ {
226
+ @supports (corner-shape: bevel)
227
+ {
228
+ corner-shape: initial;
229
+ border-radius: 0;
115
230
  }
116
231
 
117
- // Last child keeps only bottom corners
118
- > *:last-child:not(:only-child)
232
+ @supports not (corner-shape: bevel)
119
233
  {
120
- @supports (corner-shape: bevel)
121
- {
122
- corner-shape: bevel;
123
- border-start-start-radius: 0;
124
- border-start-end-radius: 0;
125
- }
234
+ border-radius: 0;
126
235
  }
127
236
  }
128
237
 
129
- // Ensure grouped items have higher z-index on hover
130
- > *:hover,
131
- > *:focus-within
238
+ > *:last-child:not(:only-child)
132
239
  {
133
- position: relative;
134
- z-index: 1;
240
+ @supports (corner-shape: bevel)
241
+ {
242
+ corner-shape: bevel;
243
+ border-start-start-radius: 0;
244
+ border-end-start-radius: 0;
245
+ }
135
246
  }
136
247
  }
137
248
 
@@ -16,6 +16,7 @@
16
16
  @include meta.load-css('collapsible');
17
17
  @include meta.load-css('color-picker');
18
18
  @include meta.load-css('divider');
19
+ @include meta.load-css('dropdown');
19
20
  @include meta.load-css('field');
20
21
  @include meta.load-css('group');
21
22
  @include meta.load-css('input');
@@ -1,4 +1,5 @@
1
- @use '@/styles/mixins/cut-border' as *;
1
+ @use '../mixins/cut-border' as *;
2
+ @use '../theme/variables' as *;
2
3
 
3
4
  //----------------------------------------------------------------------------------------------------------------------
4
5
  // Input Component Styles
@@ -38,7 +39,18 @@
38
39
  transition-duration: var(--sk-transition-duration-base);
39
40
 
40
41
  // Size variants (match button heights)
41
- &.sk-sm
42
+
43
+ // Default: md when no sk-size-* class is present (zero-specificity, explicit class wins)
44
+ &:where(:not([class*="sk-size-"]))
45
+ {
46
+ height: 2.5rem;
47
+ padding: 0 var(--sk-space-md);
48
+ font-size: 1rem;
49
+ --sk-input-cut: 0.5rem;
50
+ }
51
+
52
+ &.sk-sm,
53
+ &.sk-size-sm
42
54
  {
43
55
  height: 2rem;
44
56
  padding: 0 var(--sk-space-sm);
@@ -46,7 +58,8 @@
46
58
  --sk-input-cut: 0.4rem;
47
59
  }
48
60
 
49
- &.sk-md
61
+ &.sk-md,
62
+ &.sk-size-md
50
63
  {
51
64
  height: 2.5rem;
52
65
  padding: 0 var(--sk-space-md);
@@ -54,7 +67,8 @@
54
67
  --sk-input-cut: 0.5rem;
55
68
  }
56
69
 
57
- &.sk-lg
70
+ &.sk-lg,
71
+ &.sk-size-lg
58
72
  {
59
73
  height: 3rem;
60
74
  padding: 0 var(--sk-space-md);
@@ -62,7 +76,8 @@
62
76
  --sk-input-cut: 0.6rem;
63
77
  }
64
78
 
65
- &.sk-xl
79
+ &.sk-xl,
80
+ &.sk-size-xl
66
81
  {
67
82
  height: 3.5rem;
68
83
  padding: 0 var(--sk-space-md);
@@ -204,3 +219,64 @@
204
219
  }
205
220
 
206
221
  //----------------------------------------------------------------------------------------------------------------------
222
+ // type="search" cancel button
223
+ //
224
+ // Native browsers render an ugly default "x" for `input[type="search"]`. Hide it and paint our
225
+ // own via a mask of an X glyph, colored by the kind's base color so it feels native to the rest
226
+ // of the input's visual identity.
227
+ //----------------------------------------------------------------------------------------------------------------------
228
+
229
+ .sk-input[type="search"]
230
+ {
231
+ // Hide IE/Edge legacy reveal/clear buttons
232
+ &::-ms-reveal,
233
+ &::-ms-clear
234
+ {
235
+ display: none;
236
+ }
237
+
238
+ // Replace the WebKit/Blink clear button with our own X
239
+ &::-webkit-search-cancel-button
240
+ {
241
+ -webkit-appearance: none;
242
+ appearance: none;
243
+ width: 1em;
244
+ height: 1em;
245
+ margin-inline-start: var(--sk-space-xs);
246
+ background-color: var(--sk-input-color-base);
247
+ mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'><path d='M1.5 1.5 L8.5 8.5 M8.5 1.5 L1.5 8.5' stroke='black' stroke-width='1.8' stroke-linecap='round'/></svg>");
248
+ mask-repeat: no-repeat;
249
+ mask-position: center;
250
+ mask-size: contain;
251
+ -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'><path d='M1.5 1.5 L8.5 8.5 M8.5 1.5 L1.5 8.5' stroke='black' stroke-width='1.8' stroke-linecap='round'/></svg>");
252
+ -webkit-mask-repeat: no-repeat;
253
+ -webkit-mask-position: center;
254
+ -webkit-mask-size: contain;
255
+ opacity: 0.7;
256
+ cursor: pointer;
257
+ transition: opacity var(--sk-transition-duration-fast) var(--sk-transition-timing-default);
258
+ }
259
+
260
+ &::-webkit-search-cancel-button:hover
261
+ {
262
+ opacity: 1;
263
+ }
264
+ }
265
+
266
+ //----------------------------------------------------------------------------------------------------------------------
267
+ // Defaults-when-absent: kind — neutral when no explicit kind class is present.
268
+ //----------------------------------------------------------------------------------------------------------------------
269
+
270
+ $_input-kind-not: '';
271
+ @each $kind in $kinds
272
+ {
273
+ $_input-kind-not: $_input-kind-not + ':not(.sk-' + $kind + ')';
274
+ }
275
+
276
+ .sk-input:where(#{ $_input-kind-not })
277
+ {
278
+ --sk-input-color-base: var(--sk-neutral-base);
279
+ --sk-input-fg: var(--sk-neutral-text);
280
+ }
281
+
282
+ //----------------------------------------------------------------------------------------------------------------------
@@ -1,4 +1,4 @@
1
- @use '@/styles/mixins' as *;
1
+ @use '../mixins' as *;
2
2
 
3
3
  //----------------------------------------------------------------------------------------------------------------------
4
4
  // Shared Menu Styles