Skip to content
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

Replace title with heading #2946

Merged
merged 1 commit into from
Jul 25, 2024
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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<section
class="emptyState mod-page"
[attr.role]="title ? null : 'presentation'"
[attr.role]="heading ? null : 'presentation'"
[style.--components-emptyState-background-color]="contentBackgroundColor"
style.--components-emptyState-illustration-background-bottom-left="url({{bottomLeftBackground}})"
style.--components-emptyState-illustration-foreground-bottom-left="url({{bottomLeftForeground}})"
Expand All @@ -11,7 +11,7 @@
<div class="emptyState-content">
<div *ngIf="icon" class="emptyState-content-icon" aria-hidden="true" [innerHtml]="icon | luSafeExternalSvg"></div>
<div class="emptyState-content-text">
<div role="heading" [attr.aria-level]="hx" class="emptyState-content-heading" *ngIf="title">{{ title }}</div>
<div role="heading" [attr.aria-level]="hx" class="emptyState-content-heading" *ngIf="heading">{{ heading }}</div>
<p class="emptyState-content-description" *ngIf="description">
<ng-container *luPortal="description"></ng-container>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class EmptyStatePageComponent {
contentBackgroundColor = 'var(--pr-t-elevation-surface-default)';

@Input()
title: string;
heading: string;

@Input()
description: PortalContent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<section class="emptyState" [class.mod-center]="center" [attr.role]="title ? null : 'presentation'">
<section class="emptyState" [class.mod-center]="center" [attr.role]="heading ? null : 'presentation'">
<div class="emptyState-container">
<div class="emptyState-content">
<div *ngIf="icon" class="emptyState-content-icon palette-{{palette}}" aria-hidden="true" [innerHtml]="icon | luSafeExternalSvg"></div>
<div class="emptyState-content-text">
<div role="heading" [attr.aria-level]="hx" class="emptyState-content-heading" *ngIf="title">{{ title }}</div>
<div role="heading" [attr.aria-level]="hx" class="emptyState-content-heading" *ngIf="heading">{{ heading }}</div>
<p class="emptyState-content-description" *ngIf="description">
<ng-container *luPortal="description"></ng-container>
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class EmptyStateSectionComponent {
center = false;

@Input()
title: string;
heading: string;

@Input()
description: PortalContent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default {
}),
],
render: (args: EmptyStatePageComponent) => {
const { title, description, icon, topRightBackground, topRightForeground, bottomLeftBackground, bottomLeftForeground, contentBackgroundColor, hx } = args;
const { heading, description, icon, topRightBackground, topRightForeground, bottomLeftBackground, bottomLeftForeground, contentBackgroundColor, hx } = args;
const paramIcon = args.icon === '' ? '' : 'icon="' + args.icon + '"';

return {
Expand All @@ -26,7 +26,7 @@ export default {
`,
],
template: `<lu-empty-state-page
title="${title}"
heading="${heading}"
description="${description}"
${paramIcon}
topRightBackground="${topRightBackground}"
Expand Down Expand Up @@ -153,7 +153,7 @@ export default {

export const Page: StoryObj<EmptyStatePageComponent> = {
args: {
title: 'Empty state page',
heading: 'Empty state page',
description: 'Description can be a string or a ng-template',
icon: '',
topRightBackground: 'https://cdn.lucca.fr/lucca-front/assets/empty-states/poplee/bubbles-top-right-01.svg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ export default {
}),
],
render: (args: EmptyStateSectionComponent) => {
const { title, description, center, palette, hx, icon } = args;
const { heading, description, center, palette, hx, icon } = args;
const paramIcon = args.icon === '' ? '' : 'icon="' + args.icon + '"';
return {
template: `<lu-empty-state-section hx="${hx}" ${paramIcon} title="${title}" description="${description}" palette="${palette}" ${center ? ' center' : ''}>
template: `<lu-empty-state-section hx="${hx}" ${paramIcon} heading="${heading}" description="${description}" palette="${palette}" ${center ? ' center' : ''}>
<button luButton type="button" palette="product">Button</button>
<button luButton="outlined" type="button" palette="product">Button</button>
</lu-empty-state-section>`,
Expand Down Expand Up @@ -89,7 +89,7 @@ export default {
],
control: 'select',
},
title: {
heading: {
description: '[v18.1] Optional',
},
description: {
Expand All @@ -101,7 +101,7 @@ export default {
export const Section: StoryObj<EmptyStateSectionComponent> = {
args: {
icon: 'https://cdn.lucca.fr/lucca-front/assets/empty-states/icons/iconRocket.svg',
title: 'Empty state section',
heading: 'Empty state section',
description: 'Description can be a string or a ng-template',
center: false,
palette: 'none',
Expand Down
3 changes: 1 addition & 2 deletions stories/qa/forms/textfield.stories.html
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,7 @@ <h2>Align right</h2>

<div class="form-field pr-u-marginBottom300">
<label class="formLabel" id="fieldAlignRightAffixlabel" for="fieldAlignRightAffix">
Label<sup class="formLabel-required" aria-hidden="true">*</sup
><span aria-hidden="true" class="lucca-icon icon-signHelp" title="yoiejuf"></span>
Label<sup class="formLabel-required" aria-hidden="true">*</sup><span aria-hidden="true" class="lucca-icon icon-signHelp"></span>
</label>
<div class="textField mod-valueAlignRight">
<div class="textField-input">
Expand Down