@progress/kendo-theme-material 7.1.0-dev.8 → 7.1.0-dev.9

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 (92) hide show
  1. package/dist/all.css +129 -21
  2. package/dist/all.scss +2633 -1627
  3. package/dist/meta/sassdoc-data.json +1460 -1576
  4. package/dist/meta/sassdoc-raw-data.json +723 -777
  5. package/dist/meta/variables.json +464 -400
  6. package/lib/swatches/material-aqua-dark.json +1 -1
  7. package/lib/swatches/material-arctic.json +1 -1
  8. package/lib/swatches/material-burnt-teal.json +1 -1
  9. package/lib/swatches/material-dataviz-v4.json +1 -1
  10. package/lib/swatches/material-eggplant.json +1 -1
  11. package/lib/swatches/material-lime-dark.json +1 -1
  12. package/lib/swatches/material-lime.json +1 -1
  13. package/lib/swatches/material-main-dark.json +1 -1
  14. package/lib/swatches/material-main.json +1 -1
  15. package/lib/swatches/material-nova.json +1 -1
  16. package/lib/swatches/material-pacific-dark.json +1 -1
  17. package/lib/swatches/material-pacific.json +1 -1
  18. package/lib/swatches/material-sky-dark.json +1 -1
  19. package/lib/swatches/material-sky.json +1 -1
  20. package/lib/swatches/material-smoke.json +1 -1
  21. package/package.json +5 -5
  22. package/scss/_variables.scss +0 -229
  23. package/scss/action-buttons/_theme.scss +2 -2
  24. package/scss/adaptive/_variables.scss +1 -1
  25. package/scss/appbar/_variables.scss +2 -2
  26. package/scss/bottom-navigation/_theme.scss +12 -1
  27. package/scss/breadcrumb/_variables.scss +2 -2
  28. package/scss/button/_theme.scss +3 -3
  29. package/scss/button/_variables.scss +3 -3
  30. package/scss/calendar/_theme.scss +1 -1
  31. package/scss/calendar/_variables.scss +3 -3
  32. package/scss/chat/_variables.scss +2 -2
  33. package/scss/checkbox/_theme.scss +1 -1
  34. package/scss/checkbox/_variables.scss +4 -4
  35. package/scss/chip/_theme.scss +16 -13
  36. package/scss/chip/_variables.scss +8 -8
  37. package/scss/core/_index.scss +4 -1
  38. package/scss/core/color-system/_functions.scss +101 -0
  39. package/scss/core/color-system/_palettes-legacy.scss +671 -0
  40. package/scss/core/color-system/_palettes.scss +297 -0
  41. package/scss/core/color-system/_swatch-legacy.scss +65 -0
  42. package/scss/core/color-system/_swatch.scss +426 -0
  43. package/scss/dataviz/_variables.scss +42 -42
  44. package/scss/dock-manager/_variables.scss +2 -2
  45. package/scss/draggable/_variables.scss +1 -1
  46. package/scss/dropzone/_variables.scss +2 -2
  47. package/scss/editor/_variables.scss +1 -1
  48. package/scss/fab/_theme.scss +20 -20
  49. package/scss/filemanager/_variables.scss +3 -3
  50. package/scss/gantt/_layout.scss +1 -1
  51. package/scss/gantt/_theme.scss +1 -1
  52. package/scss/gantt/_variables.scss +8 -8
  53. package/scss/grid/_theme.scss +67 -52
  54. package/scss/grid/_variables.scss +9 -6
  55. package/scss/input/_variables.scss +5 -6
  56. package/scss/list/_theme.scss +8 -0
  57. package/scss/listview/_theme.scss +1 -1
  58. package/scss/listview/_variables.scss +2 -2
  59. package/scss/map/_variables.scss +1 -1
  60. package/scss/mediaplayer/_variables.scss +1 -1
  61. package/scss/menu/_variables.scss +2 -2
  62. package/scss/notification/_variables.scss +1 -1
  63. package/scss/orgchart/_variables.scss +2 -2
  64. package/scss/pager/_variables.scss +2 -2
  65. package/scss/panelbar/_variables.scss +12 -12
  66. package/scss/pdf-viewer/_variables.scss +1 -1
  67. package/scss/pivotgrid/_variables.scss +8 -8
  68. package/scss/progressbar/_variables.scss +1 -1
  69. package/scss/radio/_theme.scss +1 -1
  70. package/scss/scheduler/_theme.scss +12 -0
  71. package/scss/scheduler/_variables.scss +7 -7
  72. package/scss/signature/_variables.scss +1 -1
  73. package/scss/skeleton/_variables.scss +1 -1
  74. package/scss/slider/_variables.scss +2 -2
  75. package/scss/splitter/_variables.scss +2 -2
  76. package/scss/spreadsheet/_variables.scss +4 -4
  77. package/scss/stepper/_variables.scss +7 -7
  78. package/scss/switch/_theme.scss +1 -1
  79. package/scss/switch/_variables.scss +3 -3
  80. package/scss/table/_layout.scss +25 -0
  81. package/scss/table/_theme.scss +31 -16
  82. package/scss/table/_variables.scss +3 -3
  83. package/scss/tabstrip/_variables.scss +1 -1
  84. package/scss/taskboard/_variables.scss +5 -4
  85. package/scss/tilelayout/_variables.scss +1 -1
  86. package/scss/timeline/_variables.scss +4 -4
  87. package/scss/toolbar/_theme.scss +2 -2
  88. package/scss/tooltip/_variables.scss +2 -2
  89. package/scss/treeview/_variables.scss +1 -1
  90. package/scss/upload/_theme.scss +1 -1
  91. package/scss/core/color-system/_color-system-material.scss +0 -801
  92. package/scss/core/color-system/index.import.scss +0 -1
@@ -64,7 +64,7 @@ $kendo-checkbox-bg: null !default;
64
64
  $kendo-checkbox-text: null !default;
65
65
  /// The border color of the CheckBox.
66
66
  /// @group checkbox
67
- $kendo-checkbox-border: rgba( if( $kendo-is-dark-theme, $kendo-color-white, $kendo-color-black ), .54 ) !default;
67
+ $kendo-checkbox-border: rgba( if($kendo-enable-color-system, k-color( on-app-surface, true ), if( $kendo-is-dark-theme, $kendo-color-white, $kendo-color-black )), .54 ) !default;
68
68
 
69
69
  /// The background color of the hovered CheckBox.
70
70
  /// @group checkbox
@@ -81,7 +81,7 @@ $kendo-checkbox-hover-border: null !default;
81
81
  $kendo-checkbox-checked-bg: $kendo-color-primary !default;
82
82
  /// The text color of the checked CheckBox.
83
83
  /// @group checkbox
84
- $kendo-checkbox-checked-text: k-contrast-color( $kendo-checkbox-checked-bg ) !default;
84
+ $kendo-checkbox-checked-text: if($kendo-enable-color-system, k-color( on-primary ), k-contrast-color( $kendo-checkbox-checked-bg )) !default;
85
85
  /// The border color of the checked CheckBox.
86
86
  /// @group checkbox
87
87
  $kendo-checkbox-checked-border: $kendo-checkbox-checked-bg !default;
@@ -117,7 +117,7 @@ $kendo-checkbox-disabled-bg: null !default;
117
117
  $kendo-checkbox-disabled-text: null !default;
118
118
  /// The border color of the disabled CheckBox.
119
119
  /// @group checkbox
120
- $kendo-checkbox-disabled-border: k-try-shade( $kendo-component-bg, 4 ) !default;
120
+ $kendo-checkbox-disabled-border: if($kendo-enable-color-system, k-color( base-emphasis ), k-try-shade( $kendo-component-bg, 4 )) !default;
121
121
 
122
122
 
123
123
  /// The background color of the disabled and checked CheckBox.
@@ -125,7 +125,7 @@ $kendo-checkbox-disabled-border: k-try-shade( $kendo-component-bg, 4 ) !default;
125
125
  $kendo-checkbox-disabled-checked-bg: $kendo-checkbox-disabled-border !default;
126
126
  /// The text color of the disabled and checked CheckBox.
127
127
  /// @group checkbox
128
- $kendo-checkbox-disabled-checked-text: k-contrast-color( $kendo-checkbox-disabled-checked-bg ) !default;
128
+ $kendo-checkbox-disabled-checked-text: if($kendo-enable-color-system, k-color( on-base ), k-contrast-color( $kendo-checkbox-disabled-checked-bg )) !default;
129
129
  /// The border color of the disabled and checked CheckBox.
130
130
  /// @group checkbox
131
131
  $kendo-checkbox-disabled-checked-border: $kendo-checkbox-disabled-checked-bg !default;
@@ -27,56 +27,59 @@
27
27
  &:focus,
28
28
  &.k-focus {
29
29
  @include box-shadow( none );
30
- @include fill( $bg: k-try-tint( $color, 88% ) );
30
+ @include fill( $bg: if($kendo-enable-color-system, k-color( #{$name}-subtle-active ), k-try-tint( $color, 88% )) );
31
31
  }
32
32
  } @else if ($name == "warning") {
33
33
  @include fill(
34
- $color: if( $kendo-is-dark-theme, k-try-shade( $color, 50% ), $kendo-chip-outline-text)
34
+ $color: if($kendo-enable-color-system, $kendo-chip-outline-text, if( $kendo-is-dark-theme, k-try-shade( $color, 50% ), $kendo-chip-outline-text))
35
35
  );
36
36
 
37
37
  &:focus,
38
38
  &.k-focus {
39
39
  @include box-shadow( none );
40
- @include fill( $bg: k-try-tint( $color, 65% ) );
40
+ @include fill( $bg: if($kendo-enable-color-system, k-color( #{$name}-subtle-active ), k-try-tint( $color, 65% )) );
41
41
  }
42
42
 
43
43
  &:hover,
44
44
  &.k-hover {
45
45
  @include fill(
46
- $bg: k-try-tint( $color, 80% ),
47
- $color: if( $kendo-is-dark-theme, k-try-shade( $color, 50% ), $kendo-chip-outline-text)
46
+ $bg: if($kendo-enable-color-system, k-color( #{$name}-subtle-hover ), k-try-tint( $color, 80% )),
47
+ $color: if($kendo-enable-color-system, $kendo-chip-outline-text, if( $kendo-is-dark-theme, k-try-shade( $color, 50% ), $kendo-chip-outline-text))
48
48
  );
49
49
  }
50
50
 
51
51
  &.k-selected {
52
52
  @include fill(
53
- $bg: k-try-tint( $color, 65% ),
54
- $color: if( $kendo-is-dark-theme, k-try-shade( $color, 50% ), $kendo-chip-outline-text)
53
+ $bg: if($kendo-enable-color-system, k-color( #{$name}-subtle-active ), k-try-tint( $color, 65% )),
54
+ $color: if($kendo-enable-color-system, $kendo-chip-outline-text, if( $kendo-is-dark-theme, k-try-shade( $color, 50% ), $kendo-chip-outline-text))
55
55
  );
56
56
  }
57
57
  } @else {
58
58
  @include fill(
59
- $color: k-try-shade( $color, 50% )
59
+ $color: if($kendo-enable-color-system, k-color( #{$name}-on-surface ), k-try-shade( $color, 50% ))
60
60
  );
61
61
 
62
62
  &:focus,
63
63
  &.k-focus {
64
64
  @include box-shadow( none );
65
- @include fill( $bg: k-try-tint( $color, 65% ) );
65
+ @include fill(
66
+ $bg: if($kendo-enable-color-system, k-color( #{$name}-subtle-active ), k-try-tint( $color, 65% )),
67
+ $color: if($kendo-enable-color-system, k-color( #{$name}-on-subtle ), k-try-shade( $color, 50% ))
68
+ );
66
69
  }
67
70
 
68
71
  &:hover,
69
72
  &.k-hover {
70
73
  @include fill(
71
- $bg: k-try-tint( $color, 80% ),
72
- $color: k-try-shade( $color, 50% )
74
+ $bg: if($kendo-enable-color-system, k-color( #{$name}-subtle-hover ), k-try-tint( $color, 80% )),
75
+ $color: if($kendo-enable-color-system, k-color( #{$name}-on-subtle ), k-try-shade( $color, 50% ))
73
76
  );
74
77
  }
75
78
 
76
79
  &.k-selected {
77
80
  @include fill(
78
- $bg: k-try-tint( $color, 65% ),
79
- $color: k-try-shade( $color, 50% )
81
+ $bg: if($kendo-enable-color-system, k-color( #{$name}-subtle-active ), k-try-tint( $color, 65% )),
82
+ $color: if($kendo-enable-color-system, k-color( #{$name}-on-subtle ), k-try-shade( $color, 50% ))
80
83
  );
81
84
  }
82
85
  }
@@ -92,7 +92,7 @@ $kendo-chip-sizes: (
92
92
 
93
93
  /// The base background of the Chip.
94
94
  /// @group chip
95
- $kendo-chip-base-bg: if( $kendo-is-dark-theme, $kendo-color-white, $kendo-color-black) !default;
95
+ $kendo-chip-base-bg: if($kendo-enable-color-system, k-color( base-subtle ), if( $kendo-is-dark-theme, $kendo-color-white, $kendo-color-black)) !default;
96
96
 
97
97
  /// The theme colors map for the Chip.
98
98
  /// @group chip
@@ -106,7 +106,7 @@ $kendo-chip-theme-colors: (
106
106
 
107
107
  /// The base background color of the solid Chip.
108
108
  /// @group chip
109
- $kendo-chip-solid-bg: if( $kendo-is-dark-theme, $kendo-button-bg, k-try-tint( $kendo-chip-base-bg, 92% )) !default;
109
+ $kendo-chip-solid-bg: if($kendo-enable-color-system, k-color( base-subtle ), if( $kendo-is-dark-theme, $kendo-button-bg, k-try-tint( $kendo-chip-base-bg, 92% ))) !default;
110
110
  /// The base text color of the solid Chip.
111
111
  /// @group chip
112
112
  $kendo-chip-solid-text: $kendo-button-text !default;
@@ -122,21 +122,21 @@ $kendo-chip-solid-gradient: $kendo-button-gradient !default;
122
122
 
123
123
  /// The base background color of the focused solid Chip.
124
124
  /// @group chip
125
- $kendo-chip-solid-focus-bg: k-try-tint( $kendo-chip-base-bg, 80% ) !default;
125
+ $kendo-chip-solid-focus-bg: if($kendo-enable-color-system, k-color( base-subtle-active ), k-try-tint( $kendo-chip-base-bg, 80% )) !default;
126
126
  /// The base text color of the focused solid Chip.
127
127
  /// @group chip
128
128
  $kendo-chip-solid-focus-text: null !default;
129
129
 
130
130
  /// The base background color of the hovered solid Chip.
131
131
  /// @group chip
132
- $kendo-chip-solid-hover-bg: k-try-tint( $kendo-chip-base-bg, 84% ) !default;
132
+ $kendo-chip-solid-hover-bg: if($kendo-enable-color-system, k-color( base-subtle-hover ), k-try-tint( $kendo-chip-base-bg, 84% )) !default;
133
133
  /// The base text color of the hovered solid Chip.
134
134
  /// @group chip
135
135
  $kendo-chip-solid-hover-text: null !default;
136
136
 
137
137
  /// The base background color of the selected solid Chip.
138
138
  /// @group chip
139
- $kendo-chip-solid-selected-bg: k-try-tint( $kendo-chip-base-bg, 76% ) !default;
139
+ $kendo-chip-solid-selected-bg: if($kendo-enable-color-system, k-color( base-subtle-active ), k-try-tint( $kendo-chip-base-bg, 76% )) !default;
140
140
  /// The base text color of the selected solid Chip.
141
141
  /// @group chip
142
142
  $kendo-chip-solid-selected-text: null !default;
@@ -156,14 +156,14 @@ $kendo-chip-outline-shadow: null !default;
156
156
 
157
157
  /// The base background color of the hovered outline Chip.
158
158
  /// @group chip
159
- $kendo-chip-outline-hover-bg: k-try-tint( $kendo-chip-base-bg, 92% ) !default;
159
+ $kendo-chip-outline-hover-bg: if($kendo-enable-color-system, k-color( base-subtle-hover ), k-try-tint( $kendo-chip-base-bg, 92% )) !default;
160
160
  /// The base text color of the hovered outline Chip.
161
161
  /// @group chip
162
- $kendo-chip-outline-hover-text: k-contrast-color( $kendo-chip-outline-hover-bg ) !default;
162
+ $kendo-chip-outline-hover-text: if($kendo-enable-color-system, k-color( base-on-subtle ), k-contrast-color( $kendo-chip-outline-hover-bg )) !default;
163
163
 
164
164
  /// The base background color of the selected outline Chip.
165
165
  /// @group chip
166
- $kendo-chip-outline-selected-bg: k-try-tint( $kendo-chip-base-bg, 84% ) !default;
166
+ $kendo-chip-outline-selected-bg: if($kendo-enable-color-system, k-color( base-subtle-active ), k-try-tint( $kendo-chip-base-bg, 84% )) !default;
167
167
  /// The base text color of the selected outline Chip.
168
168
  /// @group chip
169
169
  $kendo-chip-outline-selected-text: $kendo-chip-outline-hover-text !default;
@@ -1,7 +1,7 @@
1
1
  $wcag-min-contrast-ratio: 4.5 !default;
2
2
 
3
3
  // Color system
4
- @import "./color-system/index.import.scss";
4
+ @import "./color-system/_swatch.scss";
5
5
 
6
6
  // Elevation
7
7
  @import "./elevation/index.import.scss";
@@ -11,6 +11,9 @@ $wcag-min-contrast-ratio: 4.5 !default;
11
11
 
12
12
  @import "@progress/kendo-theme-core/scss/index.import.scss";
13
13
 
14
+ // Backward compatibility
15
+ @import "./color-system/_swatch-legacy.scss";
16
+
14
17
  // Expose
15
18
  @include exports("kendo-core-styles") {
16
19
  @include kendo-core--styles();
@@ -0,0 +1,101 @@
1
+ @import "./_palettes-legacy.scss";
2
+
3
+ @function get-base-palette($name) {
4
+ @return k-map-get($palettes, $name);
5
+ }
6
+
7
+ @function get-base-hue($palette, $hue) {
8
+ @return k-map-get(get-base-palette($palette), $hue);
9
+ }
10
+
11
+ @function get-base-contrast($palette, $hue) {
12
+ @return k-map-get(k-map-get(get-base-palette($palette), contrast), $hue);
13
+ }
14
+
15
+ // For a given hue in a palette, return the contrast color from the map of contrast palettes.
16
+ @function material-contrast($palette, $hue) {
17
+ @return k-map-get(k-map-get($palette, contrast), $hue);
18
+ }
19
+
20
+ // Creates a map of hues to colors for a theme. This is used to define a theme palette in terms
21
+ // of the Material Design hues.
22
+ @function material-palette($base-palette, $main: 500, $lighter: 300, $darker: 700, $adjust-contrast: true) {
23
+ @if not(k-meta-type-of($base-palette) == map) {
24
+ $base-palette: get-base-palette($base-palette);
25
+ }
26
+
27
+ $main-contrast: material-contrast($base-palette, $main);
28
+
29
+ @if ($adjust-contrast == true) {
30
+ @if ($theme-type == dark) and ($main-contrast == $light-primary-text) {
31
+ $main: 200;
32
+ $lighter: 100;
33
+ $darker: 300;
34
+ }
35
+
36
+ @if ($theme-type == light) and ($main-contrast == $dark-primary-text) {
37
+ $main: 800;
38
+ $lighter: 700;
39
+ $darker: 900;
40
+ }
41
+ }
42
+
43
+ // stylelint-disable-next-line function-comma-newline-after
44
+ $result: k-map-merge(
45
+ $base-palette,
46
+ (
47
+ main: k-map-get($base-palette, $main),
48
+ lighter: k-map-get($base-palette, $lighter),
49
+ darker: k-map-get($base-palette, $darker),
50
+ main-contrast: material-contrast($base-palette, $main),
51
+ lighter-contrast: material-contrast($base-palette, $lighter),
52
+ darker-contrast: material-contrast($base-palette, $darker),
53
+ )
54
+ );
55
+
56
+ // For each hue in the palette, add a "-contrast" color to the map.
57
+ @each $hue, $color in $base-palette {
58
+ // stylelint-disable-next-line function-comma-newline-after
59
+ $result: k-map-merge(
60
+ $result,
61
+ (
62
+ "#{$hue}-contrast": material-contrast($base-palette, $hue),
63
+ )
64
+ );
65
+ }
66
+
67
+ @return $result;
68
+ }
69
+
70
+ // Gets a color from a theme palette (the output of material-palette).
71
+ // The hue can be one of the standard values (500, A400, etc.), one of the three preconfigured
72
+ // hues (main, lighter, darker), or any of the aforementioned prefixed with "-contrast".
73
+ @function material-color($palette, $hue: main, $opacity: null) {
74
+ @if not(k-meta-type-of($palette) == map) {
75
+ $palette: get-base-palette($palette);
76
+ }
77
+
78
+ // If hueKey is a number between zero and one, then it actually contains an
79
+ // opacity value, so recall this function with the default hue and that given opacity.
80
+ @if k-meta-type-of($hue) == number and $hue >= 0 and $hue <= 1 {
81
+ @return material-color($palette, main, $hue);
82
+ }
83
+
84
+ $color: k-map-get($palette, $hue);
85
+ $opacity: if($opacity == null, k-color-alpha($color), $opacity);
86
+
87
+ @return rgba($color, $opacity);
88
+ }
89
+
90
+ // Creates a container object for a light theme to be given to individual component theme mixins.
91
+ @function material-theme($kendo-color-primary, $kendo-color-secondary, $theme-type, $warn: material-palette(red)) {
92
+ $complimentary: if($theme-type == dark, $material-dark-complimentary, $material-light-complimentary);
93
+ @return k-map-merge(
94
+ (
95
+ primary: $kendo-color-primary,
96
+ secondary: $kendo-color-secondary,
97
+ warn: $warn,
98
+ ),
99
+ $complimentary
100
+ );
101
+ }