-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into accordion-fixes
- Loading branch information
Showing
22 changed files
with
483 additions
and
132 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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,5 +1,7 @@ | ||
|
||
import {defineCustomElements} from '../loader'; | ||
|
||
|
||
defineCustomElements(); | ||
|
||
export const parameters = { | ||
|
This file contains 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 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,97 +1,90 @@ | ||
@use "~@infineon/design-system-tokens/dist/tokens"; | ||
@use "../../global/font.scss"; | ||
|
||
|
||
.alert-text { | ||
font-size: 16px; | ||
width: 100%; | ||
padding: 12px 0px 12px 12px; | ||
color: tokens.$color-text-black; | ||
|
||
white-space: pre-wrap; | ||
/* wraps text at spaces and within words */ | ||
word-wrap: break-word; | ||
/* breaks text within a word if necessary */ | ||
overflow-wrap: anywhere; | ||
/* breaks text at arbitrary points when needed */ | ||
} | ||
|
||
.icon-wrapper { | ||
position: relative; | ||
min-width: 48px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background-color: tokens.$color-default-500; | ||
} | ||
|
||
.close-icon-wrapper { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
min-width: 40px; | ||
|
||
|
||
& a { | ||
line-height: 0; | ||
color: tokens.$color-text-black; | ||
|
||
} | ||
} | ||
|
||
.alert { | ||
display: flex; | ||
border: 1px solid tokens.$color-default-500; | ||
border-radius: 1px; | ||
color: tokens.$color-text-black; | ||
background-color: tokens.$color-bg-white; | ||
} | ||
|
||
.alert-primary { | ||
border: 1px solid tokens.$color-default-500; | ||
& .close-icon-wrapper { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
min-width: 40px; | ||
|
||
& a { | ||
line-height: 0; | ||
color: tokens.$color-text-black; | ||
} | ||
} | ||
|
||
& .icon-wrapper { | ||
position: relative; | ||
min-width: 48px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background-color: tokens.$color-default-500; | ||
color: tokens.$color-text-white; | ||
} | ||
} | ||
|
||
.alert-secondary { | ||
border: 1px solid tokens.$color-highlight-500; | ||
& .alert-text { | ||
font-size: 16px; | ||
width: 100%; | ||
padding: 12px 0px 12px 12px; | ||
color: tokens.$color-text-black; | ||
|
||
white-space: pre-wrap; | ||
/* wraps text at spaces and within words */ | ||
word-wrap: break-word; | ||
/* breaks text within a word if necessary */ | ||
overflow-wrap: anywhere; | ||
/* breaks text at arbitrary points when needed */ | ||
} | ||
|
||
& .icon-wrapper { | ||
background-color: tokens.$color-highlight-500; | ||
color: tokens.$color-text-white; | ||
&.primary { | ||
border: 1px solid tokens.$color-default-500; | ||
|
||
& .icon-wrapper { | ||
background-color: tokens.$color-default-500; | ||
color: tokens.$color-text-white; | ||
} | ||
} | ||
} | ||
|
||
.alert-success { | ||
border: 1px solid tokens.$color-success-500; | ||
&.secondary { | ||
border: 1px solid tokens.$color-highlight-500; | ||
|
||
& .icon-wrapper { | ||
background-color: tokens.$color-success-500; | ||
color: tokens.$color-text-white; | ||
& .icon-wrapper { | ||
background-color: tokens.$color-highlight-500; | ||
color: tokens.$color-text-white; | ||
} | ||
} | ||
} | ||
|
||
.alert-danger { | ||
border: 1px solid tokens.$color-danger-500; | ||
&.success { | ||
border: 1px solid tokens.$color-success-500; | ||
|
||
& .icon-wrapper { | ||
background-color: tokens.$color-danger-500; | ||
color: tokens.$color-text-white; | ||
& .icon-wrapper { | ||
background-color: tokens.$color-success-500; | ||
color: tokens.$color-text-white; | ||
} | ||
} | ||
} | ||
|
||
.alert-warning { | ||
border: 1px solid tokens.$color-warning-500; | ||
&.danger { | ||
border: 1px solid tokens.$color-danger-500; | ||
|
||
& .icon-wrapper { | ||
background-color: tokens.$color-danger-500; | ||
color: tokens.$color-text-white; | ||
} | ||
} | ||
|
||
& .icon-wrapper { | ||
background-color: tokens.$color-warning-500; | ||
color: tokens.$color-text-white; | ||
&.warning { | ||
border: 1px solid tokens.$color-warning-500; | ||
|
||
& .icon-wrapper { | ||
background-color: tokens.$color-warning-500; | ||
color: tokens.$color-text-white; | ||
} | ||
} | ||
} | ||
|
||
// ifx-icon:empty { | ||
// display: none; | ||
// } |
This file contains 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 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
44 changes: 44 additions & 0 deletions
44
packages/components/src/components/breadcrumb/breadcrumb-item-label.scss
This file contains 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,44 @@ | ||
@use "../../../node_modules/@infineon/design-system-tokens/dist/tokens"; | ||
|
||
.breadcrumb-item-label-container { | ||
display: flex; | ||
align-items: center; | ||
gap: 8px; | ||
text-decoration: none; | ||
color: tokens.$color-text-black; | ||
|
||
&.margin { | ||
margin-left: 16px; | ||
} | ||
|
||
& ifx-icon:empty { | ||
display: none; | ||
} | ||
|
||
& .label-icon-wrapper { | ||
display: inline-flex; | ||
} | ||
|
||
& .menu-icon-wrapper { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 16px; | ||
height: 16px; | ||
|
||
&.hide { | ||
display: none; | ||
} | ||
|
||
& ifx-icon { | ||
transition: .3s; | ||
} | ||
|
||
&.show { | ||
& ifx-icon { | ||
transition: .3s; | ||
transform: rotate(180deg); | ||
} | ||
} | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
packages/components/src/components/breadcrumb/breadcrumb-item-label.tsx
This file contains 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,34 @@ | ||
import { Component, h, Prop, Element, Event, EventEmitter } from '@stencil/core'; | ||
|
||
@Component({ | ||
tag: 'ifx-breadcrumb-item-label', | ||
styleUrl: 'breadcrumb-item-label.scss', | ||
shadow: true, | ||
}) | ||
export class BreadcrumbItemLabel { | ||
@Prop() icon: string; | ||
@Prop() url: string; | ||
@Prop() target: string = "_self" | ||
@Element() el; | ||
@Event() breadcrumbMenuIconWrapper: EventEmitter<CustomEvent>; | ||
|
||
componentDidLoad() { | ||
const container = this.el.shadowRoot.querySelector('.breadcrumb-item-label-container') | ||
const menuWrapper = container.querySelector('.menu-icon-wrapper') | ||
this.breadcrumbMenuIconWrapper.emit(menuWrapper) | ||
} | ||
|
||
render() { | ||
return ( | ||
<a href={this.url} target={this.target} class="breadcrumb-item-label-container"> | ||
<ifx-icon icon={this.icon}></ifx-icon> | ||
<span class="label-wrapper"> | ||
<slot /> | ||
</span> | ||
<span class="menu-icon-wrapper"> | ||
<ifx-icon icon="chevron-down-12"></ifx-icon> | ||
</span> | ||
</a> | ||
); | ||
} | ||
} |
Oops, something went wrong.