Skip to content
Open
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
45 changes: 30 additions & 15 deletions frontend/demo/component/accordion/accordion-summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,16 @@ export class Example extends LitElement {
<vaadin-accordion-heading slot="summary">
<vaadin-horizontal-layout theme="spacing">
Customer details
${this.customerComplete
? html`
<vaadin-icon icon="vaadin:check" style="--vaadin-icon-size: 1rem"></vaadin-icon>
`
: nothing}
${
this.customerComplete
? html`
<vaadin-icon
icon="vaadin:check"
style="--vaadin-icon-size: 1rem"
></vaadin-icon>
`
: nothing
}
</vaadin-horizontal-layout>
</vaadin-accordion-heading>
<!-- end::snippet[] -->
Expand Down Expand Up @@ -94,11 +99,16 @@ export class Example extends LitElement {
<vaadin-accordion-heading slot="summary">
<vaadin-horizontal-layout theme="spacing">
Billing address
${this.billingComplete
? html`
<vaadin-icon icon="vaadin:check" style="--vaadin-icon-size: 1rem"></vaadin-icon>
`
: nothing}
${
this.billingComplete
? html`
<vaadin-icon
icon="vaadin:check"
style="--vaadin-icon-size: 1rem"
></vaadin-icon>
`
: nothing
}
</vaadin-horizontal-layout>
</vaadin-accordion-heading>

Expand Down Expand Up @@ -130,11 +140,16 @@ export class Example extends LitElement {
<vaadin-accordion-heading slot="summary">
<vaadin-horizontal-layout theme="spacing">
Payment
${this.paymentComplete
? html`
<vaadin-icon icon="vaadin:check" style="--vaadin-icon-size: 1rem"></vaadin-icon>
`
: nothing}
${
this.paymentComplete
? html`
<vaadin-icon
icon="vaadin:check"
style="--vaadin-icon-size: 1rem"
></vaadin-icon>
`
: nothing
}
</vaadin-horizontal-layout>
</vaadin-accordion-heading>

Expand Down
4 changes: 1 addition & 3 deletions frontend/demo/component/dashboard/dashboard-item-removal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ import type { DashboardItem, DashboardItemBeforeRemoveEvent } from '@vaadin/dash

export class Example extends LitElement {
@state()
items: DashboardItem[] = [
/* Item definitions */
];
items: DashboardItem[] = [/* Item definitions */];

@state()
itemToRemove: DashboardItem | null = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import type { DashboardItem, DashboardItemBeforeRemoveEvent } from '@vaadin/reac
import { Dashboard } from '@vaadin/react-components-pro';

export function Example() {
const items = useSignal<DashboardItem[]>([
/* Item definitions */
]);
const items = useSignal<DashboardItem[]>([/* Item definitions */]);

const itemToRemove = useSignal<DashboardItem | null>(null);

Expand Down
8 changes: 5 additions & 3 deletions frontend/demo/component/grid/grid-dynamic-height.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ export class Example extends LitElement {
</vaadin-button>
</vaadin-horizontal-layout>

${this.invitedPeople.length === 0
? this.renderNoInvitationAlert()
: this.renderInvitedPeopleTable()}
${
this.invitedPeople.length === 0
? this.renderNoInvitationAlert()
: this.renderInvitedPeopleTable()
}
`;
}

Expand Down
5 changes: 4 additions & 1 deletion frontend/demo/component/login/react/login-event.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { reactExample } from 'Frontend/demo/react-example'; // hidden-source-lin
import React from 'react';
import { useSignals } from '@preact/signals-react/runtime'; // hidden-source-line
import { useSignal } from '@vaadin/hilla-react-signals';
import { LoginForm, type LoginFormDisabledChangedEvent } from '@vaadin/react-components/LoginForm.js';
import {
LoginForm,
type LoginFormDisabledChangedEvent,
} from '@vaadin/react-components/LoginForm.js';
import { loginHostStyles } from './login-host-styles';

function Example() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class Example extends LitElement {

protected override async firstUpdated() {
const countries = await getCountries();
this.items = countries
this.items = countries;
this.selectedCountries = countries.slice(0, 3);
}

Expand Down
8 changes: 5 additions & 3 deletions frontend/demo/component/popover/popover-notification-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ export class Example extends LitElement {
<vaadin-tab id="all-tab">All</vaadin-tab>
</vaadin-tabs>
<div tab="unread-tab">
${unread.length
? html`<vaadin-message-list .items="${unread}"></vaadin-message-list>`
: html`<div class="no-notifications-msg">No unread notifications</div>`}
${
unread.length
? html`<vaadin-message-list .items="${unread}"></vaadin-message-list>`
: html`<div class="no-notifications-msg">No unread notifications</div>`
}
</div>
<div tab="all-tab">
<vaadin-message-list .items="${all}"></vaadin-message-list>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ function Example() {
padding: 'var(--vaadin-padding-l) var(--vaadin-padding-l) var(--vaadin-padding-s)',
}}
>
<h4 id="notifications-heading">
Notifications
</h4>
<h4 id="notifications-heading">Notifications</h4>
<Button
slot="end"
theme="small"
Expand Down
5 changes: 1 addition & 4 deletions frontend/demo/component/select/select-presentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ export class Example extends LitElement {
protected override render() {
return html`
<!-- tag::snippet[] -->
<vaadin-select
label="Choose doctor"
style="width: 15em;"
>
<vaadin-select label="Choose doctor" style="width: 15em;">
<vaadin-select-list-box slot="overlay">
${this.people.map(
(person) => html`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function Example() {
invalid.value = true;
} else {
errorMessage.value = '';
invalid.value = false
invalid.value = false;
}
}}
/>
Expand Down
24 changes: 15 additions & 9 deletions frontend/demo/component/tabs/tabsheet-lazy-initialization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,21 @@ export class Example extends LitElement {
<vaadin-tab id="shipping-tab">Shipping</vaadin-tab>
</vaadin-tabs>

${this.visitedTabs.has(0)
? html`<div tab="dashboard-tab">This is the Dashboard tab content</div>`
: ''}
${this.visitedTabs.has(1)
? html`<div tab="payment-tab">This is the Payment tab content</div>`
: ''}
${this.visitedTabs.has(2)
? html`<div tab="shipping-tab">This is the Shipping tab content</div>`
: ''}
${
this.visitedTabs.has(0)
? html`<div tab="dashboard-tab">This is the Dashboard tab content</div>`
: ''
}
${
this.visitedTabs.has(1)
? html`<div tab="payment-tab">This is the Payment tab content</div>`
: ''
}
${
this.visitedTabs.has(2)
? html`<div tab="shipping-tab">This is the Shipping tab content</div>`
: ''
}
</vaadin-tabsheet>
`;
}
Expand Down
Loading