_suggestion-chip-theme.scss 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. //
  2. // Copyright 2021 Google Inc.
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to deal
  6. // in the Software without restriction, including without limitation the rights
  7. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. // copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. // THE SOFTWARE.
  21. //
  22. @use 'sass:map';
  23. @use '@material/theme/theme';
  24. @use '@material/theme/keys';
  25. @use '@material/tokens/resolvers';
  26. @use './chip-theme';
  27. $_light-theme: (
  28. container-shape: null,
  29. container-height: null,
  30. flat-container-elevation: null,
  31. flat-outline-color: null,
  32. flat-outline-width: null,
  33. elevated-container-elevation: null,
  34. elevated-container-color: null,
  35. elevated-container-shadow-color: null,
  36. label-text-font: null,
  37. label-text-line-height: null,
  38. label-text-size: null,
  39. label-text-weight: null,
  40. label-text-tracking: null,
  41. label-text-type: null,
  42. label-text-color: null,
  43. flat-disabled-outline-color: null,
  44. flat-disabled-outline-opacity: null,
  45. disabled-label-text-color: null,
  46. disabled-label-text-opacity: null,
  47. elevated-disabled-container-elevation: null,
  48. elevated-disabled-container-color: null,
  49. elevated-disabled-container-opacity: null,
  50. hover-state-layer-color: null,
  51. hover-state-layer-opacity: null,
  52. hover-label-text-color: null,
  53. elevated-hover-container-elevation: null,
  54. focus-state-layer-color: null,
  55. focus-state-layer-opacity: null,
  56. focus-label-text-color: null,
  57. flat-focus-outline-color: null,
  58. elevated-focus-container-elevation: null,
  59. pressed-state-layer-color: null,
  60. pressed-state-layer-opacity: null,
  61. pressed-label-text-color: null,
  62. elevated-pressed-container-elevation: null,
  63. container-surface-tint-layer-color: null,
  64. with-leading-icon-disabled-leading-icon-color: null,
  65. with-leading-icon-disabled-leading-icon-opacity: null,
  66. with-leading-icon-focus-leading-icon-color: null,
  67. with-leading-icon-hover-leading-icon-color: null,
  68. with-leading-icon-leading-icon-color: null,
  69. with-leading-icon-leading-icon-size: null,
  70. with-leading-icon-pressed-leading-icon-color: null,
  71. );
  72. $_custom-property-prefix: 'suggestion-chip';
  73. @mixin theme($theme, $resolvers: resolvers.$material) {
  74. @include theme.validate-theme($_light-theme, $theme);
  75. $theme: chip-theme.resolve-theme($theme, $resolvers: $resolvers);
  76. @include keys.declare-custom-properties(
  77. $theme,
  78. $prefix: $_custom-property-prefix
  79. );
  80. }
  81. @mixin theme-styles($theme, $resolvers: resolvers.$material) {
  82. @include theme.validate-theme-styles($_light-theme, $theme);
  83. $theme: keys.create-theme-properties(
  84. $theme,
  85. $prefix: $_custom-property-prefix
  86. );
  87. @include chip-theme.theme-styles($theme, $resolvers: $resolvers);
  88. }