-
Notifications
You must be signed in to change notification settings - Fork 9
feat(logo): integrate sizes and related pulse as an option for headlines #570
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
mfranzke
merged 19 commits into
main
from
568-featlogo-integrate-sizes-and-related-pulse-as-an-option-for-headlines
Feb 8, 2023
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
0c56e78
refactor: added pulse property
mfranzke c85e8f6
chore: regenerated package-lock.json
mfranzke 9618173
feat: added logo element
mfranzke fb4cdcd
Merge branch 'main' into 568-featlogo-integrate-sizes-and-related-pul…
mfranzke 4b79c96
Merge branch 'main' into 568-featlogo-integrate-sizes-and-related-pul…
mfranzke 9582c2b
Merge branch 'main' into 568-featlogo-integrate-sizes-and-related-pul…
mfranzke cce1b36
Merge branch 'main' into 568-featlogo-integrate-sizes-and-related-pul…
mfranzke 958622d
Merge branch 'main' into 568-featlogo-integrate-sizes-and-related-pul…
mfranzke b2654a2
Merge branch 'main' into 568-featlogo-integrate-sizes-and-related-pul…
mfranzke 81f1e9d
fix: we obviously even also need to import those components
mfranzke dedada5
Merge branch 'main' into 568-featlogo-integrate-sizes-and-related-pul…
mfranzke db47dd0
Merge branch '568-featlogo-integrate-sizes-and-related-pulse-as-an-op…
mfranzke cabf7e4
fix: adapted testcase
mfranzke ed9302f
fix: missing return
mfranzke e6ffa64
Merge branch 'main' into 568-featlogo-integrate-sizes-and-related-pul…
mfranzke 47ac3fe
test: added cypress test
mfranzke b44d75b
docs: added logo to Angular showcase
mfranzke 39ff67c
Merge branch 'main' into 568-featlogo-integrate-sizes-and-related-pul…
mfranzke 61aff55
Update OtherElements.vue
mfranzke 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| context('db-logo', () => { | ||
| beforeEach(() => { | ||
| cy.visit('/iframe.html?id=04-data-display-logo-intro--page&viewMode=story'); | ||
| }); | ||
|
|
||
| it('db-logo - snapshot', () => { | ||
| cy.snap('db-logo', 0.2); | ||
| }); | ||
| it('logos should have the right class and aria-hidden attribute', function () { | ||
| cy.get('db-logo svg') | ||
| .first() | ||
| .should('have.class', 'elm-logo') | ||
| .invoke('attr', 'aria-hidden') | ||
| .should('eq', 'true'); | ||
| }); | ||
| }); |
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
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
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
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
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
16 changes: 16 additions & 0 deletions
16
packages/db-ui-elements-stencil/src/components/db-logo/db-logo.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,16 @@ | ||
| @import '../general'; | ||
| @import 'logo'; | ||
|
|
||
| .elm-logo { | ||
| rect { | ||
| fill: transparent; | ||
| /* stylelint-disable custom-property-pattern */ | ||
| fill: var(--db-logo-backgroundColor, transparent); | ||
| /* stylelint-enable custom-property-pattern */ | ||
| } | ||
|
|
||
| path { | ||
| fill: #f01414; | ||
| fill: var(--db-logo-color, #f01414); | ||
| } | ||
| } |
31 changes: 31 additions & 0 deletions
31
packages/db-ui-elements-stencil/src/components/db-logo/db-logo.tsx
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,31 @@ | ||
| import { Component, h, Prop } from '@stencil/core'; | ||
|
|
||
| @Component({ | ||
| tag: 'db-logo', | ||
| styleUrl: 'db-logo.scss' | ||
| }) | ||
| export class DbLogo { | ||
| /** | ||
| * The size attribute specifies the size of the logo. | ||
| */ | ||
| @Prop() size: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' = 'xlarge'; | ||
|
|
||
| render() { | ||
| return ( | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
| viewBox="0 0 40 28" | ||
| id="logo" | ||
| aria-hidden="true" | ||
| class="elm-logo" | ||
| data-size={this.size} | ||
| > | ||
| <rect x="2" y="2" width="36" height="24" fill="transparent"></rect> | ||
| <path | ||
| d="M27.2 7.53h-1.43v4.54h1.83c1.53.03 2.47-1.04 2.47-2.27 0-1.63-.96-2.32-2.87-2.27zm.6 7.8h-2.04v4.84h1.84c.7.01 3.07 0 3.07-2.37 0-1.01-.62-2.5-2.87-2.47zm-17.1-7.7h-.83v12.54h1.53c2.58.06 3.77-2.05 3.77-5.97 0-3.6-.41-6.74-4.47-6.57zm18.4-2.76c5.13.02 5.23 4.03 5.23 4.43a4.33 4.33 0 01-3.15 4.13v.14c3.26.79 3.75 3.14 3.75 4.43 0 4.76-4.68 5.02-6.71 5.03h-6.68V4.87h7.56zm-16.9 0c4.7.02 7.23 3.01 7.23 9.03 0 5.29-1.68 9.1-7.23 9.13H5.54V4.87h6.66zm23.7-1.94H4c-.63 0-1.04.5-1.06 1.05l-.01.12v19.7c0 .57.35 1.22.95 1.26l.12.01h31.9c.63 0 1.13-.6 1.16-1.14l.01-.13V4.1a1.2 1.2 0 00-1.17-1.17zm0-2.86c2.1 0 3.97 1.56 4.03 3.63v20.2a4 4 0 01-3.83 4.03H4A3.91 3.91 0 01.07 24.1V3.9A3.8 3.8 0 013.8.07h32.1z" | ||
| fill="#f01414" | ||
| ></path> | ||
| </svg> | ||
| ); | ||
| } | ||
| } |
17 changes: 17 additions & 0 deletions
17
packages/db-ui-elements-stencil/src/components/db-logo/readme.md
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,17 @@ | ||
| # db-logo | ||
|
|
||
|
|
||
|
|
||
| <!-- Auto Generated Below --> | ||
|
|
||
|
|
||
| ## Properties | ||
|
|
||
| | Property | Attribute | Description | Type | Default | | ||
| | -------- | --------- | -------------------------------------------------- | -------------------------------------------------------- | ---------- | | ||
| | `size` | `size` | The size attribute specifies the size of the logo. | `"large" \| "medium" \| "small" \| "xlarge" \| "xsmall"` | `'xlarge'` | | ||
|
|
||
|
|
||
| ---------------------------------------------- | ||
|
|
||
| *Built with [StencilJS](https://stenciljs.com/)* |
16 changes: 16 additions & 0 deletions
16
...db-ui-elements-stencil/src/components/db-logo/stories/db-logo.intro.stories.mdx
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,16 @@ | ||
| import { Meta, Canvas } from '@storybook/addon-docs'; | ||
| import Readme from './../readme.md'; | ||
|
|
||
| <Meta title="04-Data-Display/Logo/Intro" /> | ||
|
|
||
| <db-headline variant="1"><db-logo></db-headline> | ||
|
|
||
| <Canvas> | ||
| <db-logo size="xsmall"></db-logo> | ||
| <db-logo size="small"></db-logo> | ||
| <db-logo size="medium"></db-logo> | ||
| <db-logo size="large"></db-logo> | ||
| <db-logo></db-logo> | ||
| </Canvas> | ||
|
|
||
| <Readme /> |
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
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.