@progress/kendo-theme-core 14.2.0-dev.0 → 14.2.0-dev.2

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@progress/kendo-theme-core",
3
3
  "description": "A collection of functions and mixins used for building themes for Kendo UI",
4
- "version": "14.2.0-dev.0",
4
+ "version": "14.2.0-dev.2",
5
5
  "author": "Progress",
6
6
  "license": "Apache-2.0",
7
7
  "keywords": [
@@ -45,6 +45,5 @@
45
45
  },
46
46
  "directories": {
47
47
  "doc": "docs"
48
- },
49
- "gitHead": "2bc240b1c4ee65e6dc269fe4586ed2cabc5ba318"
48
+ }
50
49
  }
@@ -52,6 +52,10 @@ $kendo-border-radii: $default-border-radii !default;
52
52
  $kendo-border-radii: map.merge($default-border-radii, $kendo-border-radii);
53
53
 
54
54
 
55
+ /// Returns a CSS variable reference for a border-radius token.
56
+ /// @param {String} $key - The border-radius key from $kendo-border-radii.
57
+ /// @return {String} CSS variable reference for the given border-radius token.
58
+ /// @group functions
55
59
  @function k-border-radius($key) {
56
60
  @return var(--kendo-border-radius-#{$key});
57
61
  }
@@ -90,7 +90,7 @@
90
90
  /// @param {String} $theme - The theme the colors will be generated for
91
91
  /// @return {Map} - A map with the generated keys and values
92
92
  ///
93
- /// @group color-system
93
+ /// @group functions
94
94
  @function k-generate-color-variations( $name, $color, $theme: null ) {
95
95
  $result: ();
96
96
 
@@ -212,7 +212,7 @@
212
212
  /// @param {String} $key - The name of a color/key in the $kendo-colors map
213
213
  /// @return {String} - CSS variable with the actual color as a fallback
214
214
  ///
215
- /// @group color-system
215
+ /// @group functions
216
216
  @function k-color($key) {
217
217
  @return var(--kendo-color-#{$key});
218
218
  }
@@ -413,8 +413,8 @@
413
413
  }
414
414
 
415
415
  // Highlighted state
416
- .k-table-td.k-highlighted,
417
- .k-table-row.k-highlighted > .k-table-td {
416
+ .k-table-td.k-highlighted:not(.k-group-cell),
417
+ .k-table-row.k-highlighted > .k-table-td:not(.k-group-cell) {
418
418
  font-weight: $kendo-grid-highlighted-font-weight;
419
419
  }
420
420
 
@@ -59,23 +59,23 @@
59
59
  }
60
60
 
61
61
  // Selected state
62
- .k-table-td.k-selected,
63
- .k-table-row.k-selected > .k-table-td {
62
+ .k-table-td.k-selected:not(.k-group-cell),
63
+ .k-table-row.k-selected > .k-table-td:not(.k-group-cell) {
64
64
  background-color: $kendo-grid-selected-bg;
65
65
  color: $kendo-grid-selected-text;
66
66
  }
67
67
 
68
68
  // Highlighted state
69
- .k-table-td.k-highlighted,
70
- .k-table-row.k-highlighted > .k-table-td {
69
+ .k-table-td.k-highlighted:not(.k-group-cell),
70
+ .k-table-row.k-highlighted > .k-table-td:not(.k-group-cell) {
71
71
  background-color: $kendo-grid-highlighted-bg;
72
72
  }
73
73
 
74
74
  // Highlighted Selected state
75
- .k-table-td.k-highlighted.k-selected,
76
- .k-table-row.k-highlighted.k-selected > .k-table-td,
77
- .k-table-row.k-highlighted > .k-table-td.k-selected,
78
- .k-table-row.k-selected > .k-table-td.k-highlighted {
75
+ .k-table-td.k-highlighted.k-selected:not(.k-group-cell, .k-grid-content-sticky),
76
+ .k-table-row.k-highlighted.k-selected > .k-table-td:not(.k-group-cell, .k-grid-content-sticky),
77
+ .k-table-row.k-highlighted > .k-table-td.k-selected:not(.k-group-cell, .k-grid-content-sticky),
78
+ .k-table-row.k-selected > .k-table-td.k-highlighted:not(.k-group-cell, .k-grid-content-sticky) {
79
79
  background-color: $kendo-grid-selected-highlighted-bg;
80
80
  }
81
81
 
@@ -68,6 +68,7 @@
68
68
  $_group-label-line-height: map.get( $size-props, item-group-label-line-height );
69
69
  $_filter-padding-x: map.get( $size-props, filter-padding-x );
70
70
  $_filter-padding-y: map.get( $size-props, filter-padding-y );
71
+ $_sticky-header-padding-y: map.get( $size-props, sticky-header-padding-y );
71
72
 
72
73
  #{k-when-default($kendo-list-default-size, $size)}
73
74
  &.k-list-#{$size} {
@@ -82,6 +83,22 @@
82
83
  line-height: $_header-line-height;
83
84
  }
84
85
 
86
+ // Sticky header
87
+ .k-list-sticky-header {
88
+ padding-block-end: $_sticky-header-padding-y;
89
+ }
90
+
91
+ .k-list-sticky-header + .k-list-content {
92
+ padding-block-start: $_sticky-header-padding-y;
93
+ }
94
+
95
+ .k-list-sticky-header-item {
96
+ padding-block: $_item-padding-y;
97
+ padding-inline: $_item-padding-x;
98
+ font-size: $_item-font-size;
99
+ line-height: $_item-line-height;
100
+ }
101
+
85
102
  .k-list-filter {
86
103
  padding-inline: $_filter-padding-x;
87
104
  padding-block: $_filter-padding-y;
@@ -155,6 +172,19 @@
155
172
  cursor: pointer;
156
173
  }
157
174
 
175
+ .k-list-sticky-header:has(+ .k-list-group-sticky-header) {
176
+ border-block-end: 1px solid;
177
+ }
178
+
179
+ .k-list-sticky-header-item {
180
+ border-radius: $kendo-list-item-border-radius;
181
+ display: flex;
182
+ flex-flow: row nowrap;
183
+ align-items: center;
184
+ gap: $kendo-list-item-gap;
185
+ cursor: pointer;
186
+ }
187
+
158
188
 
159
189
  // List content
160
190
  .k-list-content {
@@ -31,6 +31,41 @@
31
31
  }
32
32
 
33
33
 
34
+ // Sticky header
35
+ .k-list-sticky-header {
36
+ @include fill(
37
+ $kendo-list-item-text,
38
+ $kendo-list-item-bg,
39
+ $kendo-list-header-border,
40
+ );
41
+ @include box-shadow( $kendo-list-sticky-header-shadow );
42
+
43
+ &:has(+ .k-list-group-sticky-header) {
44
+ @include box-shadow( none );
45
+ border-color: $kendo-list-header-border;
46
+ }
47
+ }
48
+
49
+ .k-list-sticky-header-item {
50
+ &:hover,
51
+ &.k-hover {
52
+ @include fill(
53
+ $kendo-list-item-hover-text,
54
+ $kendo-list-item-hover-bg,
55
+ );
56
+ }
57
+
58
+ &:focus-within,
59
+ &.k-focus {
60
+ @include fill(
61
+ $kendo-list-item-focus-text,
62
+ $kendo-list-item-focus-bg,
63
+ );
64
+ @include focus-indicator( $kendo-list-item-focus-shadow, true );
65
+ }
66
+ }
67
+
68
+
34
69
  // List item
35
70
  .k-list-item,
36
71
  .k-list-custom-value {
@@ -24,6 +24,10 @@ $kendo-list-sm-header-padding-y: null !default;
24
24
  $kendo-list-md-header-padding-y: null !default;
25
25
  $kendo-list-lg-header-padding-y: null !default;
26
26
 
27
+ $kendo-list-sm-sticky-header-padding-y: null !default;
28
+ $kendo-list-md-sticky-header-padding-y: null !default;
29
+ $kendo-list-lg-sticky-header-padding-y: null !default;
30
+
27
31
  $kendo-list-header-border-width: null !default;
28
32
 
29
33
  $kendo-list-header-font-size: null !default;
@@ -128,7 +132,8 @@ $kendo-list-sizes: (
128
132
  item-group-label-font-size: $kendo-list-item-group-label-sm-font-size,
129
133
  item-group-label-line-height: $kendo-list-item-group-label-sm-line-height,
130
134
  filter-padding-x: $kendo-list-sm-filter-padding-x,
131
- filter-padding-y: $kendo-list-sm-filter-padding-y
135
+ filter-padding-y: $kendo-list-sm-filter-padding-y,
136
+ sticky-header-padding-y: $kendo-list-sm-sticky-header-padding-y
132
137
  ),
133
138
  md: (
134
139
  font-size: $kendo-list-md-font-size,
@@ -150,7 +155,8 @@ $kendo-list-sizes: (
150
155
  item-group-label-font-size: $kendo-list-item-group-label-md-font-size,
151
156
  item-group-label-line-height: $kendo-list-item-group-label-md-line-height,
152
157
  filter-padding-x: $kendo-list-md-filter-padding-x,
153
- filter-padding-y: $kendo-list-md-filter-padding-y
158
+ filter-padding-y: $kendo-list-md-filter-padding-y,
159
+ sticky-header-padding-y: $kendo-list-md-sticky-header-padding-y
154
160
  ),
155
161
  lg: (
156
162
  font-size: $kendo-list-lg-font-size,
@@ -172,7 +178,8 @@ $kendo-list-sizes: (
172
178
  item-group-label-font-size: $kendo-list-item-group-label-lg-font-size,
173
179
  item-group-label-line-height: $kendo-list-item-group-label-lg-line-height,
174
180
  filter-padding-x: $kendo-list-lg-filter-padding-x,
175
- filter-padding-y: $kendo-list-lg-filter-padding-y
181
+ filter-padding-y: $kendo-list-lg-filter-padding-y,
182
+ sticky-header-padding-y: $kendo-list-lg-sticky-header-padding-y
176
183
  )
177
184
  ) !default;
178
185
 
@@ -187,6 +194,8 @@ $kendo-list-header-text: null !default;
187
194
  $kendo-list-header-border: null !default;
188
195
  $kendo-list-header-shadow: null !default;
189
196
 
197
+ $kendo-list-sticky-header-shadow: null !default;
198
+
190
199
 
191
200
  $kendo-list-item-bg: null !default;
192
201
  $kendo-list-item-text: null !default;
@@ -82,8 +82,8 @@
82
82
 
83
83
 
84
84
  // Selected state
85
- .k-table-tbody .k-table-row.k-selected > .k-table-td,
86
- .k-table-list .k-table-row.k-selected {
85
+ .k-table-tbody .k-table-row.k-selected > .k-table-td:not(.k-group-cell),
86
+ .k-table-list .k-table-row.k-selected:not(.k-group-cell) {
87
87
  border-color: $kendo-table-selected-border;
88
88
  color: $kendo-table-selected-text;
89
89
  background-color: $kendo-table-selected-bg;
@@ -36,6 +36,10 @@ $kendo-elevation: map.merge($default-elevation, $kendo-elevation);
36
36
  @return #{$result};
37
37
  }
38
38
 
39
+ /// Returns a CSS variable reference for an elevation shadow level.
40
+ /// @param {Number} $level - The elevation level key from $kendo-elevation.
41
+ /// @return {String} CSS variable reference for the given elevation level.
42
+ /// @group functions
39
43
  @function k-elevation($level) {
40
44
  @return var(--kendo-elevation-#{$level});
41
45
  }
@@ -46,10 +50,13 @@ $kendo-elevation-bg-lightness-step: 0.015 !default;
46
50
  // Each elevation-bg level increases oklch chroma by level * this value.
47
51
  $kendo-elevation-bg-chroma-step: 0.001 !default;
48
52
 
49
- // The background color for a given elevation level is calculated by increasing the lightness and chroma of the base background color
50
- // by a step multiplied by the elevation level, but only if the base background color is light (for light themes) or dark (for dark themes).
51
- // This is achieved by multiplying the steps by a clamp function that returns 1 when the background color is in the appropriate range and 0 otherwise.
52
- // clamp(0, (0.5 - l) * 99999, 1) → 1 when bg is dark, 0 when light
53
+ /// Returns an elevated background color expression using oklch relative color syntax.
54
+ /// The lightness and chroma are increased per elevation level, but only when the
55
+ /// base color is in the appropriate light/dark range.
56
+ /// @param {Number} $level - The elevation level that drives lightness and chroma increase.
57
+ /// @param {Color} $color - The base background color.
58
+ /// @return {String} An oklch relative color expression that represents the elevated background.
59
+ /// @group functions
53
60
  @function k-elevation-bg($level, $color) {
54
61
  $_result: "oklch(from #{$color} calc(l + #{$level} * #{$kendo-elevation-bg-lightness-step} * clamp(0, (0.5 - l) * 99999, 1)) calc(c + #{$level} * #{$kendo-elevation-bg-chroma-step} * clamp(0, (0.5 - l) * 99999, 1)) h)";
55
62
  @return #{$_result};
@@ -10,6 +10,7 @@ $kendo-dark-color-level-step: 16% !default;
10
10
  /// Returns the red channel of a color.
11
11
  /// @param {Color} $color - The color to get the red channel for.
12
12
  /// @return {Number} - The red channel of the color.
13
+ /// @group functions
13
14
  ///
14
15
  /// @example scss - Usage
15
16
  /// @debug k-color-red( #ff0000 ); // => 255
@@ -23,6 +24,7 @@ $kendo-dark-color-level-step: 16% !default;
23
24
  /// Returns the green channel of a color.
24
25
  /// @param {Color} $color - The color to get the green channel for.
25
26
  /// @return {Number} - The green channel of the color.
27
+ /// @group functions
26
28
  ///
27
29
  /// @example scss - Usage
28
30
  /// @debug k-color-green( #00ff00 ); // => 255
@@ -36,6 +38,7 @@ $kendo-dark-color-level-step: 16% !default;
36
38
  /// Returns the blue channel of a color.
37
39
  /// @param {Color} $color - The color to get the blue channel for.
38
40
  /// @return {Number} - The blue channel of the color.
41
+ /// @group functions
39
42
  ///
40
43
  /// @example scss - Usage
41
44
  /// @debug k-color-blue( #0000ff ); // => 255
@@ -49,6 +52,7 @@ $kendo-dark-color-level-step: 16% !default;
49
52
  /// Returns the hue of a color.
50
53
  /// @param {Color} $color - The color to get the hue for.
51
54
  /// @return {Number} - The hue of the color.
55
+ /// @group functions
52
56
  ///
53
57
  /// @example scss - Usage
54
58
  /// @debug k-color-hue( #e1d7d2 ); // => 20deg
@@ -62,6 +66,7 @@ $kendo-dark-color-level-step: 16% !default;
62
66
  /// Returns the saturation of a color.
63
67
  /// @param {Color} $color - The color to get the saturation for.
64
68
  /// @return {Number} - The saturation of the color.
69
+ /// @group functions
65
70
  ///
66
71
  /// @example scss - Usage
67
72
  /// @debug k-color-saturation( #e1d7d2 ); // => 20%
@@ -75,6 +80,7 @@ $kendo-dark-color-level-step: 16% !default;
75
80
  /// Returns the lightness of a color.
76
81
  /// @param {Color} $color - The color to get the lightness for.
77
82
  /// @return {Number} - The lightness of the color.
83
+ /// @group functions
78
84
  ///
79
85
  /// @example scss - Usage
80
86
  /// @debug k-color-lightness( #e1d7d2 ); // => 80%
@@ -90,6 +96,7 @@ $kendo-dark-color-level-step: 16% !default;
90
96
  /// @param {Color} $color2 - The second color.
91
97
  /// @param {Number} $weight - The weight of the first color in the mix.
92
98
  /// @return {Color} - The mixed color.
99
+ /// @group functions
93
100
  ///
94
101
  /// @example scss - Usage
95
102
  /// @debug k-color-mix( #f00, #00f ); // => #800080
@@ -101,6 +108,7 @@ $kendo-dark-color-level-step: 16% !default;
101
108
  /// @param {Color} $color - The color to darken.
102
109
  /// @param {Number} $amount - The amount to darken the color.
103
110
  /// @return {Color} - The darkened color.
111
+ /// @group functions
104
112
  ///
105
113
  /// @example scss - Usage
106
114
  /// @debug k-color-darken( #f00, 10% ); // => #e60000
@@ -112,6 +120,7 @@ $kendo-dark-color-level-step: 16% !default;
112
120
  /// @param {Color} $color - The color to lighten.
113
121
  /// @param {Number} $amount - The amount to lighten the color.
114
122
  /// @return {Color} - The lightened color.
123
+ /// @group functions
115
124
  ///
116
125
  /// @example scss - Usage
117
126
  /// @debug k-color-lighten( #f00, 10% ); // => #ff1a1a
@@ -123,6 +132,7 @@ $kendo-dark-color-level-step: 16% !default;
123
132
  /// @param {Color} $color - The color to adjust the hue for.
124
133
  /// @param {Number} $degrees - The amount to adjust the hue.
125
134
  /// @return {Color} - The adjusted color.
135
+ /// @group functions
126
136
  ///
127
137
  /// @example scss - Usage
128
138
  /// @debug k-color-adjust-hue( #f00, 10deg ); // => #ff1a00
@@ -134,6 +144,7 @@ $kendo-dark-color-level-step: 16% !default;
134
144
  /// @param {Color} $color - The color to saturate.
135
145
  /// @param {Number} $amount - The amount to saturate the color.
136
146
  /// @return {Color} - The saturated color.
147
+ /// @group functions
137
148
  ///
138
149
  /// @example scss - Usage
139
150
  /// @debug k-color-saturate( #f00, 10% ); // => #ff3333
@@ -145,6 +156,7 @@ $kendo-dark-color-level-step: 16% !default;
145
156
  /// @param {Color} $color - The color to desaturate.
146
157
  /// @param {Number} $amount - The amount to desaturate the color.
147
158
  /// @return {Color} - The desaturated color.
159
+ /// @group functions
148
160
  ///
149
161
  /// @example scss - Usage
150
162
  /// @debug k-color-desaturate( #f00, 10% ); // => #e60000
@@ -152,6 +164,13 @@ $kendo-dark-color-level-step: 16% !default;
152
164
  @return color.adjust( $color, $saturation: - $amount );
153
165
  }
154
166
 
167
+ /// Mixes a color with white or black based on a level value.
168
+ /// Negative levels tint toward white, positive levels shade toward black.
169
+ /// @param {Color} $color - The color to adjust.
170
+ /// @param {Number} $level [0] - Shade/tint level. Negative = tint, positive = shade. Accepts numeric steps or percentages.
171
+ /// @param {Boolean} $_is-dark-theme [$kendo-is-dark-theme] - Internal dark-theme flag, controls step size.
172
+ /// @return {Color} - The adjusted color.
173
+ /// @group functions
155
174
  @function k-color-level( $color, $level: 0, $_is-dark-theme: $kendo-is-dark-theme ) {
156
175
  $_dark-theme: if( meta.variable-exists( kendo-is-dark-theme ), $_is-dark-theme, false );
157
176
  $_color-level-step: if( $_dark-theme, $kendo-dark-color-level-step, $kendo-light-color-level-step );
@@ -176,7 +195,7 @@ $kendo-dark-color-level-step: 16% !default;
176
195
  /// @param {Number} $level - The amount to lighten the color
177
196
  /// @return {Color} - The lightened color
178
197
  ///
179
- /// @group color-system
198
+ /// @group functions
180
199
  ///
181
200
  /// @example scss - Usage
182
201
  /// @debug k-color-tint( #f00, 1 ); // => #ff1a1a
@@ -189,7 +208,7 @@ $kendo-dark-color-level-step: 16% !default;
189
208
  /// @param {Number} $level - The amount to darken the color
190
209
  /// @return {Color} - The darkened color
191
210
  ///
192
- /// @group color-system
211
+ /// @group functions
193
212
  ///
194
213
  /// @example scss - Usage
195
214
  /// @debug k-color-shade( #f00, 1 ); // => #e60000
@@ -202,7 +221,7 @@ $kendo-dark-color-level-step: 16% !default;
202
221
  /// @param {Number} $level - The amount to shade or tint the color
203
222
  /// @return {Color} - The shaded or tinted color
204
223
  ///
205
- /// @group color-system
224
+ /// @group functions
206
225
  @function k-try-shade( $color, $level: 1, $_is-dark-theme: $kendo-is-dark-theme ) {
207
226
  $_dark-theme: if( meta.variable-exists( kendo-is-dark-theme ), $_is-dark-theme, false );
208
227
 
@@ -218,7 +237,7 @@ $kendo-dark-color-level-step: 16% !default;
218
237
  /// @param {Number} $level - The amount to tint or shade the color
219
238
  /// @return {Color} - The tinted or shaded color
220
239
  ///
221
- /// @group color-system
240
+ /// @group functions
222
241
  @function k-try-tint( $color, $level: 1, $_is-dark-theme: $kendo-is-dark-theme ) {
223
242
  $_dark-theme: if( meta.variable-exists( kendo-is-dark-theme ), $_is-dark-theme, false );
224
243
 
@@ -234,7 +253,7 @@ $kendo-dark-color-level-step: 16% !default;
234
253
  /// @param {Number} $level - The amount to darken or lighten the color
235
254
  /// @return {Color} - The darkened or lightened color
236
255
  ///
237
- /// @group color-system
256
+ /// @group functions
238
257
  @function k-try-darken( $color, $amount, $_is-dark-theme: $kendo-is-dark-theme ) {
239
258
  $_dark-theme: if( meta.variable-exists( kendo-is-dark-theme ), $_is-dark-theme, false );
240
259
 
@@ -249,7 +268,7 @@ $kendo-dark-color-level-step: 16% !default;
249
268
  /// @param {Number} $level - The amount to lighten or darken the color
250
269
  /// @return {Color} - The lightened or darkened color
251
270
  ///
252
- /// @group color-system
271
+ /// @group functions
253
272
  @function k-try-lighten( $color, $amount, $_is-dark-theme: $kendo-is-dark-theme ) {
254
273
  $_dark-theme: if( meta.variable-exists( kendo-is-dark-theme ), $_is-dark-theme, false );
255
274
 
@@ -264,7 +283,7 @@ $kendo-dark-color-level-step: 16% !default;
264
283
  /// @param {Color} $bg - The background color
265
284
  /// @return {Color} - The converted color
266
285
  ///
267
- /// @group color-system
286
+ /// @group functions
268
287
  ///
269
288
  /// @example scss - Usage
270
289
  /// @debug k-rgba-to-mix( rgba( #f00, 0.5 ), #fff ); // => #ff8080
@@ -567,7 +586,7 @@ $wcag-light: white !default;
567
586
  /// @param {Color} $color - The color to calculate the relative luminance for.
568
587
  /// @return {Number} - The relative luminance for the color.
569
588
  ///
570
- /// @group accessibility
589
+ /// @group functions
571
590
  ///
572
591
  /// @link https://www.w3.org/TR/WCAG/#dfn-relative-luminance
573
592
  /// @link https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
@@ -584,7 +603,7 @@ $wcag-light: white !default;
584
603
  /// @param {Color} $foreground - The foreground color
585
604
  /// @return {Number} - The contrast ratio between the two colors
586
605
  ///
587
- /// @group accessibility
606
+ /// @group functions
588
607
  ///
589
608
  /// @link https://www.w3.org/TR/WCAG/#dfn-contrast-ratio
590
609
  /// @link https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests
@@ -599,7 +618,7 @@ $wcag-light: white !default;
599
618
  /// @param {Color} $color - The color to check
600
619
  /// @return {Boolean} - True if the color is dark, false otherwise
601
620
  ///
602
- /// @group accessibility
621
+ /// @group functions
603
622
  @function k-is-dark( $color ) {
604
623
  @return if( k-color-luminance( $color ) < .5, true, false );
605
624
  }
@@ -608,7 +627,7 @@ $wcag-light: white !default;
608
627
  /// @param {Color} $color - The color to check
609
628
  /// @return {Boolean} - True if the color is light, false otherwise
610
629
  ///
611
- /// @group accessibility
630
+ /// @group functions
612
631
  @function k-is-light( $color ) {
613
632
  @return if( k-color-luminance( $color ) < .5, false, true );
614
633
  }
@@ -622,7 +641,7 @@ $wcag-light: white !default;
622
641
  /// @param {Number} $min-ratio - The minimum contrast ratio to reach
623
642
  /// @return {Color} - The color with the highest contrast ratio
624
643
  ///
625
- /// @group accessibility
644
+ /// @group functions
626
645
  @function k-contrast-color( $background, $dark: $wcag-dark, $light: $wcag-light, $min-ratio: $wcag-min-contrast-ratio ) {
627
646
  $foregrounds: $light, $dark, #ffffff, #000000;
628
647
  $max-ratio: 0;
@@ -7,6 +7,7 @@
7
7
  /// @param {String} $default - The default value to compare against.
8
8
  /// @param {String | List} $current - The current value to check. Can be a single value or a list of values.
9
9
  /// @return {String | Null} - Returns "&," when values match, null otherwise.
10
+ /// @group functions
10
11
 
11
12
  @function k-when-default($default, $current) {
12
13
  @if meta.type-of($current) == "list" {
@@ -3,6 +3,7 @@
3
3
  /// @param {Any} $var - The variable to check.
4
4
  /// @param {Any} $fallback - The fallback value.
5
5
  /// @return {Any} - The value of the variable or the fallback value.
6
+ /// @group functions
6
7
  ///
7
8
  /// @example scss - Usage
8
9
  /// $foo: null;
@@ -4,6 +4,7 @@
4
4
  /// @param {List} $list - The list to check.
5
5
  /// @param {Any} $value - The value to check for.
6
6
  /// @return {Boolean} - Whether `$list` contains `$value`.
7
+ /// @group functions
7
8
  ///
8
9
  /// @example scss - Usage
9
10
  /// @debug k-list-includes( ( "foo", "bar" ), "foo" ); // => true
@@ -15,6 +16,7 @@
15
16
  /// Reverse the order of items in `$list`.
16
17
  /// @param {List} $list - The list to reverse.
17
18
  /// @return {List} - The reversed list.
19
+ /// @group functions
18
20
  ///
19
21
  /// @example scss - Usage
20
22
  /// @debug k-list-reverse( ( "foo", "bar" ) ); // => "bar, foo"
@@ -4,6 +4,7 @@
4
4
  /// Returns the value at `$key` in `$map`.
5
5
  /// @param {Map} $map - The map to get the value from.
6
6
  /// @param {Any} $key - The key to get the value for.
7
+ /// @group functions
7
8
  ///
8
9
  /// @example scss - Usage
9
10
  /// @debug k-map-get( ( "foo": "bar" ), "foo" ); // => "bar"
@@ -18,6 +19,7 @@
18
19
  /// @param {Map} $map - The map to merge.
19
20
  /// @param {Map} $args - The map to merge into `$map`.
20
21
  /// @return {Map} - A map with the keys and values from `$map` and `$args`.
22
+ /// @group functions
21
23
  ///
22
24
  /// @example scss - Usage
23
25
  /// @debug k-map-merge( ( "foo": "bar" ), ( "baz": "qux" ) ); // => ( "foo": "bar", "baz": "qux" )
@@ -31,6 +33,7 @@
31
33
  /// Returns a deep-map with the keys and values from `$map` and `$args`.
32
34
  /// @param {Map} $maps - The maps to deep-merge.
33
35
  /// @return {Map} - A map with the keys and values from `$map` and `$args`.
36
+ /// @group functions
34
37
  ///
35
38
  /// @example scss - Usage
36
39
  /// @debug k-map-deep-merge( ( "foo": ("bar": "baz", "baz": "qux" ) ), ( "foo": ("bar": "foo") ) ); // => ( "foo": ("bar": "foo", "baz": "qux" ))
@@ -63,6 +66,7 @@
63
66
  /// @param {Any} $key - The key to set the value for.
64
67
  /// @param {Any} $value - The value to set.
65
68
  /// @return {Map} - A map with the key and value set.
69
+ /// @group functions
66
70
  ///
67
71
  /// @example scss - Usage
68
72
  /// @debug k-map-set( ( "foo": "bar" ), "baz", "qux" ); // => ( "foo": "bar", "baz": "qux" )
@@ -78,6 +82,7 @@
78
82
  /// Returns negative values of a number or numbers in a list.
79
83
  /// @param {Map} $map - The map to get the values from.
80
84
  /// @return {Map} - A comma separated list of the values in `$map`.
85
+ /// @group functions
81
86
  ///
82
87
  /// @example scss - Usage
83
88
  /// @debug k-map-negate( ( 0: 0, 1: 1px, 2: 2px ) ); // => ("-1": -1px, "-2": -2px)
@@ -8,6 +8,7 @@
8
8
  /// @param {Number} $min - The minimum value.
9
9
  /// @param {Number} $max - The maximum value.
10
10
  /// @return {Number} - The clamped number.
11
+ /// @group functions
11
12
  ///
12
13
  /// @example scss - Usage
13
14
  /// @debug k-math-clamp( 10, 0, 5 ); // => 5
@@ -19,6 +20,7 @@
19
20
  /// @param {Number} $x - The base.
20
21
  /// @param {Number} $n - The exponent.
21
22
  /// @return {Number} - The result of raising `$x` to the power of `$n`.
23
+ /// @group functions
22
24
  ///
23
25
  /// @example scss - Usage
24
26
  /// @debug k-math-pow( 2, 3 ); // => 8
@@ -47,6 +49,7 @@
47
49
  /// @param {Number} $number - The number to round.
48
50
  /// @param {Number} $precision - The number of decimal places to round to.
49
51
  /// @return {Number} - The rounded number.
52
+ /// @group functions
50
53
  ///
51
54
  /// @example scss - Usage
52
55
  /// @debug k-math-round( 10.123456789, 3 ); // => 10.123
@@ -63,6 +66,7 @@
63
66
  /// Remove the unit from a number.
64
67
  /// @param {Number} $number - The number to remove the unit from.
65
68
  /// @return {Number} - The unitless number.
69
+ /// @group functions
66
70
  ///
67
71
  /// @example scss - Usage
68
72
  /// @debug k-math-strip-unit( 10px ); // => 10