|
| 1 | +//// |
| 2 | +/// @group themes |
| 3 | +/// @access public |
| 4 | +/// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a> |
| 5 | +/// @author <a href="https://github.com/desig9stein" target="_blank">Marin Popov</a> |
| 6 | +//// |
| 7 | + |
| 8 | +/// If only background color is specified, text/icon color will be assigned automatically to a contrasting color. |
| 9 | +/// @param {Map} $palette [$default-palette] - The palette used as basis for styling the component. |
| 10 | +/// @param {Map} $schema [$light-schema] - The schema used as basis for styling the component. |
| 11 | +/// |
| 12 | +/// @param {Color} $accent-color [null] - Sets the pinned header background color, the joystick background and border colors, as well as the context menu background color. |
| 13 | +/// @param {Color} $active-color [null] - Sets the active text and border colors for tabs, panes, and menus. |
| 14 | +/// @param {Color} $border-color [null] - Sets the global border color in the dock manager. Also sets the pane content background and the context menu active background colors. |
| 15 | +/// @param {Color} $button-text [null] - Sets the button text color. |
| 16 | +/// @param {Color} $context-menu-background [null] - Sets the background color for context menus. |
| 17 | +/// @param {Color} $context-menu-background-active [null] - Sets the background color for active context menus. |
| 18 | +/// @param {Color} $context-menu-color [null] - Sets the text color for context menus. |
| 19 | +/// @param {Color} $context-menu-color-active [null] - Sets the text color for active context menus. |
| 20 | +/// @param {Color} $dock-background [null] - Sets the background color of the dock manager. |
| 21 | +/// @param {Color} $dock-text [null] - Sets the text color of the dock manager. |
| 22 | +/// @param {Color} $floating-pane-border-color [null] - Sets the border color for floating panes. |
| 23 | +/// @param {Color} $flyout-shadow-color [null] - Sets the flyout shadow color. |
| 24 | +/// @param {Color} $joystick-background [null] - Sets the background color of the joystick. |
| 25 | +/// @param {Color} $joystick-background-active [null] - Sets the background color of the joysticks. |
| 26 | +/// @param {Color} $joystick-border-color [null] - Sets the border color of the joystick. |
| 27 | +/// @param {Color} $joystick-icon-color [null] - Sets the color for the joystick icons. |
| 28 | +/// @param {Color} $joystick-icon-color-active [null] - Sets the color of the active joystick icons. |
| 29 | +/// @param {Color} $pane-content-background [null] - Sets the background color of the content panes. |
| 30 | +/// @param {Color} $pane-content-text [null] - Sets the text color of the content panes. |
| 31 | +/// @param {Color} $pane-header-background [null] - Sets the background color for pane headers. |
| 32 | +/// @param {Color} $pane-header-text [null] - Sets the text color for pane headers. |
| 33 | +/// @param {Color} $pinned-header-background [null] - Sets the background colors of pinned headers. |
| 34 | +/// @param {Color} $pinned-header-text [null] - Sets the text colors of pinned headers. |
| 35 | +/// @param {Color} $background-color [null] - Sets the base dock manager color as well as the pane headers and tabs background colors. |
| 36 | +/// @param {Color} $splitter-background [null] - Sets the background color for the splitters. |
| 37 | +/// @param {Color} $splitter-handle [null] - Sets the background color for the splitter handles. |
| 38 | +/// @param {Color} $tab-background [null] - Sets the background color for tabs. |
| 39 | +/// @param {Color} $tab-background-active [null] - Sets the background color for active tabs. |
| 40 | +/// @param {Color} $tab-border-color [null] - Sets the border color for tabs. |
| 41 | +/// @param {Color} $tab-border-color-active [null] - Sets the border color for active tabs. |
| 42 | +/// @param {Color} $tab-text [null] - Sets the text color for tabs. |
| 43 | +/// @param {Color} $tab-text-active [null] - Sets the text color for active tabs. |
| 44 | +/// @param {Color} $text-color [null] - Sets the text color for most elements in the dock manager. Used as the default joystick icon color. |
| 45 | +/// @requires $default-palette |
| 46 | +/// @requires $light-schema |
| 47 | +/// @requires apply-palette |
| 48 | +/// @requires text-contrast |
| 49 | +/// @requires extend |
| 50 | +/// |
| 51 | +/// @example scss Change the background and icon colors in icon dock-managers |
| 52 | +/// $my-dock-manager-theme: igc-dock-manager-theme(); |
| 53 | +/// // Pass the theme to the igc-dock-manager component mixin |
| 54 | +/// @include igx-css-vars($my-dock-manager-theme); |
| 55 | +@function igc-dock-manager-theme( |
| 56 | + $palette: $default-palette, |
| 57 | + $schema: $light-schema, |
| 58 | + $rest... |
| 59 | +) { |
| 60 | + $name: 'igc-dock-manager'; |
| 61 | + $dock-manager-schema: (); |
| 62 | + |
| 63 | + @if map-has-key($schema, $name) { |
| 64 | + $dock-manager-schema: map-get($schema, $name); |
| 65 | + } @else { |
| 66 | + $dock-manager-schema: $schema; |
| 67 | + } |
| 68 | + |
| 69 | + $theme: apply-palette($dock-manager-schema, $palette); |
| 70 | + |
| 71 | + @return extend($theme, (name: 'igc'), keywords($rest)); |
| 72 | +} |
| 73 | + |
| 74 | + |
| 75 | +/// Adds typography styles for the dock manager component. |
| 76 | +/// @access private |
| 77 | +/// @group typography |
| 78 | +/// @requires {mixin} igx-type-style |
| 79 | +@mixin igx-dock-manager-typography() { |
| 80 | + $scope: if(is-root(), ':root', '&'); |
| 81 | + |
| 82 | + #{$scope} { |
| 83 | + @include css-vars-from-theme((font-family: inherit), 'igc'); |
| 84 | + } |
| 85 | +} |
| 86 | + |
0 commit comments