-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: button-dialog and data-view-controls accessibility (#509)
* feat: button-dialog and data-view-controls accessibility * fix: lint * fix: tooltip instead of title * fix: removed hoverevent for tooltip
- Loading branch information
Showing
8 changed files
with
351 additions
and
12 deletions.
There are no files selected for viewing
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
107 changes: 107 additions & 0 deletions
107
...egration-angular/src/lib/core/components/button-dialog/button-dialog.component.stories.ts
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,107 @@ | ||
import { importProvidersFrom } from '@angular/core' | ||
import { BrowserModule } from '@angular/platform-browser' | ||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations' | ||
import { Meta, applicationConfig, argsToTemplate, componentWrapperDecorator, moduleMetadata } from '@storybook/angular' | ||
import { StorybookTranslateModule } from '../../storybook-translate.module' | ||
import { ButtonDialogComponent } from './button-dialog.component' | ||
import { ButtonModule } from 'primeng/button' | ||
import { PrimeIcons } from 'primeng/api' | ||
import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog' | ||
|
||
export default { | ||
title: 'ButtonDialogComponent', | ||
component: ButtonDialogComponent, | ||
decorators: [ | ||
applicationConfig({ | ||
providers: [ | ||
importProvidersFrom(BrowserModule), | ||
importProvidersFrom(BrowserAnimationsModule), | ||
DynamicDialogConfig, | ||
DynamicDialogRef, | ||
], | ||
}), | ||
moduleMetadata({ | ||
declarations: [ButtonDialogComponent], | ||
imports: [StorybookTranslateModule, ButtonModule], | ||
}), | ||
componentWrapperDecorator((story) => `<div style="margin: 3em">${story}</div>`), | ||
], | ||
} as Meta<ButtonDialogComponent> | ||
|
||
export const ButtonDialogWithInlineContentDefaultButtons = { | ||
render: (args: any) => ({ | ||
props: { | ||
...args, | ||
}, | ||
template: ` | ||
<ocx-button-dialog> | ||
<p>My message to display</p> | ||
</ocx-button-dialog> | ||
`, | ||
}), | ||
args: {}, | ||
} | ||
|
||
export const ButtonDialogWithInlineContent = { | ||
render: (args: any) => ({ | ||
props: { | ||
...args, | ||
}, | ||
template: ` | ||
<ocx-button-dialog ${argsToTemplate(args)}> | ||
<p>My message to display</p> | ||
</ocx-button-dialog> | ||
`, | ||
}), | ||
args: { | ||
config: { | ||
primaryButtonDetails: { | ||
key: 'KEY', | ||
icon: PrimeIcons.BOOK, | ||
}, | ||
secondaryButtonIncluded: true, | ||
secondaryButtonDetails: { | ||
key: 'Times', | ||
icon: PrimeIcons.TIMES, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
export const ButtonDialogWithCustomButtons = { | ||
render: (args: any) => ({ | ||
props: { | ||
...args, | ||
}, | ||
template: ` | ||
<ocx-button-dialog ${argsToTemplate(args)}> | ||
<p>My message to display</p> | ||
</ocx-button-dialog> | ||
`, | ||
}), | ||
args: { | ||
config: { | ||
primaryButtonDetails: { | ||
key: 'KEY', | ||
icon: PrimeIcons.BOOK, | ||
}, | ||
secondaryButtonIncluded: true, | ||
secondaryButtonDetails: { | ||
key: 'Times', | ||
icon: PrimeIcons.TIMES, | ||
}, | ||
customButtons: [ | ||
{ | ||
id: 'custom-1', | ||
alignment: 'left', | ||
key: 'custom 1', | ||
}, | ||
{ | ||
id: 'custom-2', | ||
alignment: 'right', | ||
key: 'custom 2', | ||
}, | ||
], | ||
}, | ||
}, | ||
} |
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
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
29 changes: 29 additions & 0 deletions
29
...-angular/src/lib/core/components/loading-indicator/loading-indicator.component.stories.ts
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,29 @@ | ||
import { importProvidersFrom } from '@angular/core' | ||
import { BrowserModule } from '@angular/platform-browser' | ||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations' | ||
import { Meta, StoryFn, applicationConfig, moduleMetadata } from '@storybook/angular' | ||
import { StorybookTranslateModule } from '../../storybook-translate.module' | ||
import { LoadingIndicatorComponent } from './loading-indicator.component' | ||
|
||
export default { | ||
title: 'LoadaingIndicatorComponent', | ||
component: LoadingIndicatorComponent, | ||
decorators: [ | ||
applicationConfig({ | ||
providers: [importProvidersFrom(BrowserModule), importProvidersFrom(BrowserAnimationsModule)], | ||
}), | ||
moduleMetadata({ | ||
declarations: [LoadingIndicatorComponent], | ||
imports: [StorybookTranslateModule], | ||
}), | ||
], | ||
} as Meta<LoadingIndicatorComponent> | ||
|
||
const Template: StoryFn<LoadingIndicatorComponent> = (args: LoadingIndicatorComponent) => ({ | ||
props: args, | ||
}) | ||
|
||
export const Basic = { | ||
render: Template, | ||
args: {}, | ||
} |
Oops, something went wrong.