@progress/kendo-theme-core 5.12.0 → 5.12.1-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": "5.12.0",
4
+ "version": "5.12.1-dev.1",
5
5
  "author": "Progress",
6
6
  "license": "Apache-2.0",
7
7
  "keywords": [
@@ -28,16 +28,6 @@
28
28
  "publishConfig": {
29
29
  "access": "public"
30
30
  },
31
- "scripts": {
32
- "build": "sass-build",
33
- "sass": "sass-build",
34
- "nuget-pack": "jq '.version' package.json | xargs nuget pack package.nuspec -Version",
35
- "nuget-push": "nuget push *.nupkg -ApiKey $NUGET_API_KEY -Source $NUGET_FEED -SkipDuplicate",
36
- "prepublishOnly": "node ../../scripts/themes-prepublish.js",
37
- "postpublish": "echo 'no postpublish for core theme'"
38
- },
39
- "devDependencies": {
40
- "sass-build": "^1.0.0"
41
- },
42
- "gitHead": "9eaba5fe84f407f8f7240d2391cf6f5807f8eef4"
31
+ "scripts": {},
32
+ "gitHead": "6b89eb7de787b8a794d7ead79e0c4218abf59b18"
43
33
  }
@@ -0,0 +1,3 @@
1
+ // Equilateral triangle variables
2
+ $equilateral-index: 1.7320508076 !default;
3
+ $equilateral-height: .8660254038 !default;
@@ -1,18 +1,12 @@
1
1
  // Color constants
2
- $white: #ffffff; // stylelint-disable-line scss/dollar-variable-default
3
- $black: #000000; // stylelint-disable-line scss/dollar-variable-default
2
+ $kendo-color-white: #ffffff; // stylelint-disable-line scss/dollar-variable-default
3
+ $kendo-color-black: #000000; // stylelint-disable-line scss/dollar-variable-default
4
4
 
5
- $rgba-transparent: rgba( 0, 0, 0, 0 ); // stylelint-disable-line scss/dollar-variable-default
5
+ $kendo-color-rgba-transparent: rgba( 0, 0, 0, 0 ); // stylelint-disable-line scss/dollar-variable-default
6
6
 
7
- $gradient-transparent-to-black: rgba( black, 0 ), black; // stylelint-disable-line scss/dollar-variable-default
8
- $gradient-transparent-to-white: rgba( white, 0 ), white; // stylelint-disable-line scss/dollar-variable-default
9
- $gradient-black-to-transparent: black, rgba( black, 0 ); // stylelint-disable-line scss/dollar-variable-default
10
- $gradient-white-to-transparent: white, rgba( white, 0 ); // stylelint-disable-line scss/dollar-variable-default
7
+ $kendo-gradient-transparent-to-black: rgba( black, 0 ), black; // stylelint-disable-line scss/dollar-variable-default
8
+ $kendo-gradient-transparent-to-white: rgba( white, 0 ), white; // stylelint-disable-line scss/dollar-variable-default
9
+ $kendo-gradient-black-to-transparent: black, rgba( black, 0 ); // stylelint-disable-line scss/dollar-variable-default
10
+ $kendo-gradient-white-to-transparent: white, rgba( white, 0 ); // stylelint-disable-line scss/dollar-variable-default
11
11
 
12
- $gradient-rainbow: #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000; // stylelint-disable-line scss/dollar-variable-default
13
-
14
-
15
- /// Set a specific jump point for requesting color jumps
16
- /// @group color-system
17
- /// @access private
18
- $kendo-color-level-step: 8% !default;
12
+ $kendo-gradient-rainbow: #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000; // stylelint-disable-line scss/dollar-variable-default
@@ -331,3 +331,27 @@ $wcag-light: white !default;
331
331
 
332
332
  @return $max-ratio-color;
333
333
  }
334
+
335
+
336
+ // Legacy functions
337
+ @function k-yiq-luma-information($color) {
338
+ $r: k-color-red($color);
339
+ $g: k-color-green($color);
340
+ $b: k-color-blue($color);
341
+
342
+ $yiq: k-math-div( (($r * 299) + ($g * 587) + ($b * 114)), 1000 );
343
+
344
+ @return $yiq;
345
+ }
346
+ @function k-contrast-yiq($color, $dark: $yiq-dark, $light: $yiq-light) {
347
+ $yiq: k-yiq-luma-information($color);
348
+ $out: if($yiq >= $yiq-threshold, $dark, $light);
349
+ // @debug yiq;
350
+ @return $out;
351
+ }
352
+ @function k-contrast-legacy($color, $dark: $wcag-dark, $light: $wcag-light) {
353
+ $luma: k-color-luminance($color);
354
+ $out: if($luma < .5, $light, $dark);
355
+ // @debug $luma;
356
+ @return $out;
357
+ }
@@ -28,18 +28,18 @@ $kendo-color-level-step: 8% !default;
28
28
  }
29
29
 
30
30
  @function k-try-shade( $color, $level: 1 ) {
31
- $dark-theme: if( variable-exists( dark-theme ), $dark-theme, false );
31
+ $_dark-theme: if( k-meta-variable-exists( dark-theme ), $dark-theme, false );
32
32
 
33
- @if $dark-theme {
33
+ @if $_dark-theme {
34
34
  @return k-color-tint( $color, $level );
35
35
  }
36
36
 
37
37
  @return k-color-shade( $color, $level );
38
38
  }
39
39
  @function k-try-tint( $color, $level: 1 ) {
40
- $dark-theme: if( variable-exists( dark-theme ), $dark-theme, false );
40
+ $_dark-theme: if( k-meta-variable-exists( dark-theme ), $dark-theme, false );
41
41
 
42
- @if $dark-theme {
42
+ @if $_dark-theme {
43
43
  @return k-color-shade( $color, $level );
44
44
  }
45
45
 
@@ -48,18 +48,18 @@ $kendo-color-level-step: 8% !default;
48
48
 
49
49
 
50
50
  @function k-try-darken( $color, $amount ) {
51
- $dark-theme: if( variable-exists( dark-theme ), $dark-theme, false );
51
+ $_dark-theme: if( k-meta-variable-exists( dark-theme ), $dark-theme, false );
52
52
 
53
- @if $dark-theme {
53
+ @if $_dark-theme {
54
54
  @return k-color-lighten( $color, $amount );
55
55
  }
56
56
  @return k-color-darken( $color, $amount );
57
57
  }
58
58
 
59
59
  @function k-try-lighten( $color, $amount ) {
60
- $dark-theme: if( variable-exists( dark-theme ), $dark-theme, false );
60
+ $_dark-theme: if( k-meta-variable-exists( dark-theme ), $dark-theme, false );
61
61
 
62
- @if $dark-theme {
62
+ @if $_dark-theme {
63
63
  @return k-color-darken( $color, $amount );
64
64
  }
65
65
  @return k-color-lighten( $color, $amount );
@@ -14,6 +14,18 @@
14
14
  @return blue( $color );
15
15
  }
16
16
 
17
+ @function k-color-hue( $color ) {
18
+ @return hue( $color );
19
+ }
20
+
21
+ @function k-color-saturation( $color ) {
22
+ @return saturation( $color );
23
+ }
24
+
25
+ @function k-color-lightness( $color ) {
26
+ @return lightness( $color );
27
+ }
28
+
17
29
  @function k-color-mix( $color1, $color2, $weight: 50% ) {
18
30
  @return mix( $color1, $color2, $weight );
19
31
  }
@@ -25,3 +37,27 @@
25
37
  @function k-color-lighten( $color, $amount) {
26
38
  @return lighten( $color, $amount );
27
39
  }
40
+
41
+ @function k-color-adjust-hue( $color, $degrees ) {
42
+ @return adjust-hue( $color, $degrees );
43
+ }
44
+
45
+ @function k-color-saturate( $color, $amount ) {
46
+ @return saturate( $color, $amount );
47
+ }
48
+
49
+ @function k-color-desaturate( $color, $amount ) {
50
+ @return desaturate( $color, $amount );
51
+ }
52
+
53
+ @function k-color-grayscale( $color ) {
54
+ @return grayscale( $color );
55
+ }
56
+
57
+ @function k-color-complement( $color ) {
58
+ @return complement( $color );
59
+ }
60
+
61
+ @function k-color-invert( $color ) {
62
+ @return invert( $color );
63
+ }
@@ -0,0 +1,41 @@
1
+ $_kendo-svg-escaped-characters: (
2
+ ("%", "%25"),
3
+ ("<", "%3c"),
4
+ (">", "%3e"),
5
+ ("#", "%23"),
6
+ ("(", "%28"),
7
+ (")", "%29")
8
+ ) !default;
9
+
10
+ // See https://codepen.io/kevinweber/pen/dXWoRw
11
+ @function k-escape-svg($string) {
12
+ @if k-string-index($string, "data:image/svg+xml") {
13
+ @each $char, $encoded in $_kendo-svg-escaped-characters {
14
+ // Do not escape the url brackets
15
+ @if k-string-index($string, "url(") == 1 {
16
+ $string: url("#{k-string-replace(k-string-slice($string, 6, -3), $char, $encoded)}");
17
+ } @else {
18
+ $string: k-string-replace($string, $char, $encoded);
19
+ }
20
+ }
21
+ }
22
+
23
+ @return $string;
24
+ }
25
+
26
+
27
+
28
+ $_kendo-escape-class-name: (
29
+ ".": "\\.",
30
+ "/": "\\/"
31
+ );
32
+
33
+ @function k-escape-class-name( $text ) {
34
+ $_text: $text;
35
+
36
+ @each $char, $rep in $_kendo-escape-class-name {
37
+ $_text: k-string-replace( $_text, k-string-unquote( $char ), k-string-unquote( $rep ) );
38
+ }
39
+
40
+ @return $_text;
41
+ }
@@ -63,6 +63,10 @@
63
63
 
64
64
  }
65
65
 
66
+ @function k-math-percentage( $number ) {
67
+ @return percentage( $number );
68
+ }
69
+
66
70
  @function k-math-random( $limit: null ) {
67
71
  @if ( $limit == null ) {
68
72
  @return random();
@@ -1,9 +1,33 @@
1
1
  // Adapted from https://css-tricks.com/snippets/sass/advanced-type-checking/
2
2
 
3
+ @function k-meta-call( $function, $args... ) {
4
+ @return call( $function, $args... );
5
+ }
6
+
7
+ @function k-meta-function-exists( $name ) {
8
+ @return function-exists( $name );
9
+ }
10
+
11
+ @function k-meta-get-function( $name, $args... ) {
12
+ @return get-function( $name, $args... );
13
+ }
14
+
15
+ @function k-meta-inspect( $value ) {
16
+ @return inspect( $value );
17
+ }
18
+
19
+ @function k-meta-keywords( $args ) {
20
+ @return keywords( $args );
21
+ }
22
+
3
23
  @function k-meta-type-of( $value ) {
4
24
  @return type-of( $value );
5
25
  }
6
26
 
27
+ @function k-meta-variable-exists( $name ) {
28
+ @return variable-exists( $name );
29
+ }
30
+
7
31
  @function k-meta-is-number( $value ) {
8
32
  @return k-meta-type-of( $value ) == "number";
9
33
  }
@@ -16,6 +16,10 @@
16
16
 
17
17
  // See https://www.sassmeister.com/gist/1b4f2da5527830088e4d
18
18
  @function k-string-replace( $string, $search, $replace: "" ) {
19
+ @if k-meta-type-of( $string ) == number {
20
+ $string: $string + "";
21
+ }
22
+
19
23
  $index: k-string-index( $string, $search );
20
24
 
21
25
  @if $index {
@@ -1,10 +1,13 @@
1
- @import "_color.import.scss";
2
- @import "_color-contrast.import.scss";
3
- @import "_color-manipulation.import.scss";
4
- @import "_custom-properties.import.scss";
5
- @import "_lang.import.scss";
6
- @import "_list.import.scss";
7
- @import "_math.import.scss";
8
- @import "_map.import.scss";
9
- @import "_meta.import.scss";
10
- @import "_string.import.scss";
1
+ @import "../_variables.scss";
2
+
3
+ @import "./_color.import.scss";
4
+ @import "./_color-contrast.import.scss";
5
+ @import "./_color-manipulation.import.scss";
6
+ @import "./_custom-properties.import.scss";
7
+ @import "./_escape-string.import.scss";
8
+ @import "./_lang.import.scss";
9
+ @import "./_list.import.scss";
10
+ @import "./_math.import.scss";
11
+ @import "./_map.import.scss";
12
+ @import "./_meta.import.scss";
13
+ @import "./_string.import.scss";
@@ -1,5 +1,6 @@
1
- @import "./color-system/index.import.scss";
2
1
  @import "./functions/index.import.scss";
2
+ @import "./color-system/index.import.scss";
3
3
  @import "./mixins/index.import.scss";
4
4
  @import "./module-system/index.import.scss";
5
5
  @import "./styles/index.import.scss";
6
+ @import "./_variables.scss";
@@ -1,58 +1,58 @@
1
1
  // Border radius
2
2
  @mixin border-radius( $radius: null ) {
3
- @if $enable-rounded {
3
+ @if $kendo-enable-rounded {
4
4
  border-radius: $radius;
5
5
  }
6
6
  }
7
7
 
8
8
  @mixin border-top-radius( $radius: null ) {
9
- @if $enable-rounded {
9
+ @if $kendo-enable-rounded {
10
10
  border-top-left-radius: $radius;
11
11
  border-top-right-radius: $radius;
12
12
  }
13
13
  }
14
14
 
15
15
  @mixin border-right-radius( $radius: null ) {
16
- @if $enable-rounded {
16
+ @if $kendo-enable-rounded {
17
17
  border-top-right-radius: $radius;
18
18
  border-bottom-right-radius: $radius;
19
19
  }
20
20
  }
21
21
 
22
22
  @mixin border-bottom-radius( $radius: null ) {
23
- @if $enable-rounded {
23
+ @if $kendo-enable-rounded {
24
24
  border-bottom-right-radius: $radius;
25
25
  border-bottom-left-radius: $radius;
26
26
  }
27
27
  }
28
28
 
29
29
  @mixin border-left-radius( $radius: null ) {
30
- @if $enable-rounded {
30
+ @if $kendo-enable-rounded {
31
31
  border-top-left-radius: $radius;
32
32
  border-bottom-left-radius: $radius;
33
33
  }
34
34
  }
35
35
 
36
36
  @mixin border-top-radius-only( $radius: null ) {
37
- @if $enable-rounded {
37
+ @if $kendo-enable-rounded {
38
38
  border-radius: $radius $radius 0 0;
39
39
  }
40
40
  }
41
41
 
42
42
  @mixin border-right-radius-only( $radius: null ) {
43
- @if $enable-rounded {
43
+ @if $kendo-enable-rounded {
44
44
  border-radius: 0 $radius $radius 0;
45
45
  }
46
46
  }
47
47
 
48
48
  @mixin border-bottom-radius-only( $radius: null ) {
49
- @if $enable-rounded {
49
+ @if $kendo-enable-rounded {
50
50
  border-radius: 0 0 $radius $radius;
51
51
  }
52
52
  }
53
53
 
54
54
  @mixin border-left-radius-only( $radius: null ) {
55
- @if $enable-rounded {
55
+ @if $kendo-enable-rounded {
56
56
  border-radius: $radius 0 0 $radius;
57
57
  }
58
58
  }
@@ -1,5 +1,5 @@
1
1
  @mixin box-shadow( $shadow... ) {
2
- @if $enable-shadows and nth($shadow, 1) {
2
+ @if $kendo-enable-shadows and k-list-nth($shadow, 1) {
3
3
  box-shadow: $shadow;
4
4
  }
5
5
  }
@@ -1,18 +1,9 @@
1
- $disabled-styling: () !default;
2
-
3
1
  // Disabled
4
- @mixin disabled( $disabled-styling ) {
2
+ @mixin disabled( $kendo-disabled-styling ) {
5
3
  outline: none;
6
4
  cursor: default;
7
- opacity: k-map-get($disabled-styling, opacity);
8
- filter: k-map-get($disabled-styling, filter);
5
+ opacity: k-map-get($kendo-disabled-styling, opacity);
6
+ filter: k-map-get($kendo-disabled-styling, filter);
9
7
  pointer-events: none;
10
8
  box-shadow: none;
11
9
  }
12
-
13
- @mixin disabled-legacy-ie( $disabled-styling ) {
14
- outline: none;
15
- cursor: default;
16
- opacity: k-map-get($disabled-styling, opacity);
17
- box-shadow: none;
18
- }
@@ -1,5 +1,5 @@
1
1
  @mixin linear-gradient( $gradient: null ) {
2
- @if $gradient and $enable-gradients {
2
+ @if $gradient and $kendo-enable-gradients {
3
3
  @if $gradient == none {
4
4
  background-image: none;
5
5
  } @else {
@@ -39,7 +39,7 @@ $_imported: ();
39
39
 
40
40
  @mixin verify-dependencies() {
41
41
  @each $component in $kendo-components {
42
- @if (k-map-has-key( $_kendo-dependencies, $component) == false) {
42
+ @if (k-map-has-key( $_kendo-dependencies, $component ) == false) {
43
43
  // sass-lint:disable-block no-warn
44
44
  @error "Module '#{$component}' is not defined.";
45
45
  }
@@ -1,5 +1,5 @@
1
- /// @name k-sr-only
2
- /// @description This class could be assigned to elements which should be visually hidden, but remain accessible for screen readers.
1
+ /// This class could be assigned to elements which should be visually hidden, but remain accessible for screen readers.
2
+ /// @name .k-sr-only
3
3
  /// @group accessibility
4
4
  .k-sr-only {
5
5
  position: absolute;
@@ -7,10 +7,32 @@
7
7
  display: flex;
8
8
  flex-flow: column nowrap;
9
9
  }
10
+ .k-flex {
11
+ flex: 1 1 auto;
12
+ }
10
13
  .k-spacer {
11
14
  flex: none;
12
15
  flex-grow: 1;
13
16
  }
17
+ .k-spacer-sized {
18
+ flex-grow: 0;
19
+ }
20
+
21
+
22
+ // Stack layout
23
+ .k-stack-layout {}
24
+
25
+
26
+ // Flex layout
27
+ .k-flex-layout {
28
+ display: flex;
29
+ }
30
+
31
+
32
+ // Grid layout
33
+ .k-grid-layout {
34
+ display: grid;
35
+ }
14
36
 
15
37
 
16
38
  // Separator
@@ -54,3 +76,8 @@ hr.k-separator {
54
76
  .k-rtl {
55
77
  direction: rtl;
56
78
  }
79
+
80
+
81
+ // Legacy aliases
82
+ .k-hbox { @extend .k-hstack; }
83
+ .k-vbox { @extend .k-vstack; }