@progress/kendo-theme-core 6.1.1-dev.5 → 6.1.1-dev.66

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.
@@ -1,20 +1,57 @@
1
+ /// Returns the first index of `$substring` in `$string`, or `null` if `$string` doesn’t contain `$substring`.
2
+ /// @param {String} $string - The string to process.
3
+ /// @param {String} $substring - The substring to look for.
4
+ /// @return {Number} - The first index of `$substring` in `$string`, or `null` if `$string` doesn’t contain `$substring`.
5
+ ///
6
+ /// @example scss - Usage
7
+ /// @debug k-string-index( "foo bar", "bar" ); // => 5
1
8
  @function k-string-index( $string, $substring ) {
2
9
  @return str-index( $string, $substring );
3
10
  }
4
11
 
12
+ /// Returns a copy of `$string` with `$insert` inserted at `$index`.
13
+ /// @param {String} $string - The string to process.
14
+ /// @param {String} $insert - The string to insert.
15
+ /// @param {Number} $index - The index at which to insert `$insert`.
16
+ /// @return {String} - The resulting string.
17
+ ///
18
+ /// @example scss - Usage
19
+ /// @debug k-string-insert( "foo bar", "baz", 5 ); // => "foo baz bar"
5
20
  @function k-string-insert( $string, $insert, $index ) {
6
21
  @return str-insert( $string, $insert, $index );
7
22
  }
8
23
 
24
+ /// Returns the length of `$string`.
25
+ /// @param {String} $string - The string to process.
26
+ /// @return {Number} - The length of `$string`.
27
+ ///
28
+ /// @example scss - Usage
29
+ /// @debug k-string-length( "foo bar" ); // => 7
9
30
  @function k-string-length( $string ) {
10
31
  @return str-length( $string );
11
32
  }
12
33
 
34
+ /// Returns a copy of `$string` with quotes added.
35
+ /// @param {String} $string - The string to process.
36
+ /// @return {String} - The resulting string.
37
+ ///
38
+ /// @example scss - Usage
39
+ /// @debug k-string-quote( "foo bar" ); // => "foo bar"
13
40
  @function k-string-quote( $string ) {
14
41
  @return quote( $string );
15
42
  }
16
43
 
17
- // See https://www.sassmeister.com/gist/1b4f2da5527830088e4d
44
+ /// Returns a copy of `$string` with all occurrences of `$search`
45
+ /// replaced by `$replace`.
46
+ /// @param {String} $string - The string to process.
47
+ /// @param {String} $search - The substring to look for.
48
+ /// @param {String} $replace - The replacement string.
49
+ /// @return {String} - The resulting string.
50
+ ///
51
+ /// @link https://www.sassmeister.com/gist/1b4f2da5527830088e4d
52
+ ///
53
+ /// @example scss - Usage
54
+ /// @debug k-string-replace( "foo bar", "bar", "baz" ); // => "foo baz"
18
55
  @function k-string-replace( $string, $search, $replace: "" ) {
19
56
  @if k-meta-type-of( $string ) == number {
20
57
  $string: $string + "";
@@ -29,22 +66,53 @@
29
66
  @return $string;
30
67
  }
31
68
 
69
+ /// Returns a substring of `$string` starting at `$start-at` and ending at `$end-at`.
70
+ /// @param {String} $string - The string to process.
71
+ /// @param {Number} $start-at - The index at which to start the substring.
72
+ /// @param {Number} $end-at - The index at which to end the substring.
73
+ /// @return {String} - The resulting string.
74
+ ///
75
+ /// @example scss - Usage
76
+ /// @debug k-string-slice( "foo bar", 5 ); // => "bar"
32
77
  @function k-string-slice( $string, $start-at, $end-at: -1 ) {
33
78
  @return str-slice( $string, $start-at, $end-at );
34
79
  }
35
80
 
81
+ /// Returns a copy of `$string` with all uppercase letters converted to lowercase.
82
+ /// @param {String} $string - The string to process.
83
+ /// @return {String} - The resulting string.
84
+ ///
85
+ /// @example scss - Usage
86
+ /// @debug k-string-to-lower-case( "FOO BAR" ); // => "foo bar"
36
87
  @function k-string-to-lower-case( $string ) {
37
88
  @return to-lower-case( $string );
38
89
  }
39
90
 
91
+ /// Returns a copy of `$string` with all lowercase letters converted to uppercase.
92
+ /// @param {String} $string - The string to process.
93
+ /// @return {String} - The resulting string.
94
+ ///
95
+ /// @example scss - Usage
96
+ /// @debug k-string-to-upper-case( "foo bar" ); // => "FOO BAR"
40
97
  @function k-string-to-upper-case( $string ) {
41
98
  @return to-upper-case( $string );
42
99
  }
43
100
 
101
+ /// Returns a unique identifier.
102
+ /// @return {String} - The unique identifier.
103
+ ///
104
+ /// @example scss - Usage
105
+ /// @debug k-string-unique-id(); // => UNIQUE_ID
44
106
  @function k-string-unique-id() {
45
107
  @return unique-id();
46
108
  }
47
109
 
110
+ /// Returns a copy of `$string` with quotes removed.
111
+ /// @param {String} $string - The string to process.
112
+ /// @return {String} - The resulting string.
113
+ ///
114
+ /// @example scss - Usage
115
+ /// @debug k-string-unquote( "foo bar" ); // => foo bar
48
116
  @function k-string-unquote( $string ) {
49
117
  @return unquote( $string );
50
118
  }