Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/wrapper-components/react-vite-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test:local": "run-p preview:link watch:library"
},
"dependencies": {
"@infineon/infineon-design-system-react": "33.1.3--canary.1827.8a7453d1d45ac58bc62b68fa3c5a1148ca279471.0",
"@infineon/infineon-design-system-react": "33.1.4--canary.1826.df088e460080752b9ce982492f593644b897818c.0",
"path": "^0.12.7",
"react": "^18.3.1",
"react-dom": "^18.3.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/wrapper-components/vue-javascript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"test:local": "run-p preview:link watch:library"
},
"dependencies": {
"@infineon/infineon-design-system-vue": "33.1.3--canary.1827.8a7453d1d45ac58bc62b68fa3c5a1148ca279471.0",
"@infineon/infineon-design-system-vue": "33.1.4--canary.1826.df088e460080752b9ce982492f593644b897818c.0",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^4.0.0",
"vite": "^5.0.12",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "33.1.3--canary.1827.8a7453d1d45ac58bc62b68fa3c5a1148ca279471.0",
"version": "33.1.4--canary.1826.df088e460080752b9ce982492f593644b897818c.0",
"command": {
"publish": {
"verifyAccess": false
Expand Down
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/components-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "components-angular",
"version": "33.1.3--canary.1827.8a7453d1d45ac58bc62b68fa3c5a1148ca279471.0",
"version": "33.1.4--canary.1826.df088e460080752b9ce982492f593644b897818c.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand All @@ -26,7 +26,7 @@
"@angular/platform-browser": "^18.0.0",
"@angular/platform-browser-dynamic": "^18.0.0",
"@angular/router": "^18.0.0",
"@infineon/infineon-design-system-angular": "33.1.3--canary.1827.8a7453d1d45ac58bc62b68fa3c5a1148ca279471.0",
"@infineon/infineon-design-system-angular": "33.1.4--canary.1826.df088e460080752b9ce982492f593644b897818c.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"typescript": "~5.4.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@infineon/infineon-design-system-angular",
"version": "33.1.3--canary.1827.8a7453d1d45ac58bc62b68fa3c5a1148ca279471.0",
"version": "33.1.4--canary.1826.df088e460080752b9ce982492f593644b897818c.0",
"description": "Infineon design system Stencil web components for Angular",
"author": "Verena Lechner",
"license": "MIT",
Expand All @@ -11,7 +11,7 @@
"@angular/common": "^18.0.0",
"@angular/core": "^18.0.0",
"@infineon/design-system-tokens": "5.0.0",
"@infineon/infineon-design-system-stencil": "33.1.3--canary.1827.8a7453d1d45ac58bc62b68fa3c5a1148ca279471.0"
"@infineon/infineon-design-system-stencil": "33.1.4--canary.1826.df088e460080752b9ce982492f593644b897818c.0"
},
"dependencies": {
"tslib": "^2.3.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/components-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@infineon/infineon-design-system-react",
"version": "33.1.3--canary.1827.8a7453d1d45ac58bc62b68fa3c5a1148ca279471.0",
"version": "33.1.4--canary.1826.df088e460080752b9ce982492f593644b897818c.0",
"description": "Infineon design system Stencil web components for React",
"main": "./dist/index.js",
"types": "./dist/types/index.d.ts",
Expand Down Expand Up @@ -28,7 +28,7 @@
},
"dependencies": {
"@infineon/design-system-tokens": "5.0.0",
"@infineon/infineon-design-system-stencil": "33.1.3--canary.1827.8a7453d1d45ac58bc62b68fa3c5a1148ca279471.0",
"@infineon/infineon-design-system-stencil": "33.1.4--canary.1826.df088e460080752b9ce982492f593644b897818c.0",
"@stencil/react-output-target": "^0.7.1"
},
"auto": {
Expand Down
4 changes: 2 additions & 2 deletions packages/components-vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@infineon/infineon-design-system-vue",
"version": "33.1.3--canary.1827.8a7453d1d45ac58bc62b68fa3c5a1148ca279471.0",
"version": "33.1.4--canary.1826.df088e460080752b9ce982492f593644b897818c.0",
"description": "Infineon design system Stencil web components for Vue",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down Expand Up @@ -30,7 +30,7 @@
},
"dependencies": {
"@infineon/design-system-tokens": "5.0.0",
"@infineon/infineon-design-system-stencil": "33.1.3--canary.1827.8a7453d1d45ac58bc62b68fa3c5a1148ca279471.0"
"@infineon/infineon-design-system-stencil": "33.1.4--canary.1826.df088e460080752b9ce982492f593644b897818c.0"
},
"auto": {
"plugins": [
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@infineon/infineon-design-system-stencil",
"version": "33.1.3--canary.1827.8a7453d1d45ac58bc62b68fa3c5a1148ca279471.0",
"version": "33.1.4--canary.1826.df088e460080752b9ce982492f593644b897818c.0",
"private": false,
"description": "Infineon design system Stencil web components",
"homepage": "https://infineon.github.io/infineon-design-system-stencil",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default {
href: '',
target: '_blank',
shape: 'round',
ariaLabel: 'Icon Button',
},

argTypes: {
Expand Down Expand Up @@ -92,11 +93,18 @@ export default {
}
}
},
ariaLabel: {
control: { type: 'text' },
description: 'Set the aria label of the icon button. Enhances accessibility.',
table: {
category: 'ifx-icon-button props'
}
},
},
};

const DefaultTemplate = args =>
`<ifx-icon-button shape="${args.shape}" variant="${args.variant}" icon="${args.icon}" href="${args.href}" target="${args.target}" size="${args.size}" disabled="${args.disabled}">
`<ifx-icon-button shape="${args.shape}" variant="${args.variant}" icon="${args.icon}" href="${args.href}" target="${args.target}" size="${args.size}" disabled="${args.disabled}" aria-label="${args.ariaLabel}">
</ifx-icon-button>`;

export const Default = DefaultTemplate.bind({});
13 changes: 7 additions & 6 deletions packages/components/src/components/icon-button/icon-button.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Component, Prop, h, Host, Method, Element, Listen } from '@stencil/core';
import classNames from 'classnames';


@Component({
tag: 'ifx-icon-button',
Expand All @@ -16,10 +15,11 @@ export class IconButton {
@Prop() href: string;
@Prop() target: string = '_self';
@Prop() shape: string = 'round';
@Prop() ariaLabel: string | null;
@Element() el;

private focusableElement: HTMLElement;

@Listen('click', { capture: true })
handleClick(event: Event) {
if (this.disabled) {
Expand All @@ -40,14 +40,14 @@ export class IconButton {

render() {
return (
<Host>
<Host
aria-disabled={this.disabled}
aria-label={this.ariaLabel}>
{this.href ? (
<a
aria-disabled={this.disabled}
aria-label='a clickable icon button'
ref={(el) => (this.focusableElement = el)}
class={this.getClassNames()}
href={!this.disabled ? this.href : undefined}
href={!this.disabled ? this.href : undefined}
target={this.target}
rel={this.target === '_blank' ? 'noopener noreferrer' : undefined}
>
Expand All @@ -57,6 +57,7 @@ export class IconButton {
<button
class={this.getClassNames()}
type="button"
disabled={this.disabled}
>
<ifx-icon icon={this.icon}></ifx-icon>
</button>
Expand Down
19 changes: 10 additions & 9 deletions packages/components/src/components/icon-button/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@

## Properties

| Property | Attribute | Description | Type | Default |
| ---------- | ---------- | ----------- | ---------------------------------------- | ----------- |
| `disabled` | `disabled` | | `boolean` | `undefined` |
| `href` | `href` | | `string` | `undefined` |
| `icon` | `icon` | | `string` | `undefined` |
| `shape` | `shape` | | `string` | `'round'` |
| `size` | `size` | | `string` | `undefined` |
| `target` | `target` | | `string` | `'_self'` |
| `variant` | `variant` | | `"primary" \| "secondary" \| "tertiary"` | `undefined` |
| Property | Attribute | Description | Type | Default |
| ----------- | ------------ | ----------- | ---------------------------------------- | ----------- |
| `ariaLabel` | `aria-label` | | `string` | `undefined` |
| `disabled` | `disabled` | | `boolean` | `undefined` |
| `href` | `href` | | `string` | `undefined` |
| `icon` | `icon` | | `string` | `undefined` |
| `shape` | `shape` | | `string` | `'round'` |
| `size` | `size` | | `string` | `undefined` |
| `target` | `target` | | `string` | `'_self'` |
| `variant` | `variant` | | `"primary" \| "secondary" \| "tertiary"` | `undefined` |


## Methods
Expand Down
Loading