-
Notifications
You must be signed in to change notification settings - Fork 1
chore(themes): move leftover component themes from angular #477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8984ff0
chore(themes): move leftover component themmes from angular
didimmova fb63d00
chore(themes): change route to config
didimmova c980bc1
Merge branch 'master' into didimmova/move-leftover-themes
simeonoff c130ca5
feat(file-input): add conditional styles to file input theme
didimmova ebfba2e
chore(themes): add @package theming meta to themes
didimmova da43e3d
Merge branch 'master' into didimmova/move-leftover-themes
simeonoff 270f633
Merge branch 'master' into didimmova/move-leftover-themes
simeonoff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
sass/themes/components/action-strip/_action-strip-theme.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| @use 'sass:map'; | ||
| @use '../../config'; | ||
| @use '../../functions' as *; | ||
| @use '../../schemas/' as *; | ||
| @use '../../../utils/map' as *; | ||
| @use '../../../color/functions' as *; | ||
|
|
||
| //// | ||
| /// @group themes | ||
| /// @package theming | ||
| /// @access public | ||
| /// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a> | ||
| /// @author <a href="https://github.com/desig9stein" target="_blank">Marin Popov</a> | ||
| //// | ||
|
|
||
| /// If only background color is specified, text/icon color will be assigned automatically to a contrasting color. | ||
| /// @param {Map} $schema [$light-material-schema] - The schema used as basis for styling the component. | ||
| /// | ||
| /// @param {Color} $icon-color [null] - The color used for the actions icons. | ||
| /// @param {Color} $background [null] - The color used for the action strip component content background. | ||
| /// @param {Color} $actions-background [null] - The color used for the actions background. | ||
| /// @param {Color} $delete-action [null] - The color used for the delete icon in action strip component. | ||
| /// @param {List} $actions-border-radius [null] - The border radius used for actions container inside action strip component. | ||
| /// | ||
| /// @example scss Change the background and icon colors in action strip | ||
| /// $my-action-strip-theme: action-strip-theme($background: black); | ||
| /// // Pass the theme to the css-vars() mixin | ||
| /// @include css-vars($my-action-strip-theme); | ||
| @function action-strip-theme( | ||
| $schema: $light-material-schema, | ||
|
|
||
| $background: null, | ||
| $actions-background: null, | ||
| $icon-color: null, | ||
| $delete-action: null, | ||
| $actions-border-radius: null | ||
| ) { | ||
| $name: 'igx-action-strip'; | ||
| $action-strip-schema: (); | ||
|
|
||
| @if map.has-key($schema, 'action-strip') { | ||
| $action-strip-schema: map.get($schema, 'action-strip'); | ||
| } @else { | ||
| $action-strip-schema: $schema; | ||
| } | ||
|
|
||
| $theme: digest-schema($action-strip-schema); | ||
|
|
||
| @if not($icon-color) and $actions-background { | ||
| $icon-color: adaptive-contrast(var(--actions-background)); | ||
| } | ||
|
|
||
| @if not($actions-border-radius) { | ||
| $actions-border-radius: map.get($theme, 'actions-border-radius'); | ||
| } | ||
|
|
||
| @return extend( | ||
| $theme, | ||
| ( | ||
| name: $name, | ||
| background: $background, | ||
| actions-background: $actions-background, | ||
| icon-color: $icon-color, | ||
| delete-action: $delete-action, | ||
| actions-border-radius: $actions-border-radius, | ||
| ) | ||
| ); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| @forward 'grid-theme'; | ||
| @forward 'grid-summary-theme'; | ||
| @forward 'grid-toolbar-theme'; | ||
| @forward 'pivot-data-selector-theme'; |
36 changes: 36 additions & 0 deletions
36
sass/themes/components/grid/_pivot-data-selector-theme.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| @use 'sass:map'; | ||
| @use '../../config'; | ||
| @use '../../functions' as *; | ||
| @use '../../schemas/' as *; | ||
| @use '../../../utils/map' as *; | ||
| @use '../../../color/functions' as *; | ||
| @use '../../../elevations/' as *; | ||
|
|
||
| //// | ||
| /// @group themes | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing |
||
| /// @package theming | ||
| /// @access public | ||
| /// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a> | ||
| //// | ||
|
|
||
| /// @param {Map} $schema [$light-material-schema] - The schema used as basis for styling the component. | ||
| @function pivot-data-selector-theme($schema: $light-material-schema, $background: null) { | ||
| $name: 'igx-pivot-data-selector'; | ||
| $selector: '.igx-pivot-data-selector'; | ||
| $pivot-data-selector-schema: (); | ||
|
|
||
| @if map.has-key($schema, 'pivot-data-selector') { | ||
| $pivot-data-selector-schema: map.get($schema, 'pivot-data-selector'); | ||
| } @else { | ||
| $pivot-data-selector-schema: $schema; | ||
| } | ||
|
|
||
| $theme: digest-schema($pivot-data-selector-schema); | ||
|
|
||
| @return extend( | ||
| $theme, | ||
| ( | ||
| name: $name, | ||
| ) | ||
| ); | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,150 @@ | ||
| @use 'sass:map'; | ||
| @use '../../config'; | ||
| @use '../../functions' as *; | ||
| @use '../../schemas/' as *; | ||
| @use '../../../utils/map' as *; | ||
| @use '../../../color/functions' as *; | ||
| @use '../../../elevations/' as *; | ||
|
|
||
| //// | ||
| /// @group themes | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing |
||
| /// @package theming | ||
| /// @access public | ||
| //// | ||
|
|
||
| /// @param {Map} $schema [$light-material-schema] - The schema used as basis for styling the component. | ||
| /// @param {Color} $file-names-background [null] - The file names container background color. | ||
| /// @param {Color} $file-names-background--focused [null] - The file names container background color when the file input is focused. | ||
| /// @param {Color} $file-names-background--filled [null] - The file names container background color when the file input is filled. | ||
| /// @param {Color} $file-names-background--disabled [null] - The file names container background color when the file input is disabled. | ||
| /// @param {Color} $file-names-foreground [null] - The file names color. | ||
| /// @param {Color} $file-names-foreground--focused [null] - The file names color when the file input is focused. | ||
| /// @param {Color} $file-names-foreground--filled [null] - The file names color when the file input is filled. | ||
| /// @param {Color} $file-names-foreground--disabled [null] - The file names color when the file input is disabled. | ||
| /// @param {Color} $file-selector-button-background [null] - The file input selector button background color. | ||
| /// @param {Color} $file-selector-button-background--focused [null] - The selector button background color when the file input is focused. | ||
| /// @param {Color} $file-selector-button-background--filled [null] - The selector button background color when the file input is filled. | ||
| /// @param {Color} $file-selector-button-background--disabled [null] - The selector button background color when the file input is disabled. | ||
| /// @param {Color} $file-selector-button-foreground [null] - The file input selector button foreground color. | ||
| /// @param {Color} $file-selector-button-foreground--focused [null] - The selector button foreground color when the file input is focused. | ||
| /// @param {Color} $file-selector-button-foreground--filled [null] - The selector button foreground color when the file input is filled. | ||
| /// @param {Color} $file-selector-button-foreground--disabled [null] - The selector button foreground color when the file input is disabled. | ||
| /// @example scss Change the focused border and label colors | ||
| /// $my-file-input-theme: file-input-theme($file-names-foreground: #09f); | ||
| /// // Pass the theme to the css-vars() mixin | ||
| /// @include css-vars($my-file-input-theme); | ||
| @function file-input-theme( | ||
| $schema: $light-material-schema, | ||
| $file-names-background: null, | ||
| $file-names-background--focused: null, | ||
| $file-names-background--filled: null, | ||
| $file-names-background--disabled: null, | ||
| $file-names-foreground: null, | ||
| $file-names-foreground--focused: null, | ||
| $file-names-foreground--filled: null, | ||
| $file-names-foreground--disabled: null, | ||
|
|
||
| $file-selector-button-background: null, | ||
| $file-selector-button-background--focused: null, | ||
| $file-selector-button-background--filled: null, | ||
| $file-selector-button-background--disabled: null, | ||
| $file-selector-button-foreground: null, | ||
| $file-selector-button-foreground--focused: null, | ||
| $file-selector-button-foreground--filled: null, | ||
| $file-selector-button-foreground--disabled: null | ||
| ) { | ||
| $name: 'igx-file-input'; | ||
| $file-input-schema: (); | ||
|
|
||
| @if map.has-key($schema, 'file-input') { | ||
| $file-input-schema: map.get($schema, 'file-input'); | ||
| } @else { | ||
| $file-input-schema: $schema; | ||
| } | ||
|
|
||
| $theme: digest-schema($file-input-schema); | ||
|
|
||
| @if $file-names-background != transparent { | ||
| @if not($file-names-background--focused) and $file-names-background { | ||
| $file-names-background--focused: dynamic-shade(var(--file-names-background)); | ||
| } | ||
|
|
||
| @if not($file-names-background--filled) and $file-names-background { | ||
| $file-names-background--filled: $file-names-background; | ||
| } | ||
|
|
||
| @if not($file-names-background--disabled) and $file-names-background { | ||
| $file-names-background--disabled: hsla(from $file-names-background h s l / 0.4); | ||
| } | ||
|
|
||
| @if not($file-names-foreground) and $file-names-background { | ||
| $file-names-foreground: adaptive-contrast($file-names-background); | ||
| } | ||
|
|
||
| @if not($file-names-foreground--focused) and $file-names-background--focused { | ||
| $file-names-foreground--focused: adaptive-contrast($file-names-background--focused); | ||
| } | ||
|
|
||
| @if not($file-names-foreground--filled) and $file-names-background--filled { | ||
| $file-names-foreground--filled: adaptive-contrast($file-names-background--filled); | ||
| } | ||
|
|
||
| @if not($file-names-foreground--disabled) and $file-names-background--disabled { | ||
| $file-names-foreground--disabled: adaptive-contrast($file-names-background--disabled); | ||
| } | ||
| } | ||
|
|
||
| @if $file-selector-button-background != transparent { | ||
| @if not($file-selector-button-background--focused) and $file-selector-button-background { | ||
| $file-selector-button-background--focused: dynamic-shade(var(--file-selector-button-background)); | ||
| } | ||
|
|
||
| @if not($file-selector-button-background--filled) and $file-selector-button-background { | ||
| $file-selector-button-background--filled: $file-selector-button-background; | ||
| } | ||
|
|
||
| @if not($file-selector-button-background--disabled) and $file-selector-button-background { | ||
| $file-selector-button-background--disabled: hsla(from $file-selector-button-background h s l / 0.4); | ||
| } | ||
|
|
||
| @if not($file-selector-button-foreground) and $file-selector-button-background { | ||
| $file-selector-button-foreground: adaptive-contrast($file-selector-button-background); | ||
| } | ||
|
|
||
| @if not($file-selector-button-foreground--focused) and $file-selector-button-background--focused { | ||
| $file-selector-button-foreground--focused: adaptive-contrast($file-selector-button-background--focused); | ||
| } | ||
|
|
||
| @if not($file-selector-button-foreground--filled) and $file-selector-button-background--filled { | ||
| $file-selector-button-foreground--filled: adaptive-contrast($file-selector-button-background--filled); | ||
| } | ||
|
|
||
| @if not($file-selector-button-foreground--disabled) and $file-selector-button-background--disabled { | ||
| $file-selector-button-foreground--disabled: adaptive-contrast($file-selector-button-background--disabled); | ||
| } | ||
| } | ||
|
|
||
| @return extend( | ||
| $theme, | ||
| ( | ||
| name: $name, | ||
| file-names-background: $file-names-background, | ||
| file-names-background--focused: $file-names-background--focused, | ||
| file-names-background--filled: $file-names-background--filled, | ||
| file-names-background--disabled: $file-names-background--disabled, | ||
| file-names-foreground: $file-names-foreground, | ||
| file-names-foreground--focused: $file-names-foreground--focused, | ||
| file-names-foreground--filled: $file-names-foreground--filled, | ||
| file-names-foreground--disabled: $file-names-foreground--disabled, | ||
|
|
||
| file-selector-button-background: $file-selector-button-background, | ||
| file-selector-button-background--focused: $file-selector-button-background--focused, | ||
| file-selector-button-background--filled: $file-selector-button-background--filled, | ||
| file-selector-button-background--disabled: $file-selector-button-background--disabled, | ||
| file-selector-button-foreground: $file-selector-button-foreground, | ||
| file-selector-button-foreground--focused: $file-selector-button-foreground--focused, | ||
| file-selector-button-foreground--filled: $file-selector-button-foreground--filled, | ||
| file-selector-button-foreground--disabled: $file-selector-button-foreground--disabled, | ||
| ) | ||
| ); | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing
@package theming.