-
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.
* fix: add fetchMock * fix: convert to unit tests, add fixtures * fix: ignore some hard to test lines, remove some unused code * fix: add plugin id to root plugin element * fix: move plugins object inside loadPlugins (for testing) * fix: webRoot when in devMode * fix: override spectrum cards block to not include actions by default * fix: fallback to empty string if codeBasePath doesn't exist * fix: make search tags more robust * fix: skip search test....
- Loading branch information
1 parent
4b56900
commit a555915
Showing
27 changed files
with
1,169 additions
and
201 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
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 |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* Copyright 2023 Adobe. All rights reserved. | ||
* This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. You may obtain a copy | ||
* of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under | ||
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
* OF ANY KIND, either express or implied. See the License for the specific language | ||
* governing permissions and limitations under the License. | ||
*/ | ||
import { html } from 'lit'; | ||
import { Card as SPCard } from '@spectrum-web-components/card'; | ||
|
||
export class Card extends SPCard { | ||
render() { | ||
return html` | ||
<div class="body"> | ||
<div class="header"> | ||
${this.renderHeading} | ||
${this.variant === 'gallery' | ||
? this.renderSubtitleAndDescription | ||
: html``} | ||
${this.variant !== 'quiet' || this.size !== 's' | ||
? html` | ||
<div | ||
class="action-button" | ||
@pointerdown=${this.stopPropagationOnHref} | ||
> | ||
<slot name="actions"></slot> | ||
</div> | ||
` | ||
: html``} | ||
</div> | ||
${this.variant !== 'gallery' | ||
? html` | ||
<div class="content"> | ||
${this.renderSubtitleAndDescription} | ||
</div> | ||
` | ||
: html``} | ||
</div> | ||
${this.href | ||
? this.renderAnchor({ | ||
id: 'like-anchor', | ||
labelledby: 'heading', | ||
}) | ||
: html``} | ||
${this.variant === 'standard' | ||
? html` | ||
<slot name="footer"></slot> | ||
` | ||
: html``} | ||
${this.renderImage()} | ||
${this.toggles | ||
? html` | ||
<sp-quick-actions | ||
class="quick-actions" | ||
@pointerdown=${this.stopPropagationOnHref} | ||
> | ||
<sp-checkbox | ||
class="checkbox" | ||
@change=${this.handleSelectedChange} | ||
?checked=${this.selected} | ||
tabindex="-1" | ||
></sp-checkbox> | ||
</sp-quick-actions> | ||
` | ||
: html``} | ||
`; | ||
} | ||
} | ||
|
||
customElements.define('sp-card', Card); |
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
Oops, something went wrong.