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

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.1",
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
  }
@@ -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
@@ -7,6 +7,7 @@
7
7
  /// Checks whether `$value` is a <number> CSS data type.
8
8
  /// @param {Any} $value - The value to check.
9
9
  /// @return {Boolean} - Whether `$value` is a number.
10
+ /// @group functions
10
11
  ///
11
12
  /// @link https://developer.mozilla.org/en-US/docs/Web/CSS/number
12
13
  ///
@@ -20,6 +21,7 @@
20
21
  /// Checks whether `$value` is a <integer> CSS data type.
21
22
  /// @param {Any} $value - The value to check.
22
23
  /// @return {Boolean} - Whether `$value` is a integer.
24
+ /// @group functions
23
25
  ///
24
26
  /// @link https://developer.mozilla.org/en-US/docs/Web/CSS/integer
25
27
  ///
@@ -33,6 +35,7 @@
33
35
  /// Checks whether `$value` is a <time> CSS data type.
34
36
  /// @param {Any} $value - The value to check.
35
37
  /// @return {Boolean} - Whether `$value` is a time.
38
+ /// @group functions
36
39
  ///
37
40
  /// @link https://developer.mozilla.org/en-US/docs/Web/CSS/time
38
41
  ///
@@ -46,6 +49,7 @@
46
49
  /// Checks whether `$value` is a valid duration period.
47
50
  /// @param {Any} $value - The value to check.
48
51
  /// @return {Boolean} - Whether `$value` is a duration.
52
+ /// @group functions
49
53
  ///
50
54
  /// @link https://developer.mozilla.org/en-US/docs/Web/CSS/time
51
55
  ///
@@ -59,6 +63,7 @@
59
63
  /// Checks whether `$value` is a <angle> CSS data type.
60
64
  /// @param {Any} $value - The value to check.
61
65
  /// @return {Boolean} - Whether `$value` is a angle.
66
+ /// @group functions
62
67
  ///
63
68
  /// @link https://developer.mozilla.org/en-US/docs/Web/CSS/angle
64
69
  ///
@@ -72,6 +77,7 @@
72
77
  /// Checks whether `$value` is a <frequency> CSS data type.
73
78
  /// @param {Any} $value - The value to check.
74
79
  /// @return {Boolean} - Whether `$value` is a frequency.
80
+ /// @group functions
75
81
  ///
76
82
  /// @link https://developer.mozilla.org/en-US/docs/Web/CSS/frequency
77
83
  ///
@@ -85,6 +91,7 @@
85
91
  /// Checks whether `$value` is a relative <length> CSS data type.
86
92
  /// @param {Any} $value - The value to check.
87
93
  /// @return {Boolean} - Whether `$value` is a relative length.
94
+ /// @group functions
88
95
  ///
89
96
  /// @link https://developer.mozilla.org/en-US/docs/Web/CSS/length#relative_length_units_based_on_font
90
97
  /// @link https://developer.mozilla.org/en-US/docs/Web/CSS/length#relative_length_units_based_on_viewport
@@ -100,6 +107,7 @@
100
107
  /// Checks whether `$value` is an absolute <length> CSS data type.
101
108
  /// @param {Any} $value - The value to check.
102
109
  /// @return {Boolean} - Whether `$value` is an absolute length.
110
+ /// @group functions
103
111
  ///
104
112
  /// @link https://developer.mozilla.org/en-US/docs/Web/CSS/length#absolute_length_units
105
113
  ///
@@ -113,6 +121,7 @@
113
121
  /// Checks whether `$value` is a <percentage> CSS data type.
114
122
  /// @param {Any} $value - The value to check.
115
123
  /// @return {Boolean} - Whether `$value` is a percentage.
124
+ /// @group functions
116
125
  ///
117
126
  /// @link https://developer.mozilla.org/en-US/docs/Web/CSS/percentage
118
127
  ///
@@ -126,6 +135,7 @@
126
135
  /// Checks whether `$value` is a <length> CSS data type.
127
136
  /// @param {Any} $value - The value to check.
128
137
  /// @return {Boolean} - Whether `$value` is a length.
138
+ /// @group functions
129
139
  ///
130
140
  /// @link https://developer.mozilla.org/en-US/docs/Web/CSS/length
131
141
  ///
@@ -140,6 +150,7 @@
140
150
  /// Checks whether `$value` is a <resolution> CSS data type.
141
151
  /// @param {Any} $value - The value to check.
142
152
  /// @return {Boolean} - Whether `$value` is a resolution.
153
+ /// @group functions
143
154
  ///
144
155
  /// @link https://developer.mozilla.org/en-US/docs/Web/CSS/resolution
145
156
  ///
@@ -153,6 +164,7 @@
153
164
  /// Checks whether `$value` is a <position> CSS data type.
154
165
  /// @param {Any} $value - The value to check.
155
166
  /// @return {Boolean} - Whether `$value` is a position.
167
+ /// @group functions
156
168
  ///
157
169
  /// @link https://developer.mozilla.org/en-US/docs/Web/CSS/position
158
170
  ///
@@ -22,6 +22,7 @@ $_kendo-escape-class-name: (
22
22
  /// @param {String} $search - The substring to look for.
23
23
  /// @param {String} $replace - The replacement string.
24
24
  /// @return {String} - The resulting string.
25
+ /// @group functions
25
26
  ///
26
27
  /// @link https://www.sassmeister.com/gist/1b4f2da5527830088e4d
27
28
  ///
@@ -53,6 +54,11 @@ $_kendo-escape-class-name: (
53
54
  }
54
55
 
55
56
  // See https://codepen.io/kevinweber/pen/dXWoRw
57
+ /// URL-encodes special SVG characters in a data URI string so it can be safely embedded in CSS.
58
+ /// Only processes strings that start with "data:image/svg+xml".
59
+ /// @param {String} $string - The SVG data URI string to encode.
60
+ /// @return {String} - The URL-encoded string.
61
+ /// @group functions
56
62
  @function k-escape-svg($string) {
57
63
  @if string.index($string, "data:image/svg+xml") {
58
64
  @each $char, $encoded in $_kendo-svg-escaped-characters {
@@ -71,6 +77,7 @@ $_kendo-escape-class-name: (
71
77
  /// Escapes special characters in a class name
72
78
  /// @param {String} $text - The string to escape
73
79
  /// @return {String} - The escaped string
80
+ /// @group functions
74
81
  @function k-escape-class-name( $text ) {
75
82
  $_text: $text;
76
83
 
@@ -174,16 +174,28 @@ $kendo-durations: map.merge($default-durations, $kendo-durations);
174
174
  $kendo-transitions: $default-transitions !default;
175
175
  $kendo-transitions: map.merge($default-transitions, $kendo-transitions);
176
176
 
177
+ /// Returns a CSS variable reference for an easing token.
178
+ /// @param {String} $key - The easing key from $kendo-easings.
179
+ /// @return {String} CSS variable reference for the given easing token.
180
+ /// @group functions
177
181
  @function k-easing($key) {
178
182
  $easing: map.get($kendo-easings, $key);
179
183
  @return var(--kendo-easing-#{$key});
180
184
  }
181
185
 
186
+ /// Returns a CSS variable reference for a duration token.
187
+ /// @param {String} $key - The duration key from $kendo-durations.
188
+ /// @return {String} CSS variable reference for the given duration token.
189
+ /// @group functions
182
190
  @function k-duration($key) {
183
191
  $_duration: map.get($kendo-durations, $key);
184
192
  @return var(--kendo-duration-#{$key});
185
193
  }
186
194
 
195
+ /// Returns a CSS variable reference for a transition token.
196
+ /// @param {String} $key - The transition key from $kendo-transitions.
197
+ /// @return {String} CSS variable reference for the given transition token.
198
+ /// @group functions
187
199
  @function k-transition($key) {
188
200
  @return var(--kendo-transition-#{$key});
189
201
  }
@@ -49,6 +49,10 @@ $kendo-spacing: $default-spacing !default;
49
49
  $kendo-spacing: map.merge($default-spacing, $kendo-spacing);
50
50
 
51
51
 
52
+ /// Returns a CSS variable reference for a spacing step.
53
+ /// @param {Number | String} $step - The spacing step key from $kendo-spacing.
54
+ /// @return {String} CSS variable reference for the given spacing step.
55
+ /// @group functions
52
56
  @function k-spacing($step) {
53
57
  $_step: k-escape-class-name( $step );
54
58
  @return var(--kendo-spacing-#{$_step});
@@ -1,5 +1,9 @@
1
1
  $kendo-translucency-base: 0% !default;
2
2
 
3
+ /// Returns an oklch color expression with translucency applied via a CSS variable.
4
+ /// @param {Color} $color - The base color to apply translucency to.
5
+ /// @return {String} An oklch relative color expression with the translucency CSS variable applied.
6
+ /// @group functions
3
7
  @function k-translucency-bg($color) {
4
8
  $_result: "oklch(from #{$color} l c h / calc(100% - calc(var(--kendo-translucency-base, 0%))))";
5
9
  @return #{$_result};
@@ -8,6 +12,10 @@ $kendo-translucency-base: 0% !default;
8
12
  $kendo-translucency-blur-base: 6px !default;
9
13
  $kendo-translucency-blur-step: 2px !default;
10
14
 
15
+ /// Returns a blur filter expression scaled by a translucency level.
16
+ /// @param {Number} $level - The blur intensity multiplier (default: 1).
17
+ /// @return {String} A CSS blur() filter expression.
18
+ /// @group functions
11
19
  @function k-translucency-blur($level: 1) {
12
20
  $_result: "blur(calc(#{$kendo-translucency-blur-base} + calc(#{$level} * #{$kendo-translucency-blur-step})))";
13
21
  @return #{$_result};
@@ -25,6 +25,7 @@ $kendo-z-layers: (
25
25
  /// @param {Number} $n [0] - {Optional} Number of steps above the base layer.
26
26
  /// @param {Number} $delta [0] - {Deprecated, Optional} Balancing value.
27
27
  /// @return {Number} - Calculated z-index value.
28
+ /// @group functions
28
29
  @function k-z-index($layer, $n: 0, $delta: 0) {
29
30
  $layer-value: map.get($kendo-z-layers, $layer);
30
31