Compare commits

..

1 Commits

Author SHA1 Message Date
Cory LaViska
1b1cdfb21a improve icon button detection; fixes #1475 2025-10-14 14:37:02 -04:00
74 changed files with 791 additions and 1285 deletions

3
package-lock.json generated
View File

@@ -14017,7 +14017,8 @@
"qr-creator": "^1.0.0"
},
"devDependencies": {
"@wc-toolkit/jsx-types": "^1.3.0"
"@wc-toolkit/jsx-types": "^1.3.0",
"eleventy-plugin-git-commit-date": "^0.1.3"
},
"engines": {
"node": ">=14.17.0"

View File

@@ -1,7 +0,0 @@
Copyright (c) 2025 Fonticons, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,312 +0,0 @@
---
title: Web Awesome is Undergoing Maintenance
description: We're performing routine maintenance to keep things running smoothly. Check back soon!
layout: blank
permalink: 503.html
noindex: true
unlisted: true
---
{% block head %}
<link id="site-stylesheet" rel="stylesheet" href="/assets/styles/theme-site.css" />
<link id="site-stylesheet" rel="stylesheet" href="/assets/styles/site.css" />
{% endblock %}
<style>
:root {
--scene-vertical-offset: calc(var(--wa-space-2xs) * -1);
--wa-font-family-heading: cera-round-pro;
--vehicle-offset: 25ch;
--vehicle-duration: 20s;
--vehicle-start: calc(-1 * var(--vehicle-offset));
--vehicle-end: calc(100% + var(--vehicle-offset));
}
html, wa-page {
background-color: var(--wa-color-surface-lowered);
}
wa-icon[name='traffic-cone'] {
--primary-color: var(--wa-color-brand-70);
--secondary-color: var(--wa-color-text-normal);
--secondary-opacity: 1.0;
}
wa-page.background-grid {
--grid-line-color: color-mix(in oklab, var(--wa-color-text-normal), transparent 96%);
--subgrid-line-color: color-mix(in oklab, var(--wa-color-text-normal), transparent 98%);
}
wa-page > [slot='main-footer'] {
border-block-end: var(--wa-border-style) calc(var(--wa-border-width-l) * 10) var(--wa-color-text-normal);
padding: 0;
background-color: transparent;
}
.header-content {
margin-inline: auto;
max-width: var(--content-width-l);
padding-inline: var(--content-padding-inline);
}
.icon-brand-logo {
font-size: var(--wa-font-size-xl);
color: var(--wa-brand-orange);
}
/* centering main-content */
wa-page::part(main-content) {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
#content {
max-width: var(--content-width-m);
padding-inline: var(--content-padding-inline);
margin-inline: auto;
}
.heading-stacked-subtitle {
text-transform: uppercase;
letter-spacing: 0.1em;
}
.heading-stacked-subtitle wa-icon {
position: relative;
inset-block-start: calc(var(--wa-space-3xs) * -0.75);
font-size: 0.75em;
}
.heading-stacked-subtitle wa-icon[name="traffic-cone"] {
--secondary-color: var(--wa-color-text-normal);
--primary-color: var(--wa-color-brand-70);
margin-inline: calc(var(--wa-space-xs) * -1.15) calc(var(--wa-space-xs) * -0.75);
}
.copy {
code {
font-size: 0.75em;
}
strong {
text-decoration: underline;
text-decoration-color: var(--wa-color-brand-70);
text-decoration-thickness: var(--wa-border-width-m);
text-underline-offset: var(--wa-space-2xs);
}
}
.status {
width: 100%;
--min-column-size: 30ch;
wa-callout {
background-color: var(--wa-color-surface-default);
}
}
.linkies {
/* nudge those linkies left */
margin-inline-start: calc(var(--wa-space-xs) * -1);
a {
padding-inline: var(--wa-space-xs);
}
}
.scene {
width: 100%;
position: relative;
overflow-x: clip;
inset-block-end: var(--scene-vertical-offset);
.vehicle {
position: absolute;
inset-inline-start: var(--vehicle-start);
inset-block-end: 0; /* align all vehicles to bottom */
animation: driveAcross var(--vehicle-duration) linear infinite;
transform-origin: center;
z-index: 1;
}
.vehicle-with-object {
white-space: nowrap;
display: flex;
align-items: baseline;
gap: var(--wa-space-3xs);
}
.scene-left {
position: absolute;
inset-block-end: 0;
inset-inline-start: var(--wa-space-l);
}
.scene-left wa-icon[name='toilet-portable'] {
position: relative;
inset-block-start: var(--scene-vertical-offset);
margin-inline: calc(var(--wa-space-xs) * -1);
}
.scene-left wa-icon[name='traffic-cone'] {
position: relative;
inset-block-start: var(--scene-vertical-offset);
}
.blocks {
position: absolute;
inset-inline-end: calc(var(--wa-space-l) * -1);
inset-block-end: 0;
z-index: 2;
}
.blocks wa-icon[name='block-brick'] {
margin-inline: calc(var(--wa-space-xs) * -1);
}
.blocks-bottom {
margin-block-start: calc(var(--wa-space-2xs) * -1);
}
wa-icon[family='duotone'] {
--secondary-opacity: 1.0;
}
wa-icon[name='bulldozer'],
wa-icon[name='excavator'] {
--secondary-color: var(--wa-color-brand-70);
}
wa-icon[name='block-brick'],
wa-icon[name='toilet-portable'] {
--secondary-color: var(--wa-color-neutral-70);
}
}
@keyframes driveAcross {
0% {
left: var(--vehicle-start);
}
100% {
left: var(--vehicle-end);
}
}
/* Unique rumble animations for each vehicle type */
@keyframes rumble-bulldozer {
0%, 100% { transform: translateY(0px) rotate(0deg); }
25% { transform: translateY(-1px) rotate(0.5deg); }
50% { transform: translateY(1px) rotate(-0.3deg); }
75% { transform: translateY(-0.5px) rotate(0.2deg); }
}
/* Apply rumble animation to the single vehicle */
.vehicle-driving { animation: driveAcross var(--vehicle-duration) linear infinite; }
.vehicle wa-icon[name="bulldozer"] { animation: rumble-bulldozer 0.1s ease-in-out infinite; }
</style>
<wa-page disable-sticky="header" class="background-grid">
<header slot="header">
<div class="header-content wa-split" style="flex-wrap: nowrap;">
<wa-icon variant="brands" name="web-awesome" class="icon-brand-logo"></wa-icon>
<div>
<wa-button id="contact-us-button" appearance="plain" href="mailto:hello@webawesome.com?subject=Help%2C%20Web%20Awesome">
<wa-icon variant="regular" name="headset" label="Need help? Contact Us" class="icon-embiggen"></wa-icon>
</wa-button>
<wa-tooltip for="contact-us-button" aria-hidden="true">Contact Us</wa-tooltip>
</div>
</div>
</header>
<main id="content">
<div class="content-container wa-stack wa-gap-xl wa-align-items-center">
<h1 class="brand-font wa-stack wa-gap-s heading heading-stacked" style="text-align: center;">
<span class="wa-heading-l heading-stacked-subtitle">
under
<span class="wa-visually-hidden">maintenance</span>
<span aria-hidden="true">
m
<wa-icon family="duotone" variant="solid" name="traffic-cone"></wa-icon>
inten
<wa-icon family="duotone" variant="solid" name="traffic-cone"></wa-icon>
nce
</span>
</span>
<span class="wa-heading-4xl heading-stacked-title">Hey! We're Workin&apos; Here</span>
</h1>
<p class="copy wa-body-l line-length line-length-m" style="text-align: center;">Mind the <code>wa-gap</code>! webawesome.com is undergoing maintenance and will be back shortly.</p>
<div class="wa-grid wa-gap-xl status">
<wa-callout appearance="plain" variant="neutral">
<wa-icon slot="icon" family="duotone" variant="regular" name="diamond-exclamation" class="icon-embiggen" style="--secondary-opacity: 1; --secondary-color: var(--wa-color-warning-fill-normal);"></wa-icon>
<strong>Temporarily Unavailable</strong><br />
Access to Docs, Accounts, and Teams
</wa-callout>
<wa-callout appearance="plain" variant="neutral">
<wa-icon slot="icon" family="duotone" variant="regular" name="bolt" class="icon-embiggen" style="--secondary-opacity: 1; --secondary-color: var(--wa-color-success-fill-normal);"></wa-icon>
<strong>Fully Operational</strong><br />
Services (such as CDNs) and Support
</wa-callout>
</div>
<div class="wa-cluster wa-gap-xs linkies">
<h2 class="wa-visually-hidden">Web Awesome Elsewhere</h2>
<a href="https://github.com/shoelace-style/webawesome" rel="noopener noreferrer" target="_blank" class="appearance-plain">
<wa-icon family="brands" name="github" label="GitHub"></wa-icon>
</a>
<a href="https://bsky.app/profile/webawesome.com" rel="noopener noreferrer" target="_blank" class="appearance-plain">
<wa-icon family="brands" name="bluesky" label="Bluesky"></wa-icon>
</a>
<a href="https://mastodon.social/@webawesome" rel="noopener noreferrer" target="_blank" class="appearance-plain">
<wa-icon family="brands" name="mastodon" label="Mastodon"></wa-icon>
</a>
<a href="https://x.com/webawesomer" rel="noopener noreferrer" target="_blank" class="appearance-plain">
<wa-icon family="brands" name="x-twitter" label="Twitter (X)"></wa-icon>
</a>
<a href="https://www.threads.com/@web.awesome" rel="noopener noreferrer" target="_blank" class="appearance-plain">
<wa-icon family="brands" name="threads" label="Threads"></wa-icon>
</a>
<a href="mailto:hello@webawesome.com?subject=Help%2C%20Web%20Awesome" class="appearance-plain">
<wa-icon variant="regular" name="envelope" label="Email Web Awesome"></wa-icon>
</a>
</div>
</div>
</main>
<div slot="main-footer" class="footer">
<div class="scene">
<div class="scene-left wa-cluster wa-align-items-end">
<wa-icon family="duotone" variant="solid" name="traffic-cone"></wa-icon>
<div class="wa-cluster wa-gap-0">
<wa-icon family="duotone" variant="regular" name="toilet-portable" class="wa-font-size-2xl"></wa-icon>
<wa-icon family="duotone" variant="regular" name="toilet-portable" class="wa-font-size-2xl"></wa-icon>
<wa-icon family="duotone" variant="regular" name="toilet-portable" class="wa-font-size-2xl"></wa-icon>
</div>
<wa-icon family="duotone" variant="regular" name="excavator" class="wa-font-size-3xl"></wa-icon>
<wa-icon family="duotone" variant="solid" name="traffic-cone"></wa-icon>
</div>
<div class="blocks wa-stack wa-align-items-center wa-gap-0">
<div class="blocks-top wa-cluster wa-gap-0">
<wa-icon family="duotone" variant="regular" name="block-brick" class="wa-font-size-2xl"></wa-icon>
<wa-icon family="duotone" variant="regular" name="block-brick" class="wa-font-size-2xl"></wa-icon>
<wa-icon family="duotone" variant="regular" name="block-brick" class="wa-font-size-2xl"></wa-icon>
</div>
<div class="blocks-bottom wa-cluster wa-gap-0">
<wa-icon family="duotone" variant="regular" name="block-brick" class="wa-font-size-2xl"></wa-icon>
<wa-icon family="duotone" variant="regular" name="block-brick" class="wa-font-size-2xl"></wa-icon>
<wa-icon family="duotone" variant="regular" name="block-brick" class="wa-font-size-2xl"></wa-icon>
<wa-icon family="duotone" variant="regular" name="block-brick" class="wa-font-size-2xl"></wa-icon>
<wa-icon family="duotone" variant="regular" name="block-brick" class="wa-font-size-2xl"></wa-icon>
</div>
</div>
<div class="track">
<wa-icon family="duotone" variant="regular" name="bulldozer" class="spacer-dot-gif wa-font-size-3xl" style="opacity: 0;"></wa-icon>
<span class="vehicle vehicle-driving vehicle-with-object">
<wa-icon family="duotone" variant="regular" name="bulldozer" class="wa-font-size-3xl"></wa-icon>
<wa-icon family="duotone" variant="regular" name="block-brick" class="wa-font-size-2xl" style="position: relative; inset-inline-start: calc(var(--wa-space-2xs) * -1);"></wa-icon>
</span>
</div>
</div>
</div>
</wa-page>

View File

@@ -12,22 +12,22 @@ export const themes = [
isPro: false,
fonts: {
body: {
name: 'OS Default (sans-serif)',
name: 'OS Default',
css: 'ui-sans-serif, system-ui, sans-serif',
href: null,
},
heading: {
name: 'OS Default (sans-serif)',
name: 'OS Default',
css: 'ui-sans-serif, system-ui, sans-serif',
href: null,
},
code: {
name: 'OS Default (monospace)',
name: 'OS Default',
css: 'ui-monospace, monospace',
href: null,
},
longform: {
name: 'OS Default (serif)',
name: 'OS Default',
css: 'ui-serif, serif',
href: null,
},
@@ -82,7 +82,7 @@ export const themes = [
href: 'https://fonts.bunny.net/css2?family=Quicksand:wght@300..700&display=swap',
},
code: {
name: 'OS Default (monospace)',
name: 'OS Default',
css: 'ui-monospace, monospace',
href: null,
},
@@ -132,22 +132,22 @@ export const themes = [
isPro: false,
fonts: {
body: {
name: 'OS Default (sans-serif)',
name: 'OS Default',
css: 'ui-sans-serif, system-ui, sans-serif',
href: null,
},
heading: {
name: 'OS Default (sans-serif)',
name: 'OS Default',
css: 'ui-sans-serif, system-ui, sans-serif',
href: null,
},
code: {
name: 'OS Default (monospace)',
name: 'OS Default',
css: 'ui-monospace, monospace',
href: null,
},
longform: {
name: 'OS Default (serif)',
name: 'OS Default',
css: 'ui-serif, serif',
href: null,
},
@@ -442,7 +442,7 @@ export const themes = [
href: 'https://fonts.bunny.net/css2?family=Lora:ital,wght@0,400..700;1,400..700&display=swap',
},
code: {
name: 'OS Default (monospace)',
name: 'OS Default',
css: 'ui-monospace, monospace',
href: null,
},
@@ -562,7 +562,7 @@ export const themes = [
href: 'https://fonts.bunny.net/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap',
},
code: {
name: 'OS Default (monospace)',
name: 'OS Default',
css: 'ui-monospace, monospace',
href: null,
},
@@ -622,12 +622,12 @@ export const themes = [
href: 'https://fonts.bunny.net/css2?family=Inter:ital,wght@0,100..900;1,100..900&display=swap',
},
code: {
name: 'OS Default (monospace)',
name: 'OS Default',
css: 'ui-monospace, monospace',
href: null,
},
longform: {
name: 'OS Default (serif)',
name: 'OS Default',
css: 'ui-serif, serif',
href: null,
},

View File

@@ -18,17 +18,14 @@
<ul>
<li><a href="https://github.com/shoelace-style/webawesome/discussions" target="_blank">Help &amp; Support</a></li>
<li><a href="https://github.com/shoelace-style/webawesome/">Source Code</a></li>
<li>
<span class="wa-split">
<a href="/docs/resources/figma">Figma Design Kit</a></li>
{{ proBadge() }}
</span>
</li>
<li><a href="/docs/resources/community">Community</a></li>
<li><a href="/docs/resources/accessibility">Accessibility</a></li>
<li><a href="/docs/resources/browser-support">Browser Support</a></li>
<li><a href="/docs/resources/contributing">Contributing</a></li>
<li><a href="/docs/resources/changelog">Changelog</a></li>
<li><a href="/license"><span class="wa-visually-hidden">Web Awesome </span>Free License</a></li>
<li><a href="/license/pro"><span class="wa-visually-hidden">Web Awesome </span>Pro License</a></li>
<li><a href="/tos">Terms of Service</a></li>
<li><a href="/docs/resources/visual-tests">Visual Tests</a></li>
</ul>
@@ -380,6 +377,12 @@
<ul>
<li><a href="/docs/color-palettes">Color Palettes</a></li>
<li><a href="/docs/themes">Themes</a></li>
<li>
<span class="wa-split">
<a href="/themer" data-turbo="false">Theme Builder</a>
{{ proBadge({ description: "This requires an active Web Awesome Pro subscription", shrink: true }) }}
</span>
</li>
</ul>
<!-- Design tokens -->
@@ -402,31 +405,21 @@
</ul>
</wa-details>
{# Policies #}
<h2>Terms &amp; Policies</h2>
<ul>
<li><a href="/license"><span class="wa-visually-hidden">Web Awesome </span>Free License</a></li>
<li><a href="/license/pro"><span class="wa-visually-hidden">Web Awesome </span>Pro License</a></li>
<li><a href="/tos">Terms of Service</a></li>
<li><a href="/privacy">Privacy Policy</a></li>
<li><a href="/refunds">Refund Policy</a></li>
</ul>
<wa-divider style="--spacing: var(--wa-space-xl);"></wa-divider>
<div class="wa-stack wa-gap-xl" id="colophon">
<div class="wa-stack wa-gap-xs">
{% include "logo-simple.njk" %}
<h2 class="wa-heading-s">Web Awesome</h2>
<p class="wa-caption-xs wa-cluster wa-gap-xs">
Version {{ package.version }}
<wa-icon id="version-icon-info" family="duotone" variant="regular" name="party-horn"></wa-icon>
<wa-tooltip for="version-icon-info" distance="2" class="wa-font-size-xs">Here be freshly launched Awesome and no wa-dragons</wa-tooltip>
</p>
<p class="wa-caption-xs">&copy; Fonticons, Inc.</p>
<div class="wa-cluster wa-gap-xs">
<h2 class="wa-heading-xs">Web Awesome</h2>
<wa-badge id="version-beta-badge" variant="orange" appearance="filled" style="font-size: var(--wa-font-size-2xs);">Beta</wa-badge>
<wa-tooltip for="version-beta-badge" distance="2" style="font-size: var(--wa-font-size-xs);">Here be freshly made Awesome&hellip; and possible dragons</wa-tooltip>
</div>
<p class="wa-caption-s">Version {{ package.version }}</p>
<p class="wa-caption-s">&copy; Fonticons, Inc.</p>
</div>
<div class="wa-cluster wa-gap-0 wa-caption-xs the-socials">
<div class="wa-cluster wa-gap-0 wa-caption-s the-socials">
<h2 class="wa-visually-hidden">Web Awesome Elsewhere</h2>
<a href="https://github.com/shoelace-style/webawesome" rel="noopener noreferrer" target="_blank" class="appearance-plain">
<wa-icon family="brands" name="github" label="GitHub"></wa-icon>

View File

@@ -33,11 +33,11 @@
<th><code>filled</code> + <code>outlined</code></th>
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-badge variant="brand" appearance="filled-outlined">Brand</wa-badge>
<wa-badge variant="neutral" appearance="filled-outlined">Neutral</wa-badge>
<wa-badge variant="success" appearance="filled-outlined">Success</wa-badge>
<wa-badge variant="warning" appearance="filled-outlined">Warning</wa-badge>
<wa-badge variant="danger" appearance="filled-outlined">Danger</wa-badge>
<wa-badge variant="brand" appearance="filled outlined">Brand</wa-badge>
<wa-badge variant="neutral" appearance="filled outlined">Neutral</wa-badge>
<wa-badge variant="success" appearance="filled outlined">Success</wa-badge>
<wa-badge variant="warning" appearance="filled outlined">Warning</wa-badge>
<wa-badge variant="danger" appearance="filled outlined">Danger</wa-badge>
</div>
</td>
<td>
@@ -174,11 +174,11 @@
<th><code>filled</code> + <code>outlined</code></th>
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-button variant="brand" appearance="filled-outlined">Brand</wa-button>
<wa-button variant="neutral" appearance="filled-outlined">Neutral</wa-button>
<wa-button variant="success" appearance="filled-outlined">Success</wa-button>
<wa-button variant="warning" appearance="filled-outlined">Warning</wa-button>
<wa-button variant="danger" appearance="filled-outlined">Danger</wa-button>
<wa-button variant="brand" appearance="filled outlined">Brand</wa-button>
<wa-button variant="neutral" appearance="filled outlined">Neutral</wa-button>
<wa-button variant="success" appearance="filled outlined">Success</wa-button>
<wa-button variant="warning" appearance="filled outlined">Warning</wa-button>
<wa-button variant="danger" appearance="filled outlined">Danger</wa-button>
</div>
</td>
<td>
@@ -375,23 +375,23 @@
<th><code>filled</code> + <code>outlined</code></th>
<td>
<div class="wa-grid wa-gap-2xs">
<wa-callout variant="brand" appearance="filled-outlined">
<wa-callout variant="brand" appearance="filled outlined">
<wa-icon slot="icon" name="circle-star"></wa-icon>
Brand
</wa-callout>
<wa-callout variant="neutral" appearance="filled-outlined">
<wa-callout variant="neutral" appearance="filled outlined">
<wa-icon slot="icon" name="circle-info"></wa-icon>
Neutral
</wa-callout>
<wa-callout variant="success" appearance="filled-outlined">
<wa-callout variant="success" appearance="filled outlined">
<wa-icon slot="icon" name="circle-check"></wa-icon>
Success
</wa-callout>
<wa-callout variant="warning" appearance="filled-outlined">
<wa-callout variant="warning" appearance="filled outlined">
<wa-icon slot="icon" name="circle-exclamation"></wa-icon>
Warning
</wa-callout>
<wa-callout variant="danger" appearance="filled-outlined">
<wa-callout variant="danger" appearance="filled outlined">
<wa-icon slot="icon" name="circle-xmark"></wa-icon>
Danger
</wa-callout>
@@ -636,11 +636,11 @@
<th><code>filled</code> + <code>outlined</code></th>
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-tag variant="brand" appearance="filled-outlined">Brand</wa-tag>
<wa-tag variant="neutral" appearance="filled-outlined">Neutral</wa-tag>
<wa-tag variant="success" appearance="filled-outlined">Success</wa-tag>
<wa-tag variant="warning" appearance="filled-outlined">Warning</wa-tag>
<wa-tag variant="danger" appearance="filled-outlined">Danger</wa-tag>
<wa-tag variant="brand" appearance="filled outlined">Brand</wa-tag>
<wa-tag variant="neutral" appearance="filled outlined">Neutral</wa-tag>
<wa-tag variant="success" appearance="filled outlined">Success</wa-tag>
<wa-tag variant="warning" appearance="filled outlined">Warning</wa-tag>
<wa-tag variant="danger" appearance="filled outlined">Danger</wa-tag>
</div>
</td>
<td>
@@ -775,4 +775,4 @@
</tr>
</tbody>
</table>
</div>
</div>

View File

@@ -13,7 +13,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-badge variant="brand" appearance="accent">Accent</wa-badge>
<wa-badge variant="brand" appearance="filled-outlined">Filled-Outlined</wa-badge>
<wa-badge variant="brand" appearance="filled outlined">Filled + Outlined</wa-badge>
<wa-badge variant="brand" appearance="filled">Filled</wa-badge>
<wa-badge variant="brand" appearance="outlined">Outlined</wa-badge>
</div>
@@ -21,7 +21,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-badge class="wa-brand" appearance="accent">Accent</wa-badge>
<wa-badge class="wa-brand" appearance="filled-outlined">Filled-Outlined</wa-badge>
<wa-badge class="wa-brand" appearance="filled outlined">Filled + Outlined</wa-badge>
<wa-badge class="wa-brand" appearance="filled">Filled</wa-badge>
<wa-badge class="wa-brand" appearance="outlined">Outlined</wa-badge>
</div>
@@ -32,7 +32,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-badge variant="neutral" appearance="accent">Accent</wa-badge>
<wa-badge variant="neutral" appearance="filled-outlined">Filled-Outlined</wa-badge>
<wa-badge variant="neutral" appearance="filled outlined">Filled + Outlined</wa-badge>
<wa-badge variant="neutral" appearance="filled">Filled</wa-badge>
<wa-badge variant="neutral" appearance="outlined">Outlined</wa-badge>
</div>
@@ -40,7 +40,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-badge class="wa-neutral" appearance="accent">Accent</wa-badge>
<wa-badge class="wa-neutral" appearance="filled-outlined">Filled-Outlined</wa-badge>
<wa-badge class="wa-neutral" appearance="filled outlined">Filled + Outlined</wa-badge>
<wa-badge class="wa-neutral" appearance="filled">Filled</wa-badge>
<wa-badge class="wa-neutral" appearance="outlined">Outlined</wa-badge>
</div>
@@ -51,7 +51,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-badge variant="success" appearance="accent">Accent</wa-badge>
<wa-badge variant="success" appearance="filled-outlined">Filled-Outlined</wa-badge>
<wa-badge variant="success" appearance="filled outlined">Filled + Outlined</wa-badge>
<wa-badge variant="success" appearance="filled">Filled</wa-badge>
<wa-badge variant="success" appearance="outlined">Outlined</wa-badge>
</div>
@@ -59,7 +59,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-badge class="wa-success" appearance="accent">Accent</wa-badge>
<wa-badge class="wa-success" appearance="filled-outlined">Filled-Outlined</wa-badge>
<wa-badge class="wa-success" appearance="filled outlined">Filled + Outlined</wa-badge>
<wa-badge class="wa-success" appearance="filled">Filled</wa-badge>
<wa-badge class="wa-success" appearance="outlined">Outlined</wa-badge>
</div>
@@ -70,7 +70,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-badge variant="warning" appearance="accent">Accent</wa-badge>
<wa-badge variant="warning" appearance="filled-outlined">Filled-Outlined</wa-badge>
<wa-badge variant="warning" appearance="filled outlined">Filled + Outlined</wa-badge>
<wa-badge variant="warning" appearance="filled">Filled</wa-badge>
<wa-badge variant="warning" appearance="outlined">Outlined</wa-badge>
</div>
@@ -78,7 +78,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-badge class="wa-warning" appearance="accent">Accent</wa-badge>
<wa-badge class="wa-warning" appearance="filled-outlined">Filled-Outlined</wa-badge>
<wa-badge class="wa-warning" appearance="filled outlined">Filled + Outlined</wa-badge>
<wa-badge class="wa-warning" appearance="filled">Filled</wa-badge>
<wa-badge class="wa-warning" appearance="outlined">Outlined</wa-badge>
</div>
@@ -89,7 +89,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-badge variant="danger" appearance="accent">Accent</wa-badge>
<wa-badge variant="danger" appearance="filled-outlined">Filled-Outlined</wa-badge>
<wa-badge variant="danger" appearance="filled outlined">Filled + Outlined</wa-badge>
<wa-badge variant="danger" appearance="filled">Filled</wa-badge>
<wa-badge variant="danger" appearance="outlined">Outlined</wa-badge>
</div>
@@ -97,7 +97,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-badge class="wa-danger" appearance="accent">Accent</wa-badge>
<wa-badge class="wa-danger" appearance="filled-outlined">Filled-Outlined</wa-badge>
<wa-badge class="wa-danger" appearance="filled outlined">Filled + Outlined</wa-badge>
<wa-badge class="wa-danger" appearance="filled">Filled</wa-badge>
<wa-badge class="wa-danger" appearance="outlined">Outlined</wa-badge>
</div>
@@ -123,7 +123,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-button variant="brand" appearance="accent">Accent</wa-button>
<wa-button variant="brand" appearance="filled-outlined">Filled-Outlined</wa-button>
<wa-button variant="brand" appearance="filled outlined">Filled + Outlined</wa-button>
<wa-button variant="brand" appearance="filled">Filled</wa-button>
<wa-button variant="brand" appearance="outlined">Outlined</wa-button>
<wa-button variant="brand" appearance="plain">Plain</wa-button>
@@ -132,7 +132,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-button class="wa-brand" appearance="accent">Accent</wa-button>
<wa-button class="wa-brand" appearance="filled-outlined">Filled-Outlined</wa-button>
<wa-button class="wa-brand" appearance="filled outlined">Filled + Outlined</wa-button>
<wa-button class="wa-brand" appearance="filled">Filled</wa-button>
<wa-button class="wa-brand" appearance="outlined">Outlined</wa-button>
<wa-button class="wa-brand" appearance="plain">Plain</wa-button>
@@ -144,7 +144,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-button variant="neutral" appearance="accent">Accent</wa-button>
<wa-button variant="neutral" appearance="filled-outlined">Filled-Outlined</wa-button>
<wa-button variant="neutral" appearance="filled outlined">Filled + Outlined</wa-button>
<wa-button variant="neutral" appearance="filled">Filled</wa-button>
<wa-button variant="neutral" appearance="outlined">Outlined</wa-button>
<wa-button variant="neutral" appearance="plain">Plain</wa-button>
@@ -153,7 +153,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-button class="wa-neutral" appearance="accent">Accent</wa-button>
<wa-button class="wa-neutral" appearance="filled-outlined">Filled-Outlined</wa-button>
<wa-button class="wa-neutral" appearance="filled outlined">Filled + Outlined</wa-button>
<wa-button class="wa-neutral" appearance="filled">Filled</wa-button>
<wa-button class="wa-neutral" appearance="outlined">Outlined</wa-button>
<wa-button class="wa-neutral" appearance="plain">Plain</wa-button>
@@ -165,7 +165,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-button variant="success" appearance="accent">Accent</wa-button>
<wa-button variant="success" appearance="filled-outlined">Filled-Outlined</wa-button>
<wa-button variant="success" appearance="filled outlined">Filled + Outlined</wa-button>
<wa-button variant="success" appearance="filled">Filled</wa-button>
<wa-button variant="success" appearance="outlined">Outlined</wa-button>
<wa-button variant="success" appearance="plain">Plain</wa-button>
@@ -174,7 +174,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-button class="wa-success" appearance="accent">Accent</wa-button>
<wa-button class="wa-success" appearance="filled-outlined">Filled-Outlined</wa-button>
<wa-button class="wa-success" appearance="filled outlined">Filled + Outlined</wa-button>
<wa-button class="wa-success" appearance="filled">Filled</wa-button>
<wa-button class="wa-success" appearance="outlined">Outlined</wa-button>
<wa-button class="wa-success" appearance="plain">Plain</wa-button>
@@ -186,7 +186,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-button variant="warning" appearance="accent">Accent</wa-button>
<wa-button variant="warning" appearance="filled-outlined">Filled-Outlined</wa-button>
<wa-button variant="warning" appearance="filled outlined">Filled + Outlined</wa-button>
<wa-button variant="warning" appearance="filled">Filled</wa-button>
<wa-button variant="warning" appearance="outlined">Outlined</wa-button>
<wa-button variant="warning" appearance="plain">Plain</wa-button>
@@ -195,7 +195,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-button class="wa-warning" appearance="accent">Accent</wa-button>
<wa-button class="wa-warning" appearance="filled-outlined">Filled-Outlined</wa-button>
<wa-button class="wa-warning" appearance="filled outlined">Filled + Outlined</wa-button>
<wa-button class="wa-warning" appearance="filled">Filled</wa-button>
<wa-button class="wa-warning" appearance="outlined">Outlined</wa-button>
<wa-button class="wa-warning" appearance="plain">Plain</wa-button>
@@ -207,7 +207,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-button variant="danger" appearance="accent">Accent</wa-button>
<wa-button variant="danger" appearance="filled-outlined">Filled-Outlined</wa-button>
<wa-button variant="danger" appearance="filled outlined">Filled + Outlined</wa-button>
<wa-button variant="danger" appearance="filled">Filled</wa-button>
<wa-button variant="danger" appearance="outlined">Outlined</wa-button>
<wa-button variant="danger" appearance="plain">Plain</wa-button>
@@ -216,7 +216,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-button class="wa-danger" appearance="accent">Accent</wa-button>
<wa-button class="wa-danger" appearance="filled-outlined">Filled-Outlined</wa-button>
<wa-button class="wa-danger" appearance="filled outlined">Filled + Outlined</wa-button>
<wa-button class="wa-danger" appearance="filled">Filled</wa-button>
<wa-button class="wa-danger" appearance="outlined">Outlined</wa-button>
<wa-button class="wa-danger" appearance="plain">Plain</wa-button>
@@ -246,9 +246,9 @@
<wa-icon slot="icon" name="circle-star"></wa-icon>
Accent
</wa-callout>
<wa-callout variant="brand" appearance="filled-outlined">
<wa-callout variant="brand" appearance="filled outlined">
<wa-icon slot="icon" name="circle-star"></wa-icon>
Filled-Outlined
Filled + Outlined
</wa-callout>
<wa-callout variant="brand" appearance="filled">
<wa-icon slot="icon" name="circle-star"></wa-icon>
@@ -270,9 +270,9 @@
<wa-icon slot="icon" name="circle-star"></wa-icon>
Accent
</wa-callout>
<wa-callout class="wa-brand" appearance="filled-outlined">
<wa-callout class="wa-brand" appearance="filled outlined">
<wa-icon slot="icon" name="circle-star"></wa-icon>
Filled-Outlined
Filled + Outlined
</wa-callout>
<wa-callout class="wa-brand" appearance="filled">
<wa-icon slot="icon" name="circle-star"></wa-icon>
@@ -297,9 +297,9 @@
<wa-icon slot="icon" name="circle-info"></wa-icon>
Accent
</wa-callout>
<wa-callout variant="neutral" appearance="filled-outlined">
<wa-callout variant="neutral" appearance="filled outlined">
<wa-icon slot="icon" name="circle-info"></wa-icon>
Filled-Outlined
Filled + Outlined
</wa-callout>
<wa-callout variant="neutral" appearance="filled">
<wa-icon slot="icon" name="circle-info"></wa-icon>
@@ -321,9 +321,9 @@
<wa-icon slot="icon" name="circle-info"></wa-icon>
Accent
</wa-callout>
<wa-callout class="wa-neutral" appearance="filled-outlined">
<wa-callout class="wa-neutral" appearance="filled outlined">
<wa-icon slot="icon" name="circle-info"></wa-icon>
Filled-Outlined
Filled + Outlined
</wa-callout>
<wa-callout class="wa-neutral" appearance="filled">
<wa-icon slot="icon" name="circle-info"></wa-icon>
@@ -348,9 +348,9 @@
<wa-icon slot="icon" name="circle-check"></wa-icon>
Accent
</wa-callout>
<wa-callout variant="success" appearance="filled-outlined">
<wa-callout variant="success" appearance="filled outlined">
<wa-icon slot="icon" name="circle-check"></wa-icon>
Filled-Outlined
Filled + Outlined
</wa-callout>
<wa-callout variant="success" appearance="filled">
<wa-icon slot="icon" name="circle-check"></wa-icon>
@@ -372,9 +372,9 @@
<wa-icon slot="icon" name="circle-check"></wa-icon>
Accent
</wa-callout>
<wa-callout class="wa-success" appearance="filled-outlined">
<wa-callout class="wa-success" appearance="filled outlined">
<wa-icon slot="icon" name="circle-check"></wa-icon>
Filled-Outlined
Filled + Outlined
</wa-callout>
<wa-callout class="wa-success" appearance="filled">
<wa-icon slot="icon" name="circle-check"></wa-icon>
@@ -399,9 +399,9 @@
<wa-icon slot="icon" name="circle-exclamation"></wa-icon>
Accent
</wa-callout>
<wa-callout variant="warning" appearance="filled-outlined">
<wa-callout variant="warning" appearance="filled outlined">
<wa-icon slot="icon" name="circle-exclamation"></wa-icon>
Filled-Outlined
Filled + Outlined
</wa-callout>
<wa-callout variant="warning" appearance="filled">
<wa-icon slot="icon" name="circle-exclamation"></wa-icon>
@@ -423,9 +423,9 @@
<wa-icon slot="icon" name="circle-exclamation"></wa-icon>
Accent
</wa-callout>
<wa-callout class="wa-warning" appearance="filled-outlined">
<wa-callout class="wa-warning" appearance="filled outlined">
<wa-icon slot="icon" name="circle-exclamation"></wa-icon>
Filled-Outlined
Filled + Outlined
</wa-callout>
<wa-callout class="wa-warning" appearance="filled">
<wa-icon slot="icon" name="circle-exclamation"></wa-icon>
@@ -450,9 +450,9 @@
<wa-icon slot="icon" name="circle-xmark"></wa-icon>
Accent
</wa-callout>
<wa-callout variant="danger" appearance="filled-outlined">
<wa-callout variant="danger" appearance="filled outlined">
<wa-icon slot="icon" name="circle-xmark"></wa-icon>
Filled-Outlined
Filled + Outlined
</wa-callout>
<wa-callout variant="danger" appearance="filled">
<wa-icon slot="icon" name="circle-xmark"></wa-icon>
@@ -474,9 +474,9 @@
<wa-icon slot="icon" name="circle-xmark"></wa-icon>
Accent
</wa-callout>
<wa-callout class="wa-danger" appearance="filled-outlined">
<wa-callout class="wa-danger" appearance="filled outlined">
<wa-icon slot="icon" name="circle-xmark"></wa-icon>
Filled-Outlined
Filled + Outlined
</wa-callout>
<wa-callout class="wa-danger" appearance="filled">
<wa-icon slot="icon" name="circle-xmark"></wa-icon>
@@ -513,7 +513,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-tag variant="brand" appearance="accent">Accent</wa-tag>
<wa-tag variant="brand" appearance="filled-outlined">Filled-Outlined</wa-tag>
<wa-tag variant="brand" appearance="filled outlined">Filled + Outlined</wa-tag>
<wa-tag variant="brand" appearance="filled">Filled</wa-tag>
<wa-tag variant="brand" appearance="outlined">Outlined</wa-tag>
</div>
@@ -521,7 +521,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-tag class="wa-brand" appearance="accent">Accent</wa-tag>
<wa-tag class="wa-brand" appearance="filled-outlined">Filled-Outlined</wa-tag>
<wa-tag class="wa-brand" appearance="filled outlined">Filled + Outlined</wa-tag>
<wa-tag class="wa-brand" appearance="filled">Filled</wa-tag>
<wa-tag class="wa-brand" appearance="outlined">Outlined</wa-tag>
</div>
@@ -532,7 +532,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-tag variant="neutral" appearance="accent">Accent</wa-tag>
<wa-tag variant="neutral" appearance="filled-outlined">Filled-Outlined</wa-tag>
<wa-tag variant="neutral" appearance="filled outlined">Filled + Outlined</wa-tag>
<wa-tag variant="neutral" appearance="filled">Filled</wa-tag>
<wa-tag variant="neutral" appearance="outlined">Outlined</wa-tag>
</div>
@@ -540,7 +540,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-tag class="wa-neutral" appearance="accent">Accent</wa-tag>
<wa-tag class="wa-neutral" appearance="filled-outlined">Filled-Outlined</wa-tag>
<wa-tag class="wa-neutral" appearance="filled outlined">Filled + Outlined</wa-tag>
<wa-tag class="wa-neutral" appearance="filled">Filled</wa-tag>
<wa-tag class="wa-neutral" appearance="outlined">Outlined</wa-tag>
</div>
@@ -551,7 +551,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-tag variant="success" appearance="accent">Accent</wa-tag>
<wa-tag variant="success" appearance="filled-outlined">Filled-Outlined</wa-tag>
<wa-tag variant="success" appearance="filled outlined">Filled + Outlined</wa-tag>
<wa-tag variant="success" appearance="filled">Filled</wa-tag>
<wa-tag variant="success" appearance="outlined">Outlined</wa-tag>
</div>
@@ -559,7 +559,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-tag class="wa-success" appearance="accent">Accent</wa-tag>
<wa-tag class="wa-success" appearance="filled-outlined">Filled-Outlined</wa-tag>
<wa-tag class="wa-success" appearance="filled outlined">Filled + Outlined</wa-tag>
<wa-tag class="wa-success" appearance="filled">Filled</wa-tag>
<wa-tag class="wa-success" appearance="outlined">Outlined</wa-tag>
</div>
@@ -570,7 +570,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-tag variant="warning" appearance="accent">Accent</wa-tag>
<wa-tag variant="warning" appearance="filled-outlined">Filled-Outlined</wa-tag>
<wa-tag variant="warning" appearance="filled outlined">Filled + Outlined</wa-tag>
<wa-tag variant="warning" appearance="filled">Filled</wa-tag>
<wa-tag variant="warning" appearance="outlined">Outlined</wa-tag>
</div>
@@ -578,7 +578,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-tag class="wa-warning" appearance="accent">Accent</wa-tag>
<wa-tag class="wa-warning" appearance="filled-outlined">Filled-Outlined</wa-tag>
<wa-tag class="wa-warning" appearance="filled outlined">Filled + Outlined</wa-tag>
<wa-tag class="wa-warning" appearance="filled">Filled</wa-tag>
<wa-tag class="wa-warning" appearance="outlined">Outlined</wa-tag>
</div>
@@ -589,7 +589,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-tag variant="danger" appearance="accent">Accent</wa-tag>
<wa-tag variant="danger" appearance="filled-outlined">Filled-Outlined</wa-tag>
<wa-tag variant="danger" appearance="filled outlined">Filled + Outlined</wa-tag>
<wa-tag variant="danger" appearance="filled">Filled</wa-tag>
<wa-tag variant="danger" appearance="outlined">Outlined</wa-tag>
</div>
@@ -597,7 +597,7 @@
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-tag class="wa-danger" appearance="accent">Accent</wa-tag>
<wa-tag class="wa-danger" appearance="filled-outlined">Filled-Outlined</wa-tag>
<wa-tag class="wa-danger" appearance="filled outlined">Filled + Outlined</wa-tag>
<wa-tag class="wa-danger" appearance="filled">Filled</wa-tag>
<wa-tag class="wa-danger" appearance="outlined">Outlined</wa-tag>
</div>

View File

@@ -39,14 +39,14 @@
</td>
</tr>
<tr>
<th><code>filled-outlined</code></th>
<th><code>filled</code> + <code>outlined</code></th>
<td>
<div class="wa-cluster wa-gap-2xs">
<wa-button variant="brand" appearance="filled-outlined">Brand</wa-button>
<wa-button variant="neutral" appearance="filled-outlined">Neutral</wa-button>
<wa-button variant="success" appearance="filled-outlined">Success</wa-button>
<wa-button variant="warning" appearance="filled-outlined">Warning</wa-button>
<wa-button variant="danger" appearance="filled-outlined">Danger</wa-button>
<wa-button variant="brand" appearance="filled outlined">Brand</wa-button>
<wa-button variant="neutral" appearance="filled outlined">Neutral</wa-button>
<wa-button variant="success" appearance="filled outlined">Success</wa-button>
<wa-button variant="warning" appearance="filled outlined">Warning</wa-button>
<wa-button variant="danger" appearance="filled outlined">Danger</wa-button>
</div>
</td>
<td>
@@ -429,7 +429,7 @@
</wa-select>
</td>
<td>
<label>Select
<label>Select
<select value="1">
<option value="1">Option</option>
</select>
@@ -444,7 +444,7 @@
</wa-select>
</td>
<td>
<label>Select (filled)
<label>Select (filled)
<select class="wa-filled" value="1">
<option value="1">Option</option>
</select>
@@ -459,7 +459,7 @@
</wa-select>
</td>
<td>
<label class="wa-size-s">Select (small)
<label class="wa-size-s">Select (small)
<select value="1">
<option value="1">Option</option>
</select>
@@ -474,7 +474,7 @@
</wa-select>
</td>
<td>
<label class="wa-size-m">Select (medium)
<label class="wa-size-m">Select (medium)
<select value="1">
<option value="1">Option</option>
</select>
@@ -489,7 +489,7 @@
</wa-select>
</td>
<td>
<label class="wa-size-l">Select (large)
<label class="wa-size-l">Select (large)
<select value="1">
<option value="1">Option</option>
</select>
@@ -582,4 +582,4 @@
</tr>
</tbody>
</table>
</div>
</div>

View File

@@ -297,11 +297,11 @@
<div class="component-help">
<strong>Need a hand?</strong>
<wa-button size="small" appearance="filled" variant="neutral" href="https://github.com/shoelace-style/webawesome/issues" target="_blank">
<wa-icon slot="start" variant="regular" name="bug"></wa-icon>
<wa-icon slot="prefix" name="bug"></wa-icon>
Report a bug
</wa-button>
<wa-button size="small" appearance="filled" variant="neutral" href="https://github.com/shoelace-style/webawesome/discussions" target="_blank">
<wa-icon slot="start" variant="regular" name="message-question"></wa-icon>
<wa-icon slot="prefix" name="message-question"></wa-icon>
Ask for help
</wa-button>
</div>

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -0,0 +1,178 @@
import { deepEach, deepGet, deepSet } from './util/deep.js';
import { camelCase, kebabCase } from './util/string.js';
export default class Permalink extends URLSearchParams {
/** Params changed since last URL I/O */
changed = false;
constructor(params) {
super(location.search);
this.params = params;
}
toJSON() {
return Object.fromEntries(this.entries());
}
/**
* Set multiple values from an object. Nested values will be joined with a hyphen.
* @param {object} values - The object containing the values to set.
* @param {object} defaults - The object containing the default values.
*
*/
setAll(values, defaults) {
deepEach(values, (value, key, parent, path) => {
let fullPath = [...path, key];
let param = fullPath.map(kebabCase).join('-');
if (typeof value === 'object') {
// We'll handle this when we descend into it
return;
}
let defaultValue = deepGet(defaults, fullPath);
if (equals(value, defaultValue)) {
// Remove the param from the URL
this.delete(param);
return;
}
this.set(param, value);
});
}
/**
* Convert the URL params to a (potentially nested) object.
* @param {object} options - Options object.
* @param {(key: string, value: string) => string[]} options.getPath - Function to get the path of a param.
* @returns {object} The nested object.
*/
toObject(options = {}) {
// Default getPath() assumes hyphens always mean nesting
let { ignoreKeys = [], getPath = param => param.split('-') } = options;
// Get all values as a nested object
let obj = {};
for (let [key, value] of this.entries()) {
let path = getPath(key, value);
if (path === null || ignoreKeys.includes(key)) {
// Skip this param
continue;
}
// Default to key if `getPath()` returns undefined
path ??= key;
path = Array.isArray(path) ? path : [path];
// Camel case any remaining hyphens
path = path.map(camelCase);
deepSet(obj, path, value);
}
return obj;
}
delete(key, value) {
let hadValue = this.has(key);
super.delete(key, value);
if (hadValue) {
this.changed = true;
}
}
set(key, value, defaultValue) {
if (equals(value, defaultValue) || equals(value, '')) {
value = null;
}
value ??= null; // undefined -> null
let oldValue = Array.isArray(value) ? this.getAll(key) : this.get(key);
let changed = !equals(value, oldValue);
if (!changed) {
// Nothing to do here
return;
}
if (Array.isArray(value)) {
super.delete(key);
value = value.slice();
for (let v of value) {
if (v || v === 0) {
if (typeof v === 'object') {
super.append(key, JSON.stringify(v));
} else {
super.append(key, v);
}
}
}
} else if (value === null) {
super.delete(key);
} else {
super.set(key, value);
}
this.sort();
this.changed ||= changed;
}
/**
* Update page URL if it has changed since last time
*/
updateLocation() {
if (this.changed) {
// If theres already a search, replace it.
// We dont want to clog the users history while they iterate
let search = this.toString();
let historyAction = location.search && search ? 'replaceState' : 'pushState';
history[historyAction](null, '', `?${search}`);
this.changed = false;
}
}
}
function equals(value, oldValue) {
if (Array.isArray(value) || Array.isArray(oldValue)) {
value = toArray(value);
oldValue = toArray(oldValue);
if (value.length !== oldValue.length) {
return false;
}
return value.every((v, i) => equals(v, oldValue[i]));
}
// (value ?? oldValue ?? true) returns true if they're both empty (null or undefined)
[value, oldValue] = [value, oldValue].map(v => (!v && v !== false && v !== 0 ? null : v));
return value === oldValue || String(value) === String(oldValue);
}
/**
* Convert a value to an array. `undefined` and `null` values are converted to an empty array.
* @param {*} value - The value to convert.
* @returns {any[]} The converted array.
*/
function toArray(value) {
value ??= [];
if (Array.isArray(value)) {
return value;
}
// Don't convert "foo" into ["f", "o", "o"]
if (typeof value !== 'string' && typeof value[Symbol.iterator] === 'function') {
return Array.from(value);
}
return [value];
}

View File

@@ -34,8 +34,7 @@ document.addEventListener('click', event => {
top: target.offsetTop - headerHeight,
behavior: 'smooth',
});
history.replaceState(history.state, '', `#${id}`);
history.pushState(undefined, undefined, `#${id}`);
}
}
});

View File

@@ -38,7 +38,7 @@ async function updateTheme(value, isInitialLoad = false) {
// Handle site theme vs regular theme
let href = `/dist/styles/themes/${value}.css`;
if (document.querySelector('wa-page')?.dataset.pageType === 'site') {
if (document.querySelector('wa-page').dataset.pageType === 'site') {
brand = 'orange';
href = `/assets/styles/theme-site.css`;
palette = 'default';

View File

@@ -2,25 +2,22 @@
pre[id*='code-block-'] {
color-scheme: dark;
color: white;
background-color: var(--code-background, var(--wa-color-neutral-20));
background-color: var(--wa-color-neutral-20);
/* Ensures a discernible background color in dark mode
* Useful for themes that use gray-20 as --wa-color-surface-default */
.wa-dark & {
background-color: var(--code-background-dark, var(--wa-color-surface-lowered));
background-color: var(--wa-color-surface-lowered);
}
}
.code-comment,
.code-prolog,
.code-doctype,
.code-cdata {
color: var(--code-comment, var(--wa-color-gray-70));
}
.code-cdata,
.code-operator,
.code-punctuation {
color: var(--code-operator, var(--wa-color-gray-70));
color: var(--wa-color-gray-70);
}
.code-namespace {
@@ -31,27 +28,24 @@ pre[id*='code-block-'] {
.code-keyword,
.code-tag,
.code-url {
color: var(--code-keyword, var(--wa-color-indigo-70));
color: var(--wa-color-indigo-70);
}
.code-symbol,
.code-deleted,
.code-important {
color: var(--code-error, var(--wa-color-red-70));
}
.code-string,
.code-char,
.code-constant {
color: var(--code-string, var(--wa-color-green-70));
color: var(--wa-color-red-70);
}
.code-boolean,
.code-constant,
.code-selector,
.code-attr-name,
.code-string,
.code-char,
.code-builtin,
.code-inserted {
color: var(--code-literal, var(--wa-color-green-70));
color: var(--wa-color-green-70);
}
.code-atrule,
@@ -61,7 +55,7 @@ pre[id*='code-block-'] {
.code-function,
.code-class-name,
.code-regex {
color: var(--code-value, var(--wa-color-blue-70));
color: var(--wa-color-blue-70);
}
.code-important,

View File

@@ -15,25 +15,24 @@ pre[id*='code-block-']:has(code) {
}
wa-copy-button.copy-button {
--background-color: var(--wa-color-gray-20);
--background-color-hover: color-mix(in oklab, var(--background-color), white 5%);
position: absolute;
top: 0.5rem;
right: 0.5rem;
top: 0.25rem;
right: 0.25rem;
font-family: var(--wa-font-family-body);
font-size: var(--wa-font-size-m);
color: white;
color: var(--wa-color-gray-80);
border-radius: var(--wa-border-radius-m);
padding: 0.25rem;
&::part(button) {
aspect-ratio: 1;
background-color: var(--wa-color-neutral-20);
background: transparent;
cursor: copy;
}
@media (hover: hover) {
&:hover {
&::part(button) {
background-color: var(--wa-color-neutral-30);
}
color: white;
}
}

View File

@@ -205,12 +205,6 @@ wa-page > header {
}
}
}
#version-icon-info {
--secondary-opacity: 1;
--secondary-color: var(--wa-brand-orange);
padding-inline: var(--wa-space-xs);
}
}
wa-button.delete {
@@ -252,9 +246,8 @@ wa-button.delete {
padding-bottom: 1rem;
}
wa-page::part(drawer__dialog),
wa-page::part(menu) {
overflow: clip;
scrollbar-width: thin;
}
/* smaller viewports-based navigation */
@@ -387,27 +380,6 @@ h1.title {
}
}
/* Images & Figures */
figure.signpost {
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
gap: var(--wa-space-s);
img {
border: var(--wa-border-style) var(--wa-border-width-m) var(--wa-color-surface-border);
}
figcaption {
color: var(--wa-color-text-quiet);
font-size: var(--wa-font-size-xs);
line-height: var(--wa-line-height-condensed);
text-align: center;
}
}
/* Search list pages */
wa-page > main:has(> .search-list) {
max-width: var(--content-width-l);

View File

@@ -109,98 +109,9 @@
line-height: var(--wa-form-control-value-line-height);
padding-inline: 0.33em;
}
/* step icons for ordered instructions */
.step-icon {
--primary-color: var(--wa-color-neutral-20);
--secondary-color: var(--wa-color-neutral-80);
--secondary-opacity: 1;
font-size: 2em;
.wa-dark & {
--primary-color: var(--wa-color-neutral-90);
--secondary-color: var(--wa-color-neutral-30);
}
}
/* #endregion */
/* #region funsies + cosmetics */
/* grid background */
.background-grid {
--grid-spacing: var(--wa-space-2xl);
--grid-line-color: color-mix(in oklab, var(--wa-color-text-normal), transparent 90%);
--grid-line-width: var(--wa-border-width-s);
--subgrid-spacing: calc(var(--grid-spacing) / 2);
--subgrid-line-color: color-mix(in oklab, var(--wa-color-text-normal), transparent 95%);
--subgrid-line-width: var(--wa-border-width-s);
background-image:
/* main grid - vertical lines */
linear-gradient(to right, var(--grid-line-color) var(--grid-line-width), transparent var(--grid-line-width)),
/* main grid - horizontal lines */
linear-gradient(to bottom, var(--grid-line-color) var(--grid-line-width), transparent var(--grid-line-width)),
/* sub-grid - vertical lines (offset by half the main grid spacing) */
linear-gradient(
to right,
var(--subgrid-line-color) var(--subgrid-line-width),
transparent var(--subgrid-line-width)
),
/* sub-grid - horizontal lines (offset by half the main grid spacing) */
linear-gradient(
to bottom,
var(--subgrid-line-color) var(--subgrid-line-width),
transparent var(--subgrid-line-width)
);
background-size:
var(--grid-spacing) var(--grid-spacing),
var(--grid-spacing) var(--grid-spacing),
var(--subgrid-spacing) var(--subgrid-spacing),
var(--subgrid-spacing) var(--subgrid-spacing);
background-position:
0 0,
0 0,
calc(var(--grid-spacing) / 2) calc(var(--grid-spacing) / 2),
calc(var(--grid-spacing) / 2) calc(var(--grid-spacing) / 2);
}
/* dot grid background */
.background-dot-grid {
--dot-spacing: 1.5rem;
--dot-radius: 1.5px;
--dot-color: color-mix(in oklab, var(--wa-color-text-normal), transparent 85%);
background-image: radial-gradient(circle, var(--dot-color) var(--dot-radius), transparent var(--dot-radius));
background-size: var(--dot-spacing) var(--dot-spacing);
}
/* wa illustration background pattern */
.background-wa-pattern {
position: relative;
& > * {
position: relative;
z-index: 1;
}
&::after {
--background-pattern-image: url('/assets/images/bg-wa-pattern.svg');
position: absolute;
inset: 0;
background-color: var(--background-pattern-color, transparent);
background-image: var(--background-pattern-image);
background-repeat: repeat;
content: '';
opacity: var(--background-pattern-opacity, 0.3);
z-index: 0;
}
}
/* #endregion */
/* #region funsies */
/* buttons with icon toggle on hover */
wa-button .icon-hover {
display: none;

View File

@@ -121,6 +121,7 @@ layout: page
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: var(--wa-space-s);
}
&::part(form-control-label) {

View File

@@ -30,31 +30,31 @@ Use the `appearance` attribute to change the badge's visual appearance.
```html {.example}
<div style="margin-block-end: 1rem;">
<wa-badge appearance="accent" variant="neutral">Accent</wa-badge>
<wa-badge appearance="filled-outlined" variant="neutral">Filled-Outlined</wa-badge>
<wa-badge appearance="filled outlined" variant="neutral">Filled + Outlined</wa-badge>
<wa-badge appearance="filled" variant="neutral">Filled</wa-badge>
<wa-badge appearance="outlined" variant="neutral">Outlined</wa-badge>
</div>
<div style="margin-block-end: 1rem;">
<wa-badge appearance="accent" variant="brand">Accent</wa-badge>
<wa-badge appearance="filled-outlined" variant="brand">Filled-Outlined</wa-badge>
<wa-badge appearance="filled outlined" variant="brand">Filled + Outlined</wa-badge>
<wa-badge appearance="filled" variant="brand">Filled</wa-badge>
<wa-badge appearance="outlined" variant="brand">Outlined</wa-badge>
</div>
<div style="margin-block-end: 1rem;">
<wa-badge appearance="accent" variant="success">Accent</wa-badge>
<wa-badge appearance="filled-outlined" variant="success">Filled-Outlined</wa-badge>
<wa-badge appearance="filled outlined" variant="success">Filled + Outlined</wa-badge>
<wa-badge appearance="filled" variant="success">Filled</wa-badge>
<wa-badge appearance="outlined" variant="success">Outlined</wa-badge>
</div>
<div style="margin-block-end: 1rem;">
<wa-badge appearance="accent" variant="warning">Accent</wa-badge>
<wa-badge appearance="filled-outlined" variant="warning">Filled-Outlined</wa-badge>
<wa-badge appearance="filled outlined" variant="warning">Filled + Outlined</wa-badge>
<wa-badge appearance="filled" variant="warning">Filled</wa-badge>
<wa-badge appearance="outlined" variant="warning">Outlined</wa-badge>
</div>
<div>
<wa-badge appearance="accent" variant="danger">Accent</wa-badge>
<wa-badge appearance="filled-outlined" variant="danger">Filled-Outlined</wa-badge>
<wa-badge appearance="filled outlined" variant="danger">Filled + Outlined</wa-badge>
<wa-badge appearance="filled" variant="danger">Filled</wa-badge>
<wa-badge appearance="outlined" variant="danger">Outlined</wa-badge>
</div>

View File

@@ -31,35 +31,35 @@ Use the `appearance` attribute to change the button's visual appearance.
<div class="wa-stack">
<div class="wa-gap-2xs">
<wa-button appearance="accent" variant="neutral">Accent</wa-button>
<wa-button appearance="filled-outlined" variant="neutral">Filled-Outlined</wa-button>
<wa-button appearance="filled outlined" variant="neutral">Filled + Outlined</wa-button>
<wa-button appearance="filled" variant="neutral">Filled</wa-button>
<wa-button appearance="outlined" variant="neutral">Outlined</wa-button>
<wa-button appearance="plain" variant="neutral">Plain</wa-button>
</div>
<div class="wa-gap-2xs">
<wa-button appearance="accent" variant="brand">Accent</wa-button>
<wa-button appearance="filled-outlined" variant="brand">Filled-Outlined</wa-button>
<wa-button appearance="filled outlined" variant="brand">Filled + Outlined</wa-button>
<wa-button appearance="filled" variant="brand">Filled</wa-button>
<wa-button appearance="outlined" variant="brand">Outlined</wa-button>
<wa-button appearance="plain" variant="brand">Plain</wa-button>
</div>
<div class="wa-gap-2xs">
<wa-button appearance="accent" variant="success">Accent</wa-button>
<wa-button appearance="filled-outlined" variant="success">Filled-Outlined</wa-button>
<wa-button appearance="filled outlined" variant="success">Filled + Outlined</wa-button>
<wa-button appearance="filled" variant="success">Filled</wa-button>
<wa-button appearance="outlined" variant="success">Outlined</wa-button>
<wa-button appearance="plain" variant="success">Plain</wa-button>
</div>
<div class="wa-gap-2xs">
<wa-button appearance="accent" variant="warning">Accent</wa-button>
<wa-button appearance="filled-outlined" variant="warning">Filled-Outlined</wa-button>
<wa-button appearance="filled outlined" variant="warning">Filled + Outlined</wa-button>
<wa-button appearance="filled" variant="warning">Filled</wa-button>
<wa-button appearance="outlined" variant="warning">Outlined</wa-button>
<wa-button appearance="plain" variant="warning">Plain</wa-button>
</div>
<div class="wa-gap-2xs">
<wa-button appearance="accent" variant="danger">Accent</wa-button>
<wa-button appearance="filled-outlined" variant="danger">Filled-Outlined</wa-button>
<wa-button appearance="filled outlined" variant="danger">Filled + Outlined</wa-button>
<wa-button appearance="filled" variant="danger">Filled</wa-button>
<wa-button appearance="outlined" variant="danger">Outlined</wa-button>
<wa-button appearance="plain" variant="danger">Plain</wa-button>

View File

@@ -60,7 +60,7 @@ Set the `variant` attribute to change the callout's variant.
### Appearance
Use the `appearance` attribute to change the callout's visual appearance (the default is `filled-outlined`).
Use the `appearance` attribute to change the callout's visual appearance (the default is `outlined filled`).
```html {.example}
<wa-callout variant="brand" appearance="accent">
@@ -70,7 +70,7 @@ Use the `appearance` attribute to change the callout's visual appearance (the de
<br />
<wa-callout variant="brand" appearance="filled-outlined">
<wa-callout variant="brand" appearance="outlined filled">
<wa-icon slot="icon" name="fill-drip" variant="regular"></wa-icon>
This callout is both <strong>filled</strong> and <strong>outlined</strong>
</wa-callout>

View File

@@ -15,7 +15,7 @@ category: Organization
<strong>Mittens</strong><br />
This kitten is as cute as he is playful. Bring him home today!<br />
<small class="wa-caption-s">6 weeks old</small>
<small class="wa-caption-m">6 weeks old</small>
<wa-button slot="footer" variant="brand" pill>More Info</wa-button>
<wa-rating slot="footer-actions" label="Rating"></wa-rating>
@@ -137,7 +137,7 @@ Use the `appearance` attribute to change the card's visual appearance.
/>
Outlined (default)
</wa-card>
{% for appearance in ['filled-outlined', 'plain', 'filled', 'accent'] -%}
{% for appearance in ['outlined filled', 'plain', 'filled', 'accent'] -%}
<wa-card appearance="{{ appearance }}">
<img
slot="media"

View File

@@ -108,7 +108,7 @@ Use the `appearance` attribute to change the elements visual appearance.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</wa-details>
<wa-details summary="Filled-outlined" appearance="filled-outlined">
<wa-details summary="Filled + Outlined" appearance="filled outlined">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</wa-details>

View File

@@ -60,9 +60,7 @@ Add the `password-toggle` attribute to add a toggle button that will show the pa
Use the `appearance` attribute to change the input's visual appearance.
```html {.example}
<wa-input placeholder="Type something" appearance="filled"></wa-input><br />
<wa-input placeholder="Type something" appearance="filled-outlined"></wa-input><br />
<wa-input placeholder="Type something" appearance="outlined"></wa-input>
<wa-input placeholder="Type something" appearance="filled"></wa-input>
```
### Disabled

View File

@@ -80,18 +80,6 @@ Use the `appearance` attribute to change the select's visual appearance.
<wa-option value="option-2">Option 2</wa-option>
<wa-option value="option-3">Option 3</wa-option>
</wa-select>
<br />
<wa-select appearance="filled-outlined">
<wa-option value="option-1">Option 1</wa-option>
<wa-option value="option-2">Option 2</wa-option>
<wa-option value="option-3">Option 3</wa-option>
</wa-select>
<br />
<wa-select appearance="outlined">
<wa-option value="option-1">Option 1</wa-option>
<wa-option value="option-2">Option 2</wa-option>
<wa-option value="option-3">Option 3</wa-option>
</wa-select>
```
### Pill

View File

@@ -18,40 +18,41 @@ category: Feedback & Status
### Appearance
Use the `size` attribute to change a tag's visual appearance.
The default appearance is `filled-outlined`.
The default appearance is `outlined filled`.
```html {.example}
<div class="wa-stack">
<p>
<wa-tag variant="brand" appearance="accent">Accent</wa-tag>
<wa-tag variant="brand" appearance="filled-outlined">Filled-Outlined</wa-tag>
<wa-tag variant="brand" appearance="filled outlined">Filled + Outlined</wa-tag>
<wa-tag variant="brand" appearance="filled">Filled</wa-tag>
<wa-tag variant="brand" appearance="outlined">Outlined</wa-tag>
</p>
<p>
<wa-tag variant="success" appearance="accent">Accent</wa-tag>
<wa-tag variant="success" appearance="filled-outlined">Filled-Outlined</wa-tag>
<wa-tag variant="success" appearance="filled outlined">Filled + Outlined</wa-tag>
<wa-tag variant="success" appearance="filled">Filled</wa-tag>
<wa-tag variant="success" appearance="outlined">Outlined</wa-tag>
</p>
<p>
<wa-tag variant="neutral" appearance="accent">Accent</wa-tag>
<wa-tag variant="neutral" appearance="filled-outlined">Filled-Outlined</wa-tag>
<wa-tag variant="neutral" appearance="filled outlined">Filled + Outlined</wa-tag>
<wa-tag variant="neutral" appearance="filled">Filled</wa-tag>
<wa-tag variant="neutral" appearance="outlined">Outlined</wa-tag>
</p>
<p>
<wa-tag variant="warning" appearance="accent">Accent</wa-tag>
<wa-tag variant="warning" appearance="filled-outlined">Filled-Outlined</wa-tag>
<wa-tag variant="warning" appearance="filled outlined">Filled + Outlined</wa-tag>
<wa-tag variant="warning" appearance="filled">Filled</wa-tag>
<wa-tag variant="warning" appearance="outlined">Outlined</wa-tag>
</p>
<p>
<wa-tag variant="danger" appearance="accent">Accent</wa-tag>
<wa-tag variant="danger" appearance="filled-outlined">Filled-Outlined</wa-tag>
<wa-tag variant="danger" appearance="filled outlined">Filled + Outlined</wa-tag>
<wa-tag variant="danger" appearance="filled">Filled</wa-tag>
<wa-tag variant="danger" appearance="outlined">Outlined</wa-tag>
</p>

View File

@@ -52,9 +52,7 @@ Use the `placeholder` attribute to add a placeholder.
Use the `appearance` attribute to change the textarea's visual appearance.
```html {.example}
<wa-textarea placeholder="Type something" appearance="filled"></wa-textarea><br />
<wa-textarea placeholder="Type something" appearance="filled-outlined"></wa-textarea><br />
<wa-textarea placeholder="Type something" appearance="outlined"></wa-textarea>
<wa-textarea placeholder="Type something" appearance="filled"></wa-textarea>
```
### Disabled

View File

@@ -10,7 +10,7 @@ You can customize the look and feel of Web Awesome at a high level with themes.
Web Awesome uses [themes](/docs/themes) to apply a cohesive look and feel across the entire library. Themes are built with a collection of predefined CSS custom properties, which we call [design tokens](/docs/tokens), and there are many premade themes you can choose from.
To use a theme, simply add a link to the theme's stylesheet to the `<head>` of your page. For example, you can add this snippet alongside th [installation code](/docs/#quick-start-autoloading-via-cdn) to use the _Awesome_ theme:
To use a theme, simply add a link to the theme's stylesheet to the `<head>` of your page. For example, you can add this snippet alongside th [installation code](/docs/#quick-start-autoloading-via-cdn) to use the *Awesome* theme:
```html
<link rel="stylesheet" href="{% cdnUrl 'styles/themes/awesome.css' %}" />
@@ -87,7 +87,7 @@ Custom states can be combined with CSS parts and custom properties to create sop
CSS parts offer further flexibility to customize individual components. The "parts" exposed by each component can be targeted with the [CSS part selector](https://developer.mozilla.org/en-US/docs/Web/CSS/::part), or `::part()`.
Parts allow you to style _any_ standard CSS property, not just those exposed through custom properties. Here's an example that modifies buttons with the `gradient-button` class.
Parts allow you to style *any* standard CSS property, not just those exposed through custom properties. Here's an example that modifies buttons with the `gradient-button` class.
```html {.example}
<wa-button class="gradient-button"> Gradient Button </wa-button>
@@ -96,9 +96,7 @@ Parts allow you to style _any_ standard CSS property, not just those exposed thr
.gradient-button::part(base) {
background: linear-gradient(217deg, var(--wa-color-indigo-50), var(--wa-color-purple-50), var(--wa-color-red-50));
border: solid 1px var(--wa-color-purple-50);
transition:
transform 100ms,
box-shadow 100ms;
transition: transform 100ms, box-shadow 100ms;
}
.gradient-button::part(base):hover {
@@ -132,8 +130,7 @@ Most (but not all) components expose parts. You can find them in each component'
If you're using [native styles](/docs/utilities/native), any custom styles added for a component should also target the corresponding native element. In general, the same styles you declare for components will work just the same to style their native counterparts.
For example, we can give `<input type="checkbox">` the same custom styles as `<wa-checkbox>` by using standard CSS properties and CSS parts:
For example, we can give `<input type="checkbox">` the same custom styles as `<wa-checkbox>` by using the custom properties required to style the component:
```html {.example}
<wa-checkbox class="pinkify">Web Awesome checkbox</wa-checkbox>
<br />
@@ -143,16 +140,59 @@ For example, we can give `<input type="checkbox">` the same custom styles as `<w
</label>
<style>
wa-checkbox.pinkify::part(control),
input[type='checkbox'].pinkify {
wa-checkbox.pinkify,
input[type="checkbox"].pinkify {
--background-color-checked: hotpink;
--border-color-checked: hotpink;
--border-width: 3px;
--checked-icon-color: lavenderblush;
}
</style>
```
Or, if using CSS parts, we can give both checkboxes the same custom styles using standard CSS properties:
```html {.example}
<wa-checkbox class="purpleify">Web Awesome checkbox</wa-checkbox>
<br />
<label>
<input type="checkbox" class="purpleify" />
HTML checkbox
</label>
<style>
wa-checkbox.purpleify::part(control),
input[type="checkbox"].purpleify {
border-width: 3px;
}
wa-checkbox.pinkify:state(checked)::part(control),
input[type='checkbox'].pinkify:checked {
background-color: hotpink;
border-color: hotpink;
color: lavenderblush;
wa-checkbox.purpleify:state(checked)::part(control),
input[type="checkbox"].purpleify:checked {
background-color: darkorchid;
border-color: darkorchid;
color: lavender;
}
</style>
```
## Style Utilities
Similarly, if you're using [style utilities](/docs/utilities), any custom styles added for a specific attribute variation of a component — such as `appearance`, `variant`, or `size` — should also target the corresponding style utility class. This ensures that the attribute and its utility class counterpart work interchangeably.
For example, we can give all outlined callouts a thick left border, regardless of whether they are styled with `appearance="outlined"` or `class="wa-outlined"`:
```html {.example}
<wa-callout appearance="outlined filled">
<wa-icon slot="icon" name="circle-star"></wa-icon>
Here's a callout with <code>appearance="outlined"</code>
</wa-callout>
<wa-callout class="wa-outlined wa-filled">
<wa-icon slot="icon" name="circle-star"></wa-icon>
Here's a callout with <code>class="wa-outlined"</code>
</wa-callout>
<style>
wa-callout:is([appearance~="outlined"]) {
border-left-width: var(--wa-panel-border-radius);
}
</style>
```

View File

@@ -52,7 +52,7 @@ To make a field required, use the `required` attribute. Required fields will aut
customElements.whenDefined('wa-input'),
customElements.whenDefined('wa-option'),
customElements.whenDefined('wa-select'),
customElements.whenDefined('wa-textarea'),
customElements.whenDefined('wa-textarea')
]).then(() => {
form.addEventListener('submit', event => {
event.preventDefault();
@@ -78,7 +78,10 @@ To restrict a value to a specific [pattern](https://developer.mozilla.org/en-US/
const form = document.querySelector('.input-validation-pattern');
// Wait for controls to be defined before attaching form listeners
await Promise.all([customElements.whenDefined('wa-button'), customElements.whenDefined('wa-input')]).then(() => {
await Promise.all([
customElements.whenDefined('wa-button'),
customElements.whenDefined('wa-input')
]).then(() => {
form.addEventListener('submit', event => {
event.preventDefault();
alert('All fields are valid!');
@@ -105,7 +108,10 @@ Some input types will automatically trigger constraints, such as `email` and `ur
const form = document.querySelector('.input-validation-type');
// Wait for controls to be defined before attaching form listeners
await Promise.all([customElements.whenDefined('wa-button'), customElements.whenDefined('wa-input')]).then(() => {
await Promise.all([
customElements.whenDefined('wa-button'),
customElements.whenDefined('wa-input')
]).then(() => {
form.addEventListener('submit', event => {
event.preventDefault();
alert('All fields are valid!');
@@ -131,7 +137,10 @@ To create a custom validation error, pass a non-empty string to the `setCustomVa
const input = form.querySelector('wa-input');
// Wait for controls to be defined before attaching form listeners
await Promise.all([customElements.whenDefined('wa-button'), customElements.whenDefined('wa-input')]).then(() => {
await Promise.all([
customElements.whenDefined('wa-button'),
customElements.whenDefined('wa-input')
]).then(() => {
form.addEventListener('submit', event => {
event.preventDefault();
alert('All fields are valid!');
@@ -154,15 +163,17 @@ Custom validation can be applied to any form control that supports the `setCusto
## Custom Validation Styles
Due to the many ways form controls are used, Web Awesome doesn't provide out of the box validation styles for form controls as part of its default theme.
Due to the many ways form controls are used, Web Awesome doesn't provide out of the box validation styles for form controls as part of its default theme. Instead, the following attributes will be applied to reflect a control's validity as users interact with it. You can use them to create custom styles for any of the validation states you're interested in.
Instead, the following [custom states](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/states) will be applied to reflect a control's validity as users interact with it. You can use them to create custom styles for any of the validation states you're interested in.
- `required` - the form control is required
- `optional` - the form control is optional
- `invalid` - the form control is invalid
- `valid` - the form control is valid
- `user-invalid` - the form control is invalid and the user has interacted with it
- `user-valid` - the form control is valid and the user has interacted with it
- `:state(required)` - the form control is required
- `:state(optional)` - the form control is optional
- `:state(invalid)` - the form control is invalid
- `:state(valid)` - the form control is valid
- `:state(user-invalid)` - the form control is invalid and the user has interacted with it
- `:state(user-valid)` - the form control is valid and the user has interacted with it
These attributes map to the browser's built-in pseudo classes for validation: [`:required`](https://developer.mozilla.org/en-US/docs/Web/CSS/:required), [`:optional`](https://developer.mozilla.org/en-US/docs/Web/CSS/:optional), [`:invalid`](https://developer.mozilla.org/en-US/docs/Web/CSS/:invalid), [`:valid`](https://developer.mozilla.org/en-US/docs/Web/CSS/:valid), [`:user-invalid`](https://developer.mozilla.org/en-US/docs/Web/CSS/:user-invalid), and [`:user-valid`](https://developer.mozilla.org/en-US/docs/Web/CSS/:user-valid).
These custom states work alongside the browser's built-in pseudo classes for validation: [`:required`](https://developer.mozilla.org/en-US/docs/Web/CSS/:required), [`:optional`](https://developer.mozilla.org/en-US/docs/Web/CSS/:optional), [`:invalid`](https://developer.mozilla.org/en-US/docs/Web/CSS/:invalid), [`:valid`](https://developer.mozilla.org/en-US/docs/Web/CSS/:valid), [`:user-invalid`](https://developer.mozilla.org/en-US/docs/Web/CSS/:user-invalid), and [`:user-valid`](https://developer.mozilla.org/en-US/docs/Web/CSS/:user-valid).
:::info
In the future, data attribute selectors will be replaced with custom states such as `:state(valid)` and `:state(invalid)`. Web Awesome is using data attributes as a workaround until browsers fully support [custom states](https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals/states).
:::

View File

@@ -4,7 +4,7 @@ description: Choose the installation method that works best for you.
layout: page-outline
---
Welcome to Web Awesome! [Learn more](https://webawesome.com/) about this project and [how to contribute to it](https://webawesome.com/docs/resources/contributing).
Welcome to Web Awesome beta! [Learn more](https://webawesome.com/) about this project and [how to contribute to it](https://webawesome.com/docs/resources/contributing).
- [Report a bug](https://github.com/shoelace-style/webawesome/issues)
- [Get help / ask a question](https://github.com/shoelace-style/webawesome/discussions)
@@ -212,4 +212,4 @@ declare module 'react' {
:::details React 18 and below
React 18 and below have [poor support](https://custom-elements-everywhere.com/#react) for custom elements. For legacy versions of React, we provide React wrappers for every component. You can find the import instructions by selecting the _React_ tab from the _Importing_ section of each
component's documentation.
:::
:::

View File

@@ -4,7 +4,7 @@ description: Changes to each version of the project are documented here.
layout: page-outline
---
<p class="wa-caption-s">Last updated: <wa-format-date month="long" day="numeric" year="numeric" date="{{ lastUpdatedISO }}"></wa-format-date></p>
<p class="wa-caption-m">Last updated: <wa-format-date month="long" day="numeric" year="numeric" date="{{ lastUpdatedISO }}"></wa-format-date></p>
Web Awesome follows [Semantic Versioning](https://semver.org/). Breaking changes in components with the <wa-badge variant="brand">Stable</wa-badge> badge will not be accepted until the next major version. As such, all contributions must consider the project's roadmap and take this into consideration. Features that are deemed no longer necessary will be deprecated but not removed.
@@ -12,37 +12,15 @@ Components with the <wa-badge variant="warning">Experimental</wa-badge> badge sh
## Next
- 🚨 BREAKING: Changed `appearance="filled outlined"` to `appearance="filled-outlined"` in the following elements [issue:1127]
- `<wa-badge>`
- `<wa-button>`
- `<wa-callout>`
- `<wa-details>`
- `<wa-input>`
- `<wa-select>`
- `<wa-tag>`
- `<wa-textarea>`
- Added the Kazakh translation [pr:1496]
- Added docs for code completion for VS Code and JetBrains [pr:1550]
- Added back the missing `form-control-label` part to `<wa-textarea>` for consistency with other form controls [pr:1533]
- Added focus delegation to `<wa-button>` to ensure tabbing works properly when using `tabindex` [issue:1622]
- Added [text utilities](/docs/utilities/text/) for longform text, form control text, font sizes, font weights, text color, and truncation [pr:1602]
- Fixed a bug in `<wa-button>` where slotted badges weren't properly positioned in buttons with an `href` [issue:1377]
- Fixed focus outline styles in `<wa-details>` and native `<details>` [issue:1456]
- Fixed focus outline styles in `<wa-scroller>`, `<wa-dialog>`, and `<wa-drawer>` [issue:1484]
- Fixed a bug in `<wa-checkbox>` where its value would revert to `""` when checked / unchecked [pr:1547]
- Fixed a bug that caused icon button labels to not render in frameworks [issue:1542]
- Fixed a bug in `<wa-details>` that caused the `name` property not to reflect [pr:1538]
- Fixed a bug in `<wa-dialog>` and `<wa-drawer>` that prevented focus from being set on the dialog/drawer when opened [issue:1302]
- Fixed an overflow style that was causing tab group content to be unnecessarily truncated [issue:1401]
- Fixed a bug in `<wa-icon>` that caused icon buttons to render when non-text nodes were slotted in [issue:1475]
- Fixed a bug in `<wa-tooltip>` that prevented tooltips from showing when disconnecting and then reconnecting to the DOM [issue:1595]
- Fixed a bug that caused the required `*` in form labels to have incorrect spacing in `<wa-checkbox>` and `<wa-switch>` [issue:1472]
- Fixed a bug in `<wa-dialog>` and `<wa-drawer>` that caused the component to prematurely hide when certain child elements are used [pr:1636]
- Improved autofill styles in `<wa-input>` so they span the entire width of the visual input [issue:1439]
- Improved [text utilities](/docs/utilities/text/) so that each size modifier always exactly matches the applied font size [pr:1602]
- Improved Native Styles to use the `--wa-font-weight-code` design token
- Modified `<wa-slider>` to only show the tooltip on the handle being dragged when in range mode [issue:1320]
- Upgraded `<wa-page>` from _experimental_ to _stable_
## 3.0.0-beta.6

View File

@@ -1,28 +1,26 @@
---
title: Themes
description: Style (and restyle) your website at will with any of Web Awesome's pre-built themes.
description: Themes galore
layout: page
---
<h1>{{ title }}</h1>
<p>Themes are collections of <a href="/docs/tokens">design tokens</a> that give a cohesive look and feel to the entire Web Awesome library. Style and restyle your website at will by loading any pre-built theme.</p>
{% raw %}
<p>See one you like?&nbsp;
{%- if not session.isLoggedIn -%}
<a href="/login">Log in</a>&nbsp;
{%- else -%}
Head over to <a href="/teams">your teams</a>&nbsp;
{%- endif -%}
to create a project with any one of these themes.
{%- if not currentUser.hasPro -%}
&nbsp;(Plus, there are even more themes to love with Web Awesome Pro. <wa-icon name="heart" style="color: var(--wa-color-red-70);"></wa-icon>)
{%- endif -%}
</p>
{% endraw %}
<div class="wa-split">
<h1>{{ title }}</h1>
<wa-button variant="brand" href="/themer">
<wa-icon slot="start" name="plus" variant="regular"></wa-icon>
Create a Theme
</wa-button>
</div>
<div id="theme-viewer">
{% raw %}
{% if not currentUser.hasPro %}
<p>
Additional themes are available to pro users. Please <a href="/login">login to view pro themes</a>.
</p>
{% endif %}
{% endraw %}
<wa-radio-group id="theme-picker" label="Theme Selector" value="default" orientation="horizontal">
{% for theme in themer.themes %}
{% if not theme.isPro %}
@@ -225,14 +223,13 @@ to create a project with any one of these themes.
}
#theme-viewer {
margin-block-start: 2rem;
#theme-picker {
&::part(form-control-input) {
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: var(--wa-space-s);
}
&::part(form-control-label) {

View File

@@ -59,13 +59,11 @@ Common weights let you easily adjust the full range of weights for your theme.
Role-based weights allow you to uniformly adjust the weight of certain types of text to keep styles consistent.
| Custom Property | Default Value | Preview |
| --------------------------- | -------------------------------- | ------------------------------------------------------------------ |
| `--wa-font-weight-body` | `var(--wa-font-weight-normal)` | <div style="font-weight: var(--wa-font-weight-body)">AaBb</div> |
| `--wa-font-weight-heading` | `var(--wa-font-weight-bold)` | <div style="font-weight: var(--wa-font-weight-heading)">AaBb</div> |
| `--wa-font-weight-code` | `var(--wa-font-weight-normal)` | <div style="font-weight: var(--wa-font-weight-code)">AaBb</div> |
| `--wa-font-weight-longform` | `var(--wa-font-weight-normal)` | <div style="font-weight: var(--wa-font-weight-longform)">AaBb</div> |
| `--wa-font-weight-action` | `var(--wa-font-weight-semibold)` | <div style="font-weight: var(--wa-font-weight-action)">AaBb</div> |
| Custom Property | Default Value | Preview |
| -------------------------- | -------------------------------- | ------------------------------------------------------------------ |
| `--wa-font-weight-body` | `var(--wa-font-weight-normal)` | <div style="font-weight: var(--wa-font-weight-body)">AaBb</div> |
| `--wa-font-weight-heading` | `var(--wa-font-weight-bold)` | <div style="font-weight: var(--wa-font-weight-heading)">AaBb</div> |
| `--wa-font-weight-action` | `var(--wa-font-weight-semibold)` | <div style="font-weight: var(--wa-font-weight-action)">AaBb</div> |
In Web Awesome, we use `--wa-font-weight-action` for interactive text, such as button labels and tab names. We also recommend using `--wa-font-weight-action` for text that uses color alone to signal interactivity, such as links without text decoration.

View File

@@ -60,7 +60,7 @@ Clusters are great for inline lists and aligning items of varying sizes.
```html {.example}
<div class="wa-stack">
<h3 class="wa-heading-2xl">Withywindle Pub and Eatery</h3>
<h3 class="wa-heading-xl">Withywindle Pub and Eatery</h3>
<div class="wa-cluster wa-gap-xs">
<wa-rating value="4.6" read-only></wa-rating>
<strong>4.6</strong>
@@ -72,7 +72,7 @@ Clusters are great for inline lists and aligning items of varying sizes.
<wa-icon name="dollar" style="color: var(--wa-color-green-60);"></wa-icon>
<wa-icon name="dollar" style="color: var(--wa-color-green-60);"></wa-icon>
</div>
<span class="wa-caption-s">&bull;</span>
<span class="wa-caption-m">&bull;</span>
<wa-tag size="small">Comfort Food</wa-tag>
<wa-tag size="small">Gastropub</wa-tag>
<wa-tag size="small">Cocktail Bar</wa-tag>

View File

@@ -54,7 +54,7 @@ Frames are well-suited for images and image placeholders.
<img src="https://images.unsplash.com/photo-1533743983669-94fa5c4338ec?q=20" alt="Grey and white tabby kitten" />
</div>
<div class="wa-stack wa-gap-xs">
<h3 class="wa-heading-m">White-socks</h3>
<h3 class="wa-heading-s">White-socks</h3>
<span class="wa-body-s">Kitten &bull; Male</span>
<div class="wa-flank:end wa-gap-xs">
<wa-button size="small" appearance="filled" variant="brand">Adopt this pet</wa-button>
@@ -67,13 +67,13 @@ Frames are well-suited for images and image placeholders.
</wa-card>
<wa-card>
<div class="wa-frame:landscape" slot="header">
<div class="wa-stack wa-align-items-center wa-gap-xs wa-caption-s">
<div class="wa-stack wa-align-items-center wa-gap-xs wa-caption-m">
<wa-icon name="paw"></wa-icon>
<span>Photo coming soon</span>
</div>
</div>
<div class="wa-stack wa-gap-xs">
<h3 class="wa-heading-m">Bumpkin</h3>
<h3 class="wa-heading-s">Bumpkin</h3>
<span class="wa-body-s">Adult &bull; Male</span>
<div class="wa-flank:end wa-gap-xs">
<wa-button size="small" appearance="filled" variant="brand">Adopt this pet</wa-button>
@@ -89,7 +89,7 @@ Frames are well-suited for images and image placeholders.
<img src="https://images.unsplash.com/photo-1445499348736-29b6cdfc03b9?q=20" alt="Diluted calico kitten" />
</div>
<div class="wa-stack wa-gap-xs">
<h3 class="wa-heading-m">Swish-tail</h3>
<h3 class="wa-heading-s">Swish-tail</h3>
<span class="wa-body-s">Kitten &bull; Female</span>
<div class="wa-flank:end wa-gap-xs">
<wa-button size="small" appearance="filled" variant="brand">Adopt this pet</wa-button>
@@ -105,7 +105,7 @@ Frames are well-suited for images and image placeholders.
<img src="https://images.unsplash.com/photo-1517451330947-7809dead78d5?q=20" alt="Short-haired tabby cat" />
</div>
<div class="wa-stack wa-gap-xs">
<h3 class="wa-heading-m">Sharp-ears</h3>
<h3 class="wa-heading-s">Sharp-ears</h3>
<span class="wa-body-s">Adult &bull; Female</span>
<div class="wa-flank:end wa-gap-xs">
<wa-button size="small" appearance="filled" variant="brand">Adopt this pet</wa-button>

View File

@@ -41,35 +41,35 @@ Grids work especially well for card lists and content designed for browsing.
<div class="wa-frame wa-border-radius-l">
<img src="https://images.unsplash.com/photo-1520763185298-1b434c919102?q=20" alt="" />
</div>
<h3 class="wa-heading-m">Tulip</h3>
<h3 class="wa-heading-s">Tulip</h3>
<em>Tulipa gesneriana</em>
</div>
<div class="wa-stack wa-gap-s">
<div class="wa-frame wa-border-radius-l">
<img src="https://images.unsplash.com/photo-1591767134492-338e62f7b5a2?q=20" alt="" />
</div>
<h3 class="wa-heading-m">Peony</h3>
<h3 class="wa-heading-s">Peony</h3>
<em>Paeonia officinalis</em>
</div>
<div class="wa-stack wa-gap-s">
<div class="wa-frame wa-border-radius-l">
<img src="https://images.unsplash.com/photo-1590872000386-4348c6393115?q=20" alt="" />
</div>
<h3 class="wa-heading-m">Poppy</h3>
<h3 class="wa-heading-s">Poppy</h3>
<em>Papaver rhoeas</em>
</div>
<div class="wa-stack wa-gap-s">
<div class="wa-frame wa-border-radius-l">
<img src="https://images.unsplash.com/photo-1516723338795-324c7c33f700?q=20" alt="" />
</div>
<h3 class="wa-heading-m">Sunflower</h3>
<h3 class="wa-heading-s">Sunflower</h3>
<em>Helianthus annuus</em>
</div>
<div class="wa-stack wa-gap-s">
<div class="wa-frame wa-border-radius-l">
<img src="https://images.unsplash.com/photo-1563601841845-74a0a8ab7c8a?q=20" alt="" />
</div>
<h3 class="wa-heading-m">Daisy</h3>
<h3 class="wa-heading-s">Daisy</h3>
<em>Bellis perennis</em>
</div>
</div>
@@ -83,9 +83,9 @@ Grids work especially well for card lists and content designed for browsing.
<wa-icon slot="icon" name="globe"></wa-icon>
</wa-avatar>
<div class="wa-stack wa-gap-3xs">
<span class="wa-caption-xs">Population (Zion)</span>
<span class="wa-caption-s">Population (Zion)</span>
<span class="wa-cluster wa-gap-xs">
<span class="wa-heading-2xl">251,999</span>
<span class="wa-heading-xl">251,999</span>
<wa-badge variant="danger">-3%&nbsp;<wa-icon name="arrow-trend-down"></wa-icon></wa-badge>
</span>
</div>
@@ -97,9 +97,9 @@ Grids work especially well for card lists and content designed for browsing.
<wa-icon slot="icon" name="brain-circuit"></wa-icon>
</wa-avatar>
<div class="wa-stack wa-gap-3xs">
<span class="wa-caption-xs">Minds Freed</span>
<span class="wa-caption-s">Minds Freed</span>
<span class="wa-cluster wa-gap-xs">
<span class="wa-heading-2xl">0.36%</span>
<span class="wa-heading-xl">0.36%</span>
<wa-badge variant="success">+0.03%&nbsp;<wa-icon name="arrow-trend-up"></wa-icon></wa-badge>
</span>
</div>
@@ -111,9 +111,9 @@ Grids work especially well for card lists and content designed for browsing.
<wa-icon slot="icon" name="robot"></wa-icon>
</wa-avatar>
<div class="wa-stack wa-gap-3xs">
<span class="wa-caption-xs">Agents Discovered</span>
<span class="wa-caption-s">Agents Discovered</span>
<span class="wa-cluster wa-gap-xs">
<span class="wa-heading-2xl">3</span>
<span class="wa-heading-xl">3</span>
<wa-badge variant="neutral">±0%&nbsp;<wa-icon name="wave-triangle"></wa-icon></wa-badge>
</span>
</div>
@@ -125,9 +125,9 @@ Grids work especially well for card lists and content designed for browsing.
<wa-icon slot="icon" name="spaghetti-monster-flying"></wa-icon>
</wa-avatar>
<div class="wa-stack wa-gap-3xs">
<span class="wa-caption-xs">Sentinels Controlled</span>
<span class="wa-caption-s">Sentinels Controlled</span>
<span class="wa-cluster wa-gap-xs">
<span class="wa-heading-2xl">208</span>
<span class="wa-heading-xl">208</span>
<wa-badge variant="success">+1%&nbsp;<wa-icon name="arrow-trend-up"></wa-icon></wa-badge>
</span>
</div>

View File

@@ -68,7 +68,7 @@ Splits are especially helpful for navigation, header, and footer layouts.
```html {.example}
<div class="wa-stack">
<div class="wa-split">
<wa-icon name="web-awesome" label="Web Awesome" class="wa-font-size-xl"></wa-icon>
<wa-icon name="web-awesome" label="Web Awesome" style="font-size: var(--wa-font-size-xl);"></wa-icon>
<div class="wa-cluster">
<wa-button>Sign Up</wa-button>
<wa-button appearance="outlined">Log In</wa-button>

View File

@@ -1,159 +1,66 @@
---
title: Text
description: Text utility classes use custom properties from your Web Awesome theme and other standard CSS properties to style text elements on the fly.
description: Text utility classes combine custom properties from your Web Awesome theme to conveniently style text content.
layout: docs
tags: styleUtilities
---
<style>
th {
min-inline-size: 15ch;
}
</style>
{{ description }}
Web Awesome includes classes to set multiple text properties at once to style body text, headings, and captions.
## Body
Use `wa-body-*` classes to style the main content of your pages. Each class specifies a `font-size` that corresponds to a [font size token](/docs/tokens/typography/#font-size) from your theme.
Use body classes to style the main content of your pages. Each `wa-body-*` class specifies the following properties:
Alternatively, use `wa-body` to apply the same styling without an explicit font size.
- `font-family: var(--wa-font-family-body);`
- `font-weight: var(--wa-font-weight-body);`
- `line-height: var(--wa-line-height-normal);`
| Class Name | Preview |
| ------------- | -------------------------------------------------- |
| `wa-body-2xs` | <div class="wa-body-2xs">Five boxing wizards</div> |
| `wa-body-xs` | <div class="wa-body-xs">Five boxing wizards</div> |
| `wa-body-s` | <div class="wa-body-s">Five boxing wizards</div> |
| `wa-body-m` | <div class="wa-body-m">Five boxing wizards</div> |
| `wa-body-l` | <div class="wa-body-l">Five boxing wizards</div> |
| `wa-body-xl` | <div class="wa-body-xl">Five boxing wizards</div> |
| `wa-body-2xl` | <div class="wa-body-2xl">Five boxing wizards</div> |
| `wa-body-3xl` | <div class="wa-body-3xl">Five boxing wizards</div> |
| `wa-body-4xl` | <div class="wa-body-4xl">Five boxing wizards</div> |
Additionally, each class specifies a `font-size` that corresponds to a [`--wa-font-size-*`](/docs/tokens/typography/#font-size) token from your theme.
| Class Name | `font-size` Value | Preview |
| ------------ | ------------------- | ------------------------------------------------------------------- |
| `wa-body-xs` | `--wa-font-size-xs` | <div class="wa-body-xs">Sphinx of black quartz, judge my vow.</div> |
| `wa-body-s` | `--wa-font-size-s` | <div class="wa-body-s">Sphinx of black quartz, judge my vow.</div> |
| `wa-body-m` | `--wa-font-size-m` | <div class="wa-body-m">Sphinx of black quartz, judge my vow.</div> |
| `wa-body-l` | `--wa-font-size-l` | <div class="wa-body-l">Sphinx of black quartz, judge my vow.</div> |
| `wa-body-xl` | `--wa-font-size-xl` | <div class="wa-body-xl">Sphinx of black quartz, judge my vow.</div> |
## Headings
Use `wa-heading-*` classes to style section titles and headings in your content. Each class specifies a `font-size` that corresponds to a [font size token](/docs/tokens/typography/#font-size) from your theme.
Use heading classes to style section titles and headings in your content. Each `wa-heading-*` class specifies the following properties:
Alternatively, use `wa-heading` to apply the same styling without an explicit font size.
- `font-family: var(--wa-font-family-heading);`
- `font-weight: var(--wa-font-weight-heading);`
- `line-height: var(--wa-line-height-condensed);`
- `text-wrap: balance;`
| Class Name | Preview |
| ---------------- | ----------------------------------------------------- |
| `wa-heading-2xs` | <div class="wa-heading-2xs">Five boxing wizards</div> |
| `wa-heading-xs` | <div class="wa-heading-xs">Five boxing wizards</div> |
| `wa-heading-s` | <div class="wa-heading-s">Five boxing wizards</div> |
| `wa-heading-m` | <div class="wa-heading-m">Five boxing wizards</div> |
| `wa-heading-l` | <div class="wa-heading-l">Five boxing wizards</div> |
| `wa-heading-xl` | <div class="wa-heading-xl">Five boxing wizards</div> |
| `wa-heading-2xl` | <div class="wa-heading-2xl">Five boxing wizards</div> |
| `wa-heading-3xl` | <div class="wa-heading-3xl">Five boxing wizards</div> |
| `wa-heading-4xl` | <div class="wa-heading-4xl">Five boxing wizards</div> |
Additionally, each class specifies a `font-size` using a [`--wa-font-size-*`](/docs/tokens/typography/#font-size) token from your theme. Heading classes are one font size larger than the corresponding `wa-body-*` class.
| Class Name | `font-size` Value | Preview |
| ---------------- | -------------------- | ----------------------------------------------------- |
| `wa-heading-xs` | `--wa-font-size-s` | <div class="wa-heading-xs">Five Boxing Wizards</div> |
| `wa-heading-s` | `--wa-font-size-m` | <div class="wa-heading-s">Five Boxing Wizards</div> |
| `wa-heading-m` | `--wa-font-size-l` | <div class="wa-heading-m">Five Boxing Wizards</div> |
| `wa-heading-l` | `--wa-font-size-xl` | <div class="wa-heading-l">Five Boxing Wizards</div> |
| `wa-heading-xl` | `--wa-font-size-2xl` | <div class="wa-heading-xl">Five Boxing Wizards</div> |
| `wa-heading-2xl` | `--wa-font-size-3xl` | <div class="wa-heading-2xl">Five Boxing Wizards</div> |
| `wa-heading-3xl` | `--wa-font-size-4xl` | <div class="wa-heading-3xl">Five Boxing Wizards</div> |
## Captions
Use `wa-caption-*` classes to style descriptions or auxiliary text in your content. Each class specifies a `font-size` that corresponds to a [font size token](/docs/tokens/typography/#font-size) from your theme.
Use caption classes to style descriptions or auxiliary text in your content. Each `wa-caption-*` class specifies the following properties:
Alternatively, use `wa-caption` to apply the same styling without an explicit font size.
- `color: var(--wa-color-text-quiet);`
- `font-family: var(--wa-font-family-body);`
- `font-weight: var(--wa-font-weight-body);`
- `line-height: var(--wa-line-height-condensed);`
| Class Name | Preview |
| ---------------- | ----------------------------------------------------- |
| `wa-caption-2xs` | <div class="wa-caption-2xs">Five boxing wizards</div> |
| `wa-caption-xs` | <div class="wa-caption-xs">Five boxing wizards</div> |
| `wa-caption-s` | <div class="wa-caption-s">Five boxing wizards</div> |
| `wa-caption-m` | <div class="wa-caption-m">Five boxing wizards</div> |
| `wa-caption-l` | <div class="wa-caption-l">Five boxing wizards</div> |
| `wa-caption-xl` | <div class="wa-caption-xl">Five boxing wizards</div> |
| `wa-caption-2xl` | <div class="wa-caption-2xl">Five boxing wizards</div> |
| `wa-caption-3xl` | <div class="wa-caption-3xl">Five boxing wizards</div> |
| `wa-caption-4xl` | <div class="wa-caption-4xl">Five boxing wizards</div> |
Additionally, each class specifies a `font-size` using a [`--wa-font-size-*`](/docs/tokens/typography/#font-size) token from your theme. Caption classes are one font size smaller than the corresponding `wa-body-*` class.
## Longform
Use `wa-longform-*` classes to style lengthy content like essays or blog posts. Each class specifies a `font-size` that corresponds to a [font size token](/docs/tokens/typography/#font-size) from your theme.
Alternatively, use `wa-longform` to apply the same styling without an explicit font size.
| Class Name | Preview |
| ----------------- | ------------------------------------------------------ |
| `wa-longform-2xs` | <div class="wa-longform-2xs">Five boxing wizards</div> |
| `wa-longform-xs` | <div class="wa-longform-xs">Five boxing wizards</div> |
| `wa-longform-s` | <div class="wa-longform-s">Five boxing wizards</div> |
| `wa-longform-m` | <div class="wa-longform-m">Five boxing wizards</div> |
| `wa-longform-l` | <div class="wa-longform-l">Five boxing wizards</div> |
| `wa-longform-xl` | <div class="wa-longform-xl">Five boxing wizards</div> |
| `wa-longform-2xl` | <div class="wa-longform-2xl">Five boxing wizards</div> |
| `wa-longform-3xl` | <div class="wa-longform-3xl">Five boxing wizards</div> |
| `wa-longform-4xl` | <div class="wa-longform-4xl">Five boxing wizards</div> |
## Links
Use `wa-link` to give interactive text a link-like appearance. Alternatively, use `wa-link-plain` to remove typical link styles from `<a>` elements.
| Class Name | Preview |
| --------------- | -------------------------------------------------------- |
| `wa-link` | <div class="wa-link">Five boxing wizards</div> |
| `wa-link-plain` | <a href="" class="wa-link-plain">Five boxing wizards</a> |
## Lists
Ordered (`<ol>`) and unordered (`<ul>`) lists are given default styles by either Web Awesome's [native styles](/docs/utilities/native/) or your browser. Use `wa-list-plain` to clear any built-in list styles.
| Class Name | Preview |
| --------------- | -------------------------------------------------------------------------------------------------------- |
| `wa-list-plain` | <ol class="wa-list-plain"><li>First list item</li><li>Second list item</li><li>Final list item</li></ol> |
## Form Controls
Use `wa-form-control-*` classes to style labels, values, placeholders, and hints outside of typical form control contexts with [form control tokens](/docs/tokens/component-groups/#form-controls) from your theme.
| Class Name | Preview |
| ----------------------------- | ------------------------------------------------------------------ |
| `wa-form-control-label` | <div class="wa-form-control-label">Five boxing wizards</div> |
| `wa-form-control-value` | <div class="wa-form-control-value">Five boxing wizards</div> |
| `wa-form-control-placeholder` | <div class="wa-form-control-placeholder">Five boxing wizards</div> |
| `wa-form-control-hint` | <div class="wa-form-control-hint">Five boxing wizards</div> |
## Font Size
Use single-purpose `wa-font-size-*` classes to apply a given [font size](/docs/tokens/typography/#font-size) from your theme to any element without additional styling.
| Class Name | Preview |
| ------------------ | ------------------------------------------------------- |
| `wa-font-size-2xs` | <div class="wa-font-size-2xs">Five boxing wizards</div> |
| `wa-font-size-xs` | <div class="wa-font-size-xs">Five boxing wizards</div> |
| `wa-font-size-s` | <div class="wa-font-size-s">Five boxing wizards</div> |
| `wa-font-size-m` | <div class="wa-font-size-m">Five boxing wizards</div> |
| `wa-font-size-l` | <div class="wa-font-size-l">Five boxing wizards</div> |
| `wa-font-size-xl` | <div class="wa-font-size-xl">Five boxing wizards</div> |
| `wa-font-size-2xl` | <div class="wa-font-size-2xl">Five boxing wizards</div> |
| `wa-font-size-3xl` | <div class="wa-font-size-3xl">Five boxing wizards</div> |
| `wa-font-size-4xl` | <div class="wa-font-size-4xl">Five boxing wizards</div> |
## Font Weight
Use single-purpose `wa-font-weight-*` classes to apply a given [font weight](/docs/tokens/typography/#font-weight) from your theme to any element without additional styling.
| Class Name | Preview |
| ------------------------- | -------------------------------------------------------------- |
| `wa-font-weight-light` | <div class="wa-font-weight-light">Five boxing wizards</div> |
| `wa-font-weight-normal` | <div class="wa-font-weight-normal">Five boxing wizards</div> |
| `wa-font-weight-semibold` | <div class="wa-font-weight-semibold">Five boxing wizards</div> |
| `wa-font-weight-bold` | <div class="wa-font-weight-bold">Five boxing wizards</div> |
## Text Color
Use single-purpose `wa-color-text-*` classes to apply a given [text color](/docs/tokens/color/#text) from your theme to any element without additional styling.
| Class Name | Preview |
| ---------------------- | ----------------------------------------------------------- |
| `wa-color-text-quiet` | <div class="wa-color-text-quiet">Five boxing wizards</div> |
| `wa-color-text-normal` | <div class="wa-color-text-normal">Five boxing wizards</div> |
| `wa-color-text-link` | <div class="wa-color-text-link">Five boxing wizards</div> |
## Truncation
Use the `wa-text-truncate` class to truncate text with an ellipsis instead of letting it overflow or wrap.
| Class Name | Preview |
| ------------------ | ----------------------------------------------------------- |
| `wa-text-truncate` | <div class="wa-text-truncate" style="max-width: 40ch;">The five boxing wizards jump quickly. How quickly daft jumping zebras vex!</div> |
| Class Name | `font-size` Value | Preview |
| --------------- | -------------------- | ----------------------------------------------------------------------------- |
| `wa-caption-xs` | `--wa-font-size-2xs` | <div class="wa-caption-xs">The quick brown fox jumps over the lazy dog.</div> |
| `wa-caption-s` | `--wa-font-size-xs` | <div class="wa-caption-s">The quick brown fox jumps over the lazy dog.</div> |
| `wa-caption-m` | `--wa-font-size-s` | <div class="wa-caption-m">The quick brown fox jumps over the lazy dog.</div> |
| `wa-caption-l` | `--wa-font-size-m` | <div class="wa-caption-l">The quick brown fox jumps over the lazy dog.</div> |
| `wa-caption-xl` | `--wa-font-size-l` | <div class="wa-caption-xl">The quick brown fox jumps over the lazy dog.</div> |

View File

@@ -91,7 +91,7 @@ layout: false
<div class="showcase-examples">
<wa-card>
<div slot="header" class="wa-split">
<h3 class="wa-heading-l">Your Cart</h3>
<h3 class="wa-heading-m">Your Cart</h3>
<wa-button appearance="plain" size="small" tabindex="-1">
<wa-icon name="xmark" label="Close"></wa-icon>
</wa-button>
@@ -109,7 +109,7 @@ layout: false
<strong>Initiate Saber</strong>
<strong>$179.99</strong>
</div>
<div class="wa-split wa-gap-2xs wa-caption-s">
<div class="wa-split wa-gap-2xs wa-caption-m">
<span>Green</span>
<a href="#" tabindex="-1">Remove</a>
</div>
@@ -128,7 +128,7 @@ layout: false
<strong>Repair Droid</strong>
<strong>$3,049.99</strong>
</div>
<div class="wa-split wa-gap-2xs wa-caption-s">
<div class="wa-split wa-gap-2xs wa-caption-m">
<span>R-series</span>
<a href="#" tabindex="-1">Remove</a>
</div>
@@ -140,7 +140,7 @@ layout: false
<strong>Subtotal</strong>
<strong>$3,229.98</strong>
</div>
<span class="wa-caption-s">Shipping and taxes calculated at checkout.</span>
<span class="wa-caption-m">Shipping and taxes calculated at checkout.</span>
<wa-button tabindex="-1" variant="brand">
<wa-icon slot="start" name="shopping-bag"></wa-icon>
Checkout
@@ -158,7 +158,7 @@ layout: false
</wa-card>
<wa-card>
<div class="wa-stack">
<h3 class="wa-heading-l">Sign In</h3>
<h3 class="wa-heading-m">Sign In</h3>
<wa-input tabindex="-1" label="Email" placeholder="ddjarin@mandalore.gov" inert>
<wa-icon slot="start" name="envelope" variant="regular"></wa-icon>
</wa-input>
@@ -172,7 +172,7 @@ layout: false
<wa-card>
<div class="wa-stack">
<div class="wa-split">
<h3 class="wa-heading-l">To-Do</h3>
<h3 class="wa-heading-m">To-Do</h3>
<wa-button appearance="plain" size="small" tabindex="-1">
<wa-icon name="plus" label="Add task"></wa-icon>
</wa-button>
@@ -198,7 +198,7 @@ layout: false
<strong>The Stone Troll</strong>
<small><wa-badge variant="neutral" appearance="filled">E</wa-badge></small>
</div>
<span class="wa-caption-s">Samwise G</span>
<span class="wa-caption-m">Samwise G</span>
</div>
<wa-button appearance="plain" size="small" tabindex="-1">
<wa-icon name="ellipsis" label="Options"></wa-icon>
@@ -207,8 +207,8 @@ layout: false
<div class="wa-stack wa-gap-2xs">
<wa-progress-bar value="34"></wa-progress-bar>
<div class="wa-split">
<span class="wa-caption-2xs">1:01</span>
<span class="wa-caption-2xs">-1:58</span>
<span class="wa-caption-xs">1:01</span>
<span class="wa-caption-xs">-1:58</span>
</div>
</div>
<div class="wa-grid wa-align-items-center" style="--min-column-size: 1em; justify-items: center">
@@ -226,7 +226,7 @@ layout: false
</wa-card>
<wa-card>
<div class="wa-stack">
<h3 class="wa-heading-l">Chalmun's Spaceport Cantina</h3>
<h3 class="wa-heading-m">Chalmun's Spaceport Cantina</h3>
<div class="wa-cluster wa-gap-xs">
<wa-rating value="4.6" readonly tabindex="-1"></wa-rating>
<strong>4.6</strong>
@@ -238,14 +238,14 @@ layout: false
<wa-icon name="dollar" style="color: var(--wa-color-green-60)"></wa-icon>
<wa-icon name="dollar" style="color: var(--wa-color-green-60)"></wa-icon>
</div>
<span class="wa-caption-s">&bull;</span>
<span class="wa-caption-m">&bull;</span>
<wa-tag size="small">Cocktail Bar</wa-tag>
<wa-tag size="small">Gastropub</wa-tag>
<wa-tag size="small">Local Fare</wa-tag>
</div>
<div class="wa-flank wa-gap-xs">
<wa-icon name="location-dot"></wa-icon>
<a href="#" class="wa-caption-s" tabindex="-1">Mos Eisley, Tatooine</a>
<a href="#" class="wa-caption-m" tabindex="-1">Mos Eisley, Tatooine</a>
</div>
</div>
</wa-card>
@@ -283,7 +283,7 @@ layout: false
<wa-card>
<div class="wa-stack">
<div class="wa-flank:end">
<h3 id="odds-label" class="wa-heading-l">Tell Me the Odds</h3>
<h3 id="odds-label" class="wa-heading-m">Tell Me the Odds</h3>
<wa-switch size="large" aria-labelledby="odds-label" tabindex="-1"></wa-switch>
</div>
<p class="wa-body-s">
@@ -296,10 +296,10 @@ layout: false
<div class="wa-stack">
<div class="wa-split wa-align-items-start">
<dl class="wa-stack wa-gap-2xs">
<dt class="wa-heading-m">Amount</dt>
<dd class="wa-heading-xl">$5,610.00</dd>
<dt class="wa-heading-s">Amount</dt>
<dd class="wa-heading-l">$5,610.00</dd>
</dl>
<wa-badge appearance="filled-outlined" variant="success">Paid</wa-badge>
<wa-badge appearance="filled outlined" variant="success">Paid</wa-badge>
</div>
<wa-divider></wa-divider>
<dl class="wa-stack">
@@ -327,37 +327,37 @@ layout: false
<wa-card>
<div class="wa-stack">
<div class="wa-split">
<div class="wa-cluster wa-heading-xl">
<div class="wa-cluster wa-heading-l">
<wa-icon name="book-sparkles"></wa-icon>
<h3>Fellowship</h3>
</div>
<wa-badge>Most Popular</wa-badge>
</div>
<span class="wa-flank wa-align-items-baseline wa-gap-2xs">
<span class="wa-heading-3xl">$120</span>
<span class="wa-caption-m">per year</span>
<span class="wa-heading-2xl">$120</span>
<span class="wa-caption-l">per year</span>
</span>
<p class="wa-caption-m">Carry great power (and great responsibility).</p>
<p class="wa-caption-l">Carry great power (and great responsibility).</p>
<wa-button variant="brand" tabindex="-1">Get this Plan</wa-button>
</div>
<div slot="footer" class="wa-stack wap-gap-s">
<h4 class="wa-heading-m">What You Get</h4>
<h4 class="wa-heading-s">What You Get</h4>
<div class="wa-stack">
<div class="wa-flank">
<wa-icon name="user"></wa-icon>
<span class="wa-caption-s">9 users</span>
<span class="wa-caption-m">9 users</span>
</div>
<div class="wa-flank">
<wa-icon name="ring"></wa-icon>
<span class="wa-caption-s">1 ring</span>
<span class="wa-caption-m">1 ring</span>
</div>
<div class="wa-flank">
<wa-icon name="chess-rook"></wa-icon>
<span class="wa-caption-s">API access to Isengard</span>
<span class="wa-caption-m">API access to Isengard</span>
</div>
<div class="wa-flank">
<wa-icon name="feather"></wa-icon>
<span class="wa-caption-s">Priority eagle support</span>
<span class="wa-caption-m">Priority eagle support</span>
</div>
</div>
</div>
@@ -377,10 +377,10 @@ layout: false
<div class="wa-flank:end">
<div class="wa-stack wa-gap-xs">
<div class="wa-cluster wa-gap-xs">
<h3 class="wa-heading-m">Migs Mayfeld</h3>
<h3 class="wa-heading-s">Migs Mayfeld</h3>
<wa-badge pill>Admin</wa-badge>
</div>
<span class="wa-caption-s">Imperial Sharpshooter</span>
<span class="wa-caption-m">Imperial Sharpshooter</span>
</div>
<wa-avatar
image="https://images.unsplash.com/photo-1633268335280-a41fbde58707?q=80&w=3348&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
@@ -408,8 +408,8 @@ layout: false
<wa-icon slot="icon" name="egg-fried"></wa-icon>
</wa-avatar>
<div class="wa-gap-2xs wa-stack">
<span class="wa-heading-m">Second Breakfast</span>
<span class="wa-caption-s">19 Items</span>
<span class="wa-heading-s">Second Breakfast</span>
<span class="wa-caption-m">19 Items</span>
</div>
</a>
<wa-dropdown>
@@ -425,10 +425,10 @@ layout: false
</wa-card>
<wa-card with-header with-footer>
<div slot="header" class="wa-stack wa-gap-xs">
<h2 class="wa-heading-l">Decks</h2>
<h2 class="wa-heading-m">Decks</h2>
</div>
<div class="wa-stack wa-gap-xl">
<p class="wa-caption-s">
<p class="wa-caption-m">
You haven't created any decks yet. Get started by selecting an aspect that matches your play style.
</p>
<div class="wa-grid wa-gap-xl" style="--min-column-size: 30ch">
@@ -440,10 +440,10 @@ layout: false
<wa-icon slot="icon" name="shield"></wa-icon>
</wa-avatar>
<div class="wa-stack wa-gap-2xs">
<span class="wa-align-items-center wa-cluster wa-gap-xs wa-heading-m">
<span class="wa-align-items-center wa-cluster wa-gap-xs wa-heading-s">
Vigilance <wa-icon name="arrow-right"></wa-icon>
</span>
<p class="wa-caption-s">Protect, defend, and restore as you ready heavy-hitters.</p>
<p class="wa-caption-m">Protect, defend, and restore as you ready heavy-hitters.</p>
</div>
</a>
<a href="" class="wa-flank wa-align-items-start wa-link-plain" tabindex="-1">
@@ -454,10 +454,10 @@ layout: false
<wa-icon slot="icon" name="chevrons-up"></wa-icon>
</wa-avatar>
<div class="wa-stack wa-gap-2xs">
<span class="wa-align-items-center wa-cluster wa-gap-xs wa-heading-m">
<span class="wa-align-items-center wa-cluster wa-gap-xs wa-heading-s">
Command <wa-icon name="arrow-right"></wa-icon>
</span>
<p class="wa-caption-s">Build imposing armies and stockpile resources.</p>
<p class="wa-caption-m">Build imposing armies and stockpile resources.</p>
</div>
</a>
<a href="" class="wa-flank wa-align-items-start wa-link-plain" tabindex="-1">
@@ -468,10 +468,10 @@ layout: false
<wa-icon slot="icon" name="explosion"></wa-icon>
</wa-avatar>
<div class="wa-stack wa-gap-2xs">
<span class="wa-align-items-center wa-cluster wa-gap-xs wa-heading-m">
<span class="wa-align-items-center wa-cluster wa-gap-xs wa-heading-s">
Aggression <wa-icon name="arrow-right"></wa-icon>
</span>
<p class="wa-caption-s">Relentlessly deal damage and apply pressure to your opponent.</p>
<p class="wa-caption-m">Relentlessly deal damage and apply pressure to your opponent.</p>
</div>
</a>
<a href="" class="wa-flank wa-align-items-start wa-link-plain" tabindex="-1">
@@ -482,10 +482,10 @@ layout: false
<wa-icon slot="icon" name="moon-stars"></wa-icon>
</wa-avatar>
<div class="wa-stack wa-gap-2xs">
<span class="wa-align-items-center wa-cluster wa-gap-xs wa-heading-m">
<span class="wa-align-items-center wa-cluster wa-gap-xs wa-heading-s">
Cunning <wa-icon name="arrow-right"></wa-icon>
</span>
<p class="wa-caption-s">Disrupt and frustrate your opponent with dastardly tricks.</p>
<p class="wa-caption-m">Disrupt and frustrate your opponent with dastardly tricks.</p>
</div>
</a>
</div>

View File

@@ -182,6 +182,25 @@ layout: page
}
}
}
.beta-notice {
display: flex;
flex-wrap: wrap;
gap: 1rem;
& > * {
flex-basis: calc(((30ch * 2 + 1rem) - 100%) * 999);
}
& > * {
flex-grow: 2;
}
& > * + * {
flex-grow: 1;
}
& wa-callout,
& wa-button::part(base) {
height: 100%;
width: 100%;
}
}
wa-button.tile::part(base) {
border-color: var(--wa-color-surface-border);
border-radius: 0.75rem;
@@ -236,11 +255,11 @@ layout: page
<div class="hero-cta">
{%- raw -%}
{% if currentUser.hasPro %}
<span class="wa-font-size-l" style="text-align: center; width: 100%;">Thanks for being a Web Awesome Pro subscriber!</span>
<span style="text-align: center; width: 100%; font-size: var(--wa-font-size-l);">Thanks for being a Web Awesome Pro subscriber!</span>
{% else %}
{% if App.flags.stripeEnabled %}
<div class="wa-stack wa-gap-xs">
<h3 class="wa-heading-m">Get More with Web Awesome Pro!</h3>
<h3 class="wa-heading-s">Get More with Web Awesome Pro!</h3>
<p>Unlock Pro-only themes, components, patterns, and great services like the Theme Builder.</p>
</div>
<wa-button class="wa-dark" size="small" href="/purchase">
@@ -261,18 +280,33 @@ layout: page
</div>
<div class="home-wrapper">
<wa-button href="/docs/" appearance="outlined" class="tile">
<div class="wa-stack">
<div class="wa-split">
<div class="wa-cluster icon-heading">
<wa-icon name="pen-ruler" class="brand-orange"></wa-icon>
<h3>Get started</h3>
<div class="beta-notice">
<div>
<wa-callout variant="brand">
<div class="wa-stack">
<div class="wa-cluster icon-heading">
<wa-icon name="sparkles" variant="regular"></wa-icon>
<h3>Bigger and beta than ever</h3>
</div>
<p>This beta is battle-tested and built to last, but if you see something, say something. Please <a href="https://github.com/shoelace-style/webawesome/issues">report bugs</a> or <a href="https://github.com/shoelace-style/webawesome/discussions">ask for help</a>!</p>
</div>
<wa-icon name="arrow-right"></wa-icon>
</div>
<p>Check out our installation guide to start building with Web Awesome.</p>
</wa-callout>
</div>
</wa-button>
<div>
<wa-button href="/docs/" appearance="outlined" class="tile">
<div class="wa-stack">
<div class="wa-split">
<div class="wa-cluster icon-heading">
<wa-icon name="pen-ruler" class="brand-orange"></wa-icon>
<h3>Get started</h3>
</div>
<wa-icon name="arrow-right"></wa-icon>
</div>
<p>Check out our installation guide to start building with Web Awesome.</p>
</div>
</wa-button>
</div>
</div>
<wa-divider></wa-divider>
<div class="summary">
<h2 class="brand-font">What's <span class="emphasis">Web</span> Awesome?</h2>

View File

@@ -18,7 +18,6 @@ import { getCdnDir, getDistDir, getDocsDir, getRootDir, getSiteDir } from './uti
const __dirname = dirname(fileURLToPath(import.meta.url));
const currentYear = new Date().getFullYear();
const spinner = ora({ text: 'Web Awesome', color: 'cyan' }).start();
const getPackageData = async () => JSON.parse(await readFile(join(getRootDir(), 'package.json'), 'utf-8'));
const getVersion = async () => JSON.stringify((await getPackageData()).version.toString());
@@ -226,9 +225,6 @@ export async function build(options = {}) {
bundle: true,
splitting: true,
minify: false,
banner: {
js: `/*! Copyright ${currentYear} Fonticons, Inc. - https://webawesome.com/license */`,
},
plugins: [replace({ __WEBAWESOME_VERSION__: await getVersion() })],
loader: {
'.css': 'text',

View File

@@ -21,7 +21,7 @@
}
/* Appearance modifiers */
:host([appearance='outlined']) {
:host([appearance~='outlined']) {
--pulse-color: var(--wa-color-border-loud, var(--wa-color-brand-border-loud));
color: var(--wa-color-on-quiet, var(--wa-color-brand-on-quiet));
@@ -29,7 +29,7 @@
border-color: var(--wa-color-border-loud, var(--wa-color-brand-border-loud));
}
:host([appearance='filled']) {
:host([appearance~='filled']) {
--pulse-color: var(--wa-color-fill-normal, var(--wa-color-brand-fill-normal));
color: var(--wa-color-on-normal, var(--wa-color-brand-on-normal));
@@ -37,15 +37,13 @@
border-color: transparent;
}
:host([appearance='filled-outlined']) {
:host([appearance~='filled'][appearance~='outlined']) {
--pulse-color: var(--wa-color-border-normal, var(--wa-color-brand-border-normal));
color: var(--wa-color-on-normal, var(--wa-color-brand-on-normal));
background-color: var(--wa-color-fill-normal, var(--wa-color-brand-fill-normal));
border-color: var(--wa-color-border-normal, var(--wa-color-brand-border-normal));
}
:host([appearance='accent']) {
:host([appearance~='accent']) {
--pulse-color: var(--wa-color-fill-loud, var(--wa-color-brand-fill-loud));
color: var(--wa-color-on-loud, var(--wa-color-brand-on-loud));

View File

@@ -25,7 +25,7 @@ export default class WaBadge extends WebAwesomeElement {
@property({ reflect: true }) variant: 'brand' | 'neutral' | 'success' | 'warning' | 'danger' = 'brand';
/** The badge's visual appearance. */
@property({ reflect: true }) appearance: 'accent' | 'filled' | 'outlined' | 'filled-outlined' = 'accent';
@property({ reflect: true }) appearance: 'accent' | 'filled' | 'outlined' = 'accent';
/** Draws a pill-style badge with rounded edges. */
@property({ type: Boolean, reflect: true }) pill = false;

View File

@@ -3,7 +3,7 @@
display: inline-block;
/* Workaround because Chrome doesn't like :host(:has()) below
* https://issues.chromium.org/issues/40062355
* https://issues.chromium.org/issues/40062355
* Firefox doesn't like this nested rule, so both are needed */
&:has(wa-badge) {
position: relative;
@@ -47,7 +47,7 @@
}
/* Appearance modifiers */
:host([appearance='plain']) {
:host([appearance~='plain']) {
.button {
color: var(--wa-color-on-quiet, var(--wa-color-neutral-on-quiet));
background-color: transparent;
@@ -69,7 +69,7 @@
}
}
:host([appearance='outlined']) {
:host([appearance~='outlined']) {
.button {
color: var(--wa-color-on-quiet, var(--wa-color-neutral-on-quiet));
background-color: transparent;
@@ -91,7 +91,7 @@
}
}
:host([appearance='filled']) {
:host([appearance~='filled']) {
.button {
color: var(--wa-color-on-normal, var(--wa-color-neutral-on-normal));
background-color: var(--wa-color-fill-normal, var(--wa-color-neutral-fill-normal));
@@ -117,33 +117,11 @@
}
}
:host([appearance='filled-outlined']) {
.button {
color: var(--wa-color-on-normal, var(--wa-color-neutral-on-normal));
background-color: var(--wa-color-fill-normal, var(--wa-color-neutral-fill-normal));
border-color: var(--wa-color-border-normal, var(--wa-color-neutral-border-normal));
}
@media (hover: hover) {
.button:not(.disabled):not(.loading):hover {
color: var(--wa-color-on-normal, var(--wa-color-neutral-on-normal));
background-color: color-mix(
in oklab,
var(--wa-color-fill-normal, var(--wa-color-neutral-fill-normal)),
var(--wa-color-mix-hover)
);
}
}
.button:not(.disabled):not(.loading):active {
color: var(--wa-color-on-normal, var(--wa-color-neutral-on-normal));
background-color: color-mix(
in oklab,
var(--wa-color-fill-normal, var(--wa-color-neutral-fill-normal)),
var(--wa-color-mix-active)
);
}
:host([appearance~='filled'][appearance~='outlined']) .button {
border-color: var(--wa-color-border-normal, var(--wa-color-neutral-border-normal));
}
:host([appearance='accent']) {
:host([appearance~='accent']) {
.button {
color: var(--wa-color-on-loud, var(--wa-color-neutral-on-loud));
background-color: var(--wa-color-fill-loud, var(--wa-color-neutral-fill-loud));
@@ -237,7 +215,7 @@
* Caret modifier
*/
wa-icon[part='caret'] {
wa-icon[part~='caret'] {
display: flex;
align-self: center;
align-items: center;
@@ -306,7 +284,7 @@ slot[name='start']::slotted(*) {
}
slot[name='end']::slotted(*),
.button:not(.visually-hidden-label) [part='caret'] {
.button:not(.visually-hidden-label) [part~='caret'] {
margin-inline-start: 0.75em;
}

View File

@@ -41,7 +41,6 @@ import styles from './button.css';
*/
@customElement('wa-button')
export default class WaButton extends WebAwesomeFormAssociatedElement {
static shadowRootOptions = { ...WebAwesomeFormAssociatedElement.shadowRootOptions, delegatesFocus: true };
static css = [styles, variantStyles, sizeStyles];
static get validators() {
@@ -64,7 +63,7 @@ export default class WaButton extends WebAwesomeFormAssociatedElement {
@property({ reflect: true }) variant: 'neutral' | 'brand' | 'success' | 'warning' | 'danger' = 'neutral';
/** The button's visual appearance. */
@property({ reflect: true }) appearance: 'accent' | 'filled' | 'outlined' | 'filled-outlined' | 'plain' = 'accent';
@property({ reflect: true }) appearance: 'accent' | 'filled' | 'outlined' | 'plain' = 'accent';
/** The button's size. */
@property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';

View File

@@ -27,7 +27,7 @@
border-color: transparent;
}
:host([appearance~='filled-outlined']) {
:host([appearance~='filled'][appearance~='outlined']) {
border-color: var(--wa-color-border-quiet, var(--wa-color-brand-border-quiet));
}

View File

@@ -9,7 +9,7 @@ import styles from './callout.css';
* @summary Callouts are used to display important messages inline.
* @documentation https://webawesome.com/docs/components/callout
* @status stable
* @since 3.0
* @since 2.0
*
* @slot - The callout's main content.
* @slot icon - An icon to show in the callout. Works best with `<wa-icon>`.
@@ -25,7 +25,8 @@ export default class WaCallout extends WebAwesomeElement {
@property({ reflect: true }) variant: 'brand' | 'neutral' | 'success' | 'warning' | 'danger' = 'brand';
/** The callout's visual appearance. */
@property({ reflect: true }) appearance: 'accent' | 'filled' | 'outlined' | 'plain' | 'filled-outlined';
@property({ reflect: true }) appearance: 'accent' | 'filled' | 'outlined' | 'plain' | 'outlined filled' =
'outlined filled';
/** The callout's size. */
@property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';

View File

@@ -21,7 +21,7 @@ describe('<wa-checkbox>', () => {
const el = await fixture<WaCheckbox>(html` <wa-checkbox></wa-checkbox> `);
expect(el.name).to.equal('');
expect(el.value).to.equal(null);
expect(el.value).to.equal('on');
expect(el.title).to.equal('');
expect(el.disabled).to.be.false;
expect(el.required).to.be.false;
@@ -134,7 +134,7 @@ describe('<wa-checkbox>', () => {
await checkbox.updateComplete;
expect(checkbox.checked).to.equal(false);
expect(checkbox.value).to.equal(null);
expect(checkbox.value).to.equal('myvalue');
expect(new FormData(form).get('test')).to.equal(null);
checkbox.checked = true;

View File

@@ -80,8 +80,7 @@ export default class WaCheckbox extends WebAwesomeFormAssociatedElement {
/** The value of the checkbox, submitted as a name/value pair with form data. */
get value(): string | null {
const val = this._value || 'on';
return this.checked ? val : null;
return this._value ?? 'on';
}
@property({ reflect: true })

View File

@@ -26,27 +26,29 @@ details {
}
/* Appearance modifiers */
:host([appearance='plain']) details {
:host([appearance~='plain']) details {
background-color: transparent;
border-color: transparent;
border-radius: 0;
}
:host([appearance='outlined']) details {
:host([appearance~='outlined']) details {
background-color: var(--wa-color-surface-default);
border-color: var(--wa-color-surface-border);
}
:host([appearance='filled']) details {
:host([appearance~='filled']) details {
background-color: var(--wa-color-neutral-fill-quiet);
border-color: transparent;
}
:host([appearance='filled-outlined']) details {
background-color: var(--wa-color-neutral-fill-quiet);
:host([appearance~='filled'][appearance~='outlined']) details {
border-color: var(--wa-color-neutral-border-quiet);
}
:host([appearance='plain']) details {
border-radius: 0;
}
:host([disabled]) details {
opacity: 0.5;
cursor: not-allowed;

View File

@@ -76,7 +76,7 @@ export default class WaDetails extends WebAwesomeElement {
@property({ type: Boolean, reflect: true }) disabled = false;
/** The element's visual appearance. */
@property({ reflect: true }) appearance: 'filled' | 'outlined' | 'filled-outlined' | 'plain' = 'outlined';
@property({ reflect: true }) appearance: 'filled' | 'outlined' | 'plain' = 'outlined';
/** The location of the expand/collapse icon. */
@property({ attribute: 'icon-placement', reflect: true }) iconPlacement: 'start' | 'end' = 'end';

View File

@@ -119,19 +119,6 @@ describe('<wa-dialog>', () => {
expect(el.open).to.be.true;
});
it('should not close when bubbled cancel event originates from within the drawer', async () => {
const el = await fixture<WaDialog>(html` <wa-dialog open><input type="file" /></wa-dialog> `);
const input = el.querySelector('input')!;
await clickOnElement(el); // Chromium wants the page to have been clicked prior to closing the dialog.
const cancelEvent = new Event('cancel', { bubbles: true });
input.dispatchEvent(cancelEvent);
await aTimeout(250);
expect(el.open).to.be.true;
});
it('should allow initial focus to be set', async () => {
const el = await fixture<WaDialog>(html` <wa-dialog><wa-input autofocus></wa-input></wa-dialog> `);
const input = el.querySelector('wa-input')!;

View File

@@ -129,7 +129,7 @@ export default class WaDialog extends WebAwesomeElement {
private handleDialogCancel(event: Event) {
event.preventDefault();
if (!this.dialog.classList.contains('hide') && event.target === this.dialog) {
if (!this.dialog.classList.contains('hide')) {
this.requestClose(this.dialog);
}
}
@@ -197,8 +197,6 @@ export default class WaDialog extends WebAwesomeElement {
const elementToFocus = this.querySelector<HTMLButtonElement>('[autofocus]');
if (elementToFocus && typeof elementToFocus.focus === 'function') {
elementToFocus.focus();
} else {
this.dialog.focus();
}
});

View File

@@ -115,18 +115,6 @@ describe('<wa-drawer>', () => {
expect(el.open).to.be.true;
});
it('should not close when bubbled cancel event originates from within the drawer', async () => {
const el = await fixture<WaDrawer>(html`<wa-drawer open><input type="file" /></wa-drawer>`);
const input = el.querySelector('input')!;
const cancelEvent = new Event('cancel', { bubbles: true });
input.dispatchEvent(cancelEvent);
await aTimeout(250);
expect(el.open).to.be.true;
});
it('should allow initial focus to be set', async () => {
const el = await fixture<WaDrawer>(html` <wa-drawer><wa-input autofocus></wa-input></wa-drawer> `);
const input = el.querySelector('wa-input')!;

View File

@@ -141,7 +141,7 @@ export default class WaDrawer extends WebAwesomeElement {
private handleDialogCancel(event: Event) {
event.preventDefault();
if (!this.drawer.classList.contains('hide') && event.target === this.drawer) {
if (!this.drawer.classList.contains('hide')) {
this.requestClose(this.drawer);
}
}
@@ -210,8 +210,6 @@ export default class WaDrawer extends WebAwesomeElement {
const elementToFocus = this.querySelector<HTMLButtonElement>('[autofocus]');
if (elementToFocus && typeof elementToFocus.focus === 'function') {
elementToFocus.focus();
} else {
this.drawer.focus();
}
});

View File

@@ -9,31 +9,31 @@ export const icons: { [key: string]: { [key: string]: string } } = {
// Solid variant
//
solid: {
check: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"/></svg>`,
'chevron-down': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/></svg>`,
'chevron-left': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"/></svg>`,
'chevron-right': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>`,
circle: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0z"/></svg>`,
eyedropper: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M341.6 29.2l-101.6 101.6-9.4-9.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-9.4-9.4 101.6-101.6c39-39 39-102.2 0-141.1s-102.2-39-141.1 0zM55.4 323.3c-15 15-23.4 35.4-23.4 56.6l0 42.4-26.6 39.9c-8.5 12.7-6.8 29.6 4 40.4s27.7 12.5 40.4 4l39.9-26.6 42.4 0c21.2 0 41.6-8.4 56.6-23.4l109.4-109.4-45.3-45.3-109.4 109.4c-3 3-7.1 4.7-11.3 4.7l-36.1 0 0-36.1c0-4.2 1.7-8.3 4.7-11.3l109.4-109.4-45.3-45.3-109.4 109.4z"/></svg>`,
'grip-vertical': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M128 40c0-22.1-17.9-40-40-40L40 0C17.9 0 0 17.9 0 40L0 88c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zm0 192c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zM0 424l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40zM320 40c0-22.1-17.9-40-40-40L232 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zM192 232l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40zM320 424c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48z"/></svg>`,
check: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"/></svg>`,
'chevron-down': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/></svg>`,
'chevron-left': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"/></svg>`,
'chevron-right': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>`,
circle: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0z"/></svg>`,
eyedropper: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M341.6 29.2l-101.6 101.6-9.4-9.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-9.4-9.4 101.6-101.6c39-39 39-102.2 0-141.1s-102.2-39-141.1 0zM55.4 323.3c-15 15-23.4 35.4-23.4 56.6l0 42.4-26.6 39.9c-8.5 12.7-6.8 29.6 4 40.4s27.7 12.5 40.4 4l39.9-26.6 42.4 0c21.2 0 41.6-8.4 56.6-23.4l109.4-109.4-45.3-45.3-109.4 109.4c-3 3-7.1 4.7-11.3 4.7l-36.1 0 0-36.1c0-4.2 1.7-8.3 4.7-11.3l109.4-109.4-45.3-45.3-109.4 109.4z"/></svg>`,
'grip-vertical': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M128 40c0-22.1-17.9-40-40-40L40 0C17.9 0 0 17.9 0 40L0 88c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zm0 192c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zM0 424l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40zM320 40c0-22.1-17.9-40-40-40L232 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zM192 232l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40zM320 424c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48z"/></svg>`,
indeterminate: `<svg part="indeterminate-icon" class="icon" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round"><g stroke="currentColor" stroke-width="2"><g transform="translate(2.285714 6.857143)"><path d="M10.2857143,1.14285714 L1.14285714,1.14285714"/></g></g></g></svg>`,
minus: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32z"/></svg>`,
pause: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M48 32C21.5 32 0 53.5 0 80L0 432c0 26.5 21.5 48 48 48l64 0c26.5 0 48-21.5 48-48l0-352c0-26.5-21.5-48-48-48L48 32zm224 0c-26.5 0-48 21.5-48 48l0 352c0 26.5 21.5 48 48 48l64 0c26.5 0 48-21.5 48-48l0-352c0-26.5-21.5-48-48-48l-64 0z"/></svg>`,
play: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M91.2 36.9c-12.4-6.8-27.4-6.5-39.6 .7S32 57.9 32 72l0 368c0 14.1 7.5 27.2 19.6 34.4s27.2 7.5 39.6 .7l336-184c12.8-7 20.8-20.5 20.8-35.1s-8-28.1-20.8-35.1l-336-184z"/></svg>`,
star: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M309.5-18.9c-4.1-8-12.4-13.1-21.4-13.1s-17.3 5.1-21.4 13.1L193.1 125.3 33.2 150.7c-8.9 1.4-16.3 7.7-19.1 16.3s-.5 18 5.8 24.4l114.4 114.5-25.2 159.9c-1.4 8.9 2.3 17.9 9.6 23.2s16.9 6.1 25 2L288.1 417.6 432.4 491c8 4.1 17.7 3.3 25-2s11-14.2 9.6-23.2L441.7 305.9 556.1 191.4c6.4-6.4 8.6-15.8 5.8-24.4s-10.1-14.9-19.1-16.3L383 125.3 309.5-18.9z"/></svg>`,
user: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M224 248a120 120 0 1 0 0-240 120 120 0 1 0 0 240zm-29.7 56C95.8 304 16 383.8 16 482.3 16 498.7 29.3 512 45.7 512l356.6 0c16.4 0 29.7-13.3 29.7-29.7 0-98.5-79.8-178.3-178.3-178.3l-59.4 0z"/></svg>`,
xmark: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"/></svg>`,
minus: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32z"/></svg>`,
pause: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M48 32C21.5 32 0 53.5 0 80L0 432c0 26.5 21.5 48 48 48l64 0c26.5 0 48-21.5 48-48l0-352c0-26.5-21.5-48-48-48L48 32zm224 0c-26.5 0-48 21.5-48 48l0 352c0 26.5 21.5 48 48 48l64 0c26.5 0 48-21.5 48-48l0-352c0-26.5-21.5-48-48-48l-64 0z"/></svg>`,
play: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M91.2 36.9c-12.4-6.8-27.4-6.5-39.6 .7S32 57.9 32 72l0 368c0 14.1 7.5 27.2 19.6 34.4s27.2 7.5 39.6 .7l336-184c12.8-7 20.8-20.5 20.8-35.1s-8-28.1-20.8-35.1l-336-184z"/></svg>`,
star: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M309.5-18.9c-4.1-8-12.4-13.1-21.4-13.1s-17.3 5.1-21.4 13.1L193.1 125.3 33.2 150.7c-8.9 1.4-16.3 7.7-19.1 16.3s-.5 18 5.8 24.4l114.4 114.5-25.2 159.9c-1.4 8.9 2.3 17.9 9.6 23.2s16.9 6.1 25 2L288.1 417.6 432.4 491c8 4.1 17.7 3.3 25-2s11-14.2 9.6-23.2L441.7 305.9 556.1 191.4c6.4-6.4 8.6-15.8 5.8-24.4s-10.1-14.9-19.1-16.3L383 125.3 309.5-18.9z"/></svg>`,
user: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M224 248a120 120 0 1 0 0-240 120 120 0 1 0 0 240zm-29.7 56C95.8 304 16 383.8 16 482.3 16 498.7 29.3 512 45.7 512l356.6 0c16.4 0 29.7-13.3 29.7-29.7 0-98.5-79.8-178.3-178.3-178.3l-59.4 0z"/></svg>`,
xmark: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"/></svg>`,
},
//
// Regular variant
//
regular: {
'circle-question': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M464 256a208 208 0 1 0 -416 0 208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0zm256-80c-17.7 0-32 14.3-32 32 0 13.3-10.7 24-24 24s-24-10.7-24-24c0-44.2 35.8-80 80-80s80 35.8 80 80c0 47.2-36 67.2-56 74.5l0 3.8c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-8.1c0-20.5 14.8-35.2 30.1-40.2 6.4-2.1 13.2-5.5 18.2-10.3 4.3-4.2 7.7-10 7.7-19.6 0-17.7-14.3-32-32-32zM224 368a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"/></svg>`,
'circle-xmark': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM167 167c-9.4 9.4-9.4 24.6 0 33.9l55 55-55 55c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l55-55 55 55c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-55-55 55-55c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-55 55-55-55c-9.4-9.4-24.6-9.4-33.9 0z"/></svg>`,
copy: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M384 336l-192 0c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l133.5 0c4.2 0 8.3 1.7 11.3 4.7l58.5 58.5c3 3 4.7 7.1 4.7 11.3L400 320c0 8.8-7.2 16-16 16zM192 384l192 0c35.3 0 64-28.7 64-64l0-197.5c0-17-6.7-33.3-18.7-45.3L370.7 18.7C358.7 6.7 342.5 0 325.5 0L192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-16-48 0 0 16c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l16 0 0-48-16 0z"/></svg>`,
eye: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M288 80C222.8 80 169.2 109.6 128.1 147.7 89.6 183.5 63 226 49.4 256 63 286 89.6 328.5 128.1 364.3 169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256 513 226 486.4 183.5 447.9 147.7 406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1 3.3 7.9 3.3 16.7 0 24.6-14.9 35.7-46.2 87.7-93 131.1-47.1 43.7-111.8 80.6-192.6 80.6S142.5 443.2 95.4 399.4c-46.8-43.5-78.1-95.4-93-131.1-3.3-7.9-3.3-16.7 0-24.6 14.9-35.7 46.2-87.7 93-131.1zM288 336c44.2 0 80-35.8 80-80 0-29.6-16.1-55.5-40-69.3-1.4 59.7-49.6 107.9-109.3 109.3 13.8 23.9 39.7 40 69.3 40zm-79.6-88.4c2.5 .3 5 .4 7.6 .4 35.3 0 64-28.7 64-64 0-2.6-.2-5.1-.4-7.6-37.4 3.9-67.2 33.7-71.1 71.1zm45.6-115c10.8-3 22.2-4.5 33.9-4.5 8.8 0 17.5 .9 25.8 2.6 .3 .1 .5 .1 .8 .2 57.9 12.2 101.4 63.7 101.4 125.2 0 70.7-57.3 128-128 128-61.6 0-113-43.5-125.2-101.4-1.8-8.6-2.8-17.5-2.8-26.6 0-11 1.4-21.8 4-32 .2-.7 .3-1.3 .5-1.9 11.9-43.4 46.1-77.6 89.5-89.5z"/></svg>`,
'eye-slash': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M41-24.9c-9.4-9.4-24.6-9.4-33.9 0S-2.3-.3 7 9.1l528 528c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-96.4-96.4c2.7-2.4 5.4-4.8 8-7.2 46.8-43.5 78.1-95.4 93-131.1 3.3-7.9 3.3-16.7 0-24.6-14.9-35.7-46.2-87.7-93-131.1-47.1-43.7-111.8-80.6-192.6-80.6-56.8 0-105.6 18.2-146 44.2L41-24.9zM176.9 111.1c32.1-18.9 69.2-31.1 111.1-31.1 65.2 0 118.8 29.6 159.9 67.7 38.5 35.7 65.1 78.3 78.6 108.3-13.6 30-40.2 72.5-78.6 108.3-3.1 2.8-6.2 5.6-9.4 8.4L393.8 328c14-20.5 22.2-45.3 22.2-72 0-70.7-57.3-128-128-128-26.7 0-51.5 8.2-72 22.2l-39.1-39.1zm182 182l-108-108c11.1-5.8 23.7-9.1 37.1-9.1 44.2 0 80 35.8 80 80 0 13.4-3.3 26-9.1 37.1zM103.4 173.2l-34-34c-32.6 36.8-55 75.8-66.9 104.5-3.3 7.9-3.3 16.7 0 24.6 14.9 35.7 46.2 87.7 93 131.1 47.1 43.7 111.8 80.6 192.6 80.6 37.3 0 71.2-7.9 101.5-20.6L352.2 422c-20 6.4-41.4 10-64.2 10-65.2 0-118.8-29.6-159.9-67.7-38.5-35.7-65.1-78.3-78.6-108.3 10.4-23.1 28.6-53.6 54-82.8z"/></svg>`,
star: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M288.1-32c9 0 17.3 5.1 21.4 13.1L383 125.3 542.9 150.7c8.9 1.4 16.3 7.7 19.1 16.3s.5 18-5.8 24.4L441.7 305.9 467 465.8c1.4 8.9-2.3 17.9-9.6 23.2s-17 6.1-25 2L288.1 417.6 143.8 491c-8 4.1-17.7 3.3-25-2s-11-14.2-9.6-23.2L134.4 305.9 20 191.4c-6.4-6.4-8.6-15.8-5.8-24.4s10.1-14.9 19.1-16.3l159.9-25.4 73.6-144.2c4.1-8 12.4-13.1 21.4-13.1zm0 76.8L230.3 158c-3.5 6.8-10 11.6-17.6 12.8l-125.5 20 89.8 89.9c5.4 5.4 7.9 13.1 6.7 20.7l-19.8 125.5 113.3-57.6c6.8-3.5 14.9-3.5 21.8 0l113.3 57.6-19.8-125.5c-1.2-7.6 1.3-15.3 6.7-20.7l89.8-89.9-125.5-20c-7.6-1.2-14.1-6-17.6-12.8L288.1 44.8z"/></svg>`,
'circle-question': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M464 256a208 208 0 1 0 -416 0 208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0zm256-80c-17.7 0-32 14.3-32 32 0 13.3-10.7 24-24 24s-24-10.7-24-24c0-44.2 35.8-80 80-80s80 35.8 80 80c0 47.2-36 67.2-56 74.5l0 3.8c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-8.1c0-20.5 14.8-35.2 30.1-40.2 6.4-2.1 13.2-5.5 18.2-10.3 4.3-4.2 7.7-10 7.7-19.6 0-17.7-14.3-32-32-32zM224 368a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"/></svg>`,
'circle-xmark': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM167 167c-9.4 9.4-9.4 24.6 0 33.9l55 55-55 55c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l55-55 55 55c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-55-55 55-55c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-55 55-55-55c-9.4-9.4-24.6-9.4-33.9 0z"/></svg>`,
copy: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M384 336l-192 0c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l133.5 0c4.2 0 8.3 1.7 11.3 4.7l58.5 58.5c3 3 4.7 7.1 4.7 11.3L400 320c0 8.8-7.2 16-16 16zM192 384l192 0c35.3 0 64-28.7 64-64l0-197.5c0-17-6.7-33.3-18.7-45.3L370.7 18.7C358.7 6.7 342.5 0 325.5 0L192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-16-48 0 0 16c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l16 0 0-48-16 0z"/></svg>`,
eye: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M288 80C222.8 80 169.2 109.6 128.1 147.7 89.6 183.5 63 226 49.4 256 63 286 89.6 328.5 128.1 364.3 169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256 513 226 486.4 183.5 447.9 147.7 406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1 3.3 7.9 3.3 16.7 0 24.6-14.9 35.7-46.2 87.7-93 131.1-47.1 43.7-111.8 80.6-192.6 80.6S142.5 443.2 95.4 399.4c-46.8-43.5-78.1-95.4-93-131.1-3.3-7.9-3.3-16.7 0-24.6 14.9-35.7 46.2-87.7 93-131.1zM288 336c44.2 0 80-35.8 80-80 0-29.6-16.1-55.5-40-69.3-1.4 59.7-49.6 107.9-109.3 109.3 13.8 23.9 39.7 40 69.3 40zm-79.6-88.4c2.5 .3 5 .4 7.6 .4 35.3 0 64-28.7 64-64 0-2.6-.2-5.1-.4-7.6-37.4 3.9-67.2 33.7-71.1 71.1zm45.6-115c10.8-3 22.2-4.5 33.9-4.5 8.8 0 17.5 .9 25.8 2.6 .3 .1 .5 .1 .8 .2 57.9 12.2 101.4 63.7 101.4 125.2 0 70.7-57.3 128-128 128-61.6 0-113-43.5-125.2-101.4-1.8-8.6-2.8-17.5-2.8-26.6 0-11 1.4-21.8 4-32 .2-.7 .3-1.3 .5-1.9 11.9-43.4 46.1-77.6 89.5-89.5z"/></svg>`,
'eye-slash': `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M41-24.9c-9.4-9.4-24.6-9.4-33.9 0S-2.3-.3 7 9.1l528 528c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-96.4-96.4c2.7-2.4 5.4-4.8 8-7.2 46.8-43.5 78.1-95.4 93-131.1 3.3-7.9 3.3-16.7 0-24.6-14.9-35.7-46.2-87.7-93-131.1-47.1-43.7-111.8-80.6-192.6-80.6-56.8 0-105.6 18.2-146 44.2L41-24.9zM176.9 111.1c32.1-18.9 69.2-31.1 111.1-31.1 65.2 0 118.8 29.6 159.9 67.7 38.5 35.7 65.1 78.3 78.6 108.3-13.6 30-40.2 72.5-78.6 108.3-3.1 2.8-6.2 5.6-9.4 8.4L393.8 328c14-20.5 22.2-45.3 22.2-72 0-70.7-57.3-128-128-128-26.7 0-51.5 8.2-72 22.2l-39.1-39.1zm182 182l-108-108c11.1-5.8 23.7-9.1 37.1-9.1 44.2 0 80 35.8 80 80 0 13.4-3.3 26-9.1 37.1zM103.4 173.2l-34-34c-32.6 36.8-55 75.8-66.9 104.5-3.3 7.9-3.3 16.7 0 24.6 14.9 35.7 46.2 87.7 93 131.1 47.1 43.7 111.8 80.6 192.6 80.6 37.3 0 71.2-7.9 101.5-20.6L352.2 422c-20 6.4-41.4 10-64.2 10-65.2 0-118.8-29.6-159.9-67.7-38.5-35.7-65.1-78.3-78.6-108.3 10.4-23.1 28.6-53.6 54-82.8z"/></svg>`,
star: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M288.1-32c9 0 17.3 5.1 21.4 13.1L383 125.3 542.9 150.7c8.9 1.4 16.3 7.7 19.1 16.3s.5 18-5.8 24.4L441.7 305.9 467 465.8c1.4 8.9-2.3 17.9-9.6 23.2s-17 6.1-25 2L288.1 417.6 143.8 491c-8 4.1-17.7 3.3-25-2s-11-14.2-9.6-23.2L134.4 305.9 20 191.4c-6.4-6.4-8.6-15.8-5.8-24.4s10.1-14.9 19.1-16.3l159.9-25.4 73.6-144.2c4.1-8 12.4-13.1 21.4-13.1zm0 76.8L230.3 158c-3.5 6.8-10 11.6-17.6 12.8l-125.5 20 89.8 89.9c5.4 5.4 7.9 13.1 6.7 20.7l-19.8 125.5 113.3-57.6c6.8-3.5 14.9-3.5 21.8 0l113.3 57.6-19.8-125.5c-1.2-7.6 1.3-15.3 6.7-20.7l89.8-89.9-125.5-20c-7.6-1.2-14.1-6-17.6-12.8L288.1 44.8z"/></svg>`,
},
};

View File

@@ -44,18 +44,17 @@
}
/* Appearance modifiers */
:host([appearance='outlined']) .text-field {
:host([appearance~='outlined']) .text-field {
background-color: var(--wa-form-control-background-color);
border-color: var(--wa-form-control-border-color);
}
:host([appearance='filled']) .text-field {
:host([appearance~='filled']) .text-field {
background-color: var(--wa-color-neutral-fill-quiet);
border-color: var(--wa-color-neutral-fill-quiet);
}
:host([appearance='filled-outlined']) .text-field {
background-color: var(--wa-color-neutral-fill-quiet);
:host([appearance~='filled'][appearance~='outlined']) .text-field {
border-color: var(--wa-form-control-border-color);
}
@@ -63,40 +62,22 @@
border-radius: var(--wa-border-radius-pill) !important;
}
.text-field {
/* Show autofill styles over the entire text field, not just the native <input> */
&:has(:autofill),
&:has(:-webkit-autofill) {
background-color: var(--wa-color-brand-fill-quiet) !important;
}
input,
textarea {
/*
.text-field input,
.text-field textarea {
/*
Fixes an alignment issue with placeholders.
https://github.com/shoelace-style/webawesome/issues/342
*/
height: 100%;
height: 100%;
padding: 0;
border: none;
outline: none;
box-shadow: none;
margin: 0;
cursor: inherit;
-webkit-appearance: none;
font: inherit;
/* Turn off Safari's autofill styles */
&:-webkit-autofill,
&:-webkit-autofill:hover,
&:-webkit-autofill:focus,
&:-webkit-autofill:active {
-webkit-background-clip: text;
background-color: transparent;
-webkit-text-fill-color: inherit;
}
}
padding: 0;
border: none;
outline: none;
box-shadow: none;
margin: 0;
cursor: inherit;
-webkit-appearance: none;
font: inherit;
}
input {

View File

@@ -111,7 +111,7 @@ export default class WaInput extends WebAwesomeFormAssociatedElement {
@property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';
/** The input's visual appearance. */
@property({ reflect: true }) appearance: 'filled' | 'outlined' | 'filled-outlined' = 'outlined';
@property({ reflect: true }) appearance: 'filled' | 'outlined' = 'outlined';
/** Draws a pill-style input with rounded edges. */
@property({ type: Boolean, reflect: true }) pill = false;

View File

@@ -47,7 +47,7 @@ export default class WaRadio extends WebAwesomeFormAssociatedElement {
/** The radio's value. When selected, the radio group will receive this value. */
@property({ reflect: true }) value: string;
/** The radio's visual appearance. */
/** The radio's value. When selected, the radio group will receive this value. */
@property({ reflect: true }) appearance: 'default' | 'button' = 'default';
/**

View File

@@ -93,18 +93,17 @@
}
/* Appearance modifiers */
:host([appearance='outlined']) .combobox {
:host([appearance~='outlined']) .combobox {
background-color: var(--wa-form-control-background-color);
border-color: var(--wa-form-control-border-color);
}
:host([appearance='filled']) .combobox {
:host([appearance~='filled']) .combobox {
background-color: var(--wa-color-neutral-fill-quiet);
border-color: var(--wa-color-neutral-fill-quiet);
}
:host([appearance='filled-outlined']) .combobox {
background-color: var(--wa-color-neutral-fill-quiet);
:host([appearance~='filled'][appearance~='outlined']) .combobox {
border-color: var(--wa-form-control-border-color);
}

View File

@@ -229,7 +229,7 @@ export default class WaSelect extends WebAwesomeFormAssociatedElement {
@property({ type: Boolean, reflect: true }) open = false;
/** The select's visual appearance. */
@property({ reflect: true }) appearance: 'filled' | 'outlined' | 'filled-outlined' = 'outlined';
@property({ reflect: true }) appearance: 'filled' | 'outlined' = 'outlined';
/** Draws a pill-style select with rounded edges. */
@property({ type: Boolean, reflect: true }) pill = false;

View File

@@ -1,6 +1,6 @@
import type { PropertyValues } from 'lit';
import { html } from 'lit';
import { customElement, property, query, state } from 'lit/decorators.js';
import { customElement, property, query, queryAll, state } from 'lit/decorators.js';
import { classMap } from 'lit/directives/class-map.js';
import { DraggableElement } from '../../internal/drag.js';
import { clamp } from '../../internal/math.js';
@@ -99,6 +99,7 @@ export default class WaSlider extends WebAwesomeFormAssociatedElement {
@query('#thumb-max') thumbMax: HTMLElement;
@query('#track') track: HTMLElement;
@query('#tooltip') tooltip: WaTooltip;
@queryAll('wa-tooltip') tooltips: NodeListOf<WaTooltip>;
/**
* The slider's label. If you need to provide HTML in the label, use the `label` slot instead.
@@ -687,29 +688,19 @@ export default class WaSlider extends WebAwesomeFormAssociatedElement {
}
private showRangeTooltips() {
if (!this.withTooltip) return;
// Show only the active tooltip, hide the other
const tooltipMin = this.shadowRoot?.querySelector('#tooltip-thumb-min') as WaTooltip;
const tooltipMax = this.shadowRoot?.querySelector('#tooltip-thumb-max') as WaTooltip;
if (this.activeThumb === 'min') {
if (tooltipMin) tooltipMin.open = true;
if (tooltipMax) tooltipMax.open = false;
} else if (this.activeThumb === 'max') {
if (tooltipMax) tooltipMax.open = true;
if (tooltipMin) tooltipMin.open = false;
if (this.withTooltip) {
this.tooltips.forEach(tooltip => {
tooltip.open = true;
});
}
}
private hideRangeTooltips() {
if (!this.withTooltip) return;
const tooltipMin = this.shadowRoot?.querySelector('#tooltip-thumb-min') as WaTooltip;
const tooltipMax = this.shadowRoot?.querySelector('#tooltip-thumb-max') as WaTooltip;
if (tooltipMin) tooltipMin.open = false;
if (tooltipMax) tooltipMax.open = false;
if (this.withTooltip) {
this.tooltips.forEach(tooltip => {
tooltip.open = false;
});
}
}
/** Updates the form value submission for range sliders */

View File

@@ -27,6 +27,7 @@
.body {
display: block;
overflow: auto;
}
.scroll-button {

View File

@@ -20,25 +20,23 @@
}
/* Appearance modifiers */
:host([appearance='outlined']) {
:host([appearance~='outlined']) {
color: var(--wa-color-on-quiet, var(--wa-color-neutral-on-quiet));
background-color: transparent;
border-color: var(--wa-color-border-loud, var(--wa-color-neutral-border-loud));
}
:host([appearance='filled']) {
:host([appearance~='filled']) {
color: var(--wa-color-on-quiet, var(--wa-color-neutral-on-quiet));
background-color: var(--wa-color-fill-quiet, var(--wa-color-neutral-fill-quiet));
border-color: transparent;
}
:host([appearance='filled-outlined']) {
color: var(--wa-color-on-quiet, var(--wa-color-neutral-on-quiet));
background-color: var(--wa-color-fill-quiet, var(--wa-color-neutral-fill-quiet));
:host([appearance~='filled'][appearance~='outlined']) {
border-color: var(--wa-color-border-normal, var(--wa-color-neutral-border-normal));
}
:host([appearance='accent']) {
:host([appearance~='accent']) {
color: var(--wa-color-on-loud, var(--wa-color-neutral-on-loud));
background-color: var(--wa-color-fill-loud, var(--wa-color-neutral-fill-loud));
border-color: transparent;

View File

@@ -35,7 +35,7 @@ export default class WaTag extends WebAwesomeElement {
@property({ reflect: true }) variant: 'brand' | 'neutral' | 'success' | 'warning' | 'danger' = 'neutral';
/** The tag's visual appearance. */
@property({ reflect: true }) appearance: 'accent' | 'filled' | 'outlined' | 'filled-outlined' = 'filled-outlined';
@property({ reflect: true }) appearance: 'accent' | 'filled' | 'outlined' | 'outlined filled' = 'outlined filled';
/** The tag's size. */
@property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';

View File

@@ -24,18 +24,17 @@
}
/* Appearance modifiers */
:host([appearance='outlined']) .textarea {
:host([appearance~='outlined']) .textarea {
background-color: var(--wa-form-control-background-color);
border-color: var(--wa-form-control-border-color);
}
:host([appearance='filled']) .textarea {
:host([appearance~='filled']) .textarea {
background-color: var(--wa-color-neutral-fill-quiet);
border-color: var(--wa-color-neutral-fill-quiet);
}
:host([appearance='filled-outlined']) .textarea {
background-color: var(--wa-color-neutral-fill-quiet);
:host([appearance~='filled'][appearance~='outlined']) .textarea {
border-color: var(--wa-form-control-border-color);
}

View File

@@ -84,7 +84,7 @@ export default class WaTextarea extends WebAwesomeFormAssociatedElement {
@property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';
/** The textarea's visual appearance. */
@property({ reflect: true }) appearance: 'filled' | 'outlined' | 'filled-outlined' = 'outlined';
@property({ reflect: true }) appearance: 'filled' | 'outlined' = 'outlined';
/** The textarea's label. If you need to display HTML, use the `label` slot instead. */
@property() label = '';

View File

@@ -101,11 +101,6 @@ export default class WaTooltip extends WebAwesomeElement {
connectedCallback() {
super.connectedCallback();
// Recreate event controller if it was aborted
if (this.eventController.signal.aborted) {
this.eventController = new AbortController();
}
// TODO: This is a hack that I need to revisit [Konnor]
if (this.open) {
this.open = false;
@@ -118,15 +113,6 @@ export default class WaTooltip extends WebAwesomeElement {
if (!this.id) {
this.id = uniqueId('wa-tooltip-');
}
// Re-establish anchor connection after being disconnected
if (this.for && this.anchor) {
this.anchor = null; // force reattach
this.handleForChange();
} else if (this.for) {
// Initial connection
this.handleForChange();
}
}
disconnectedCallback() {

View File

@@ -5,17 +5,17 @@
/* Label */
:is([part~='form-control-label'], [part~='label']):has(*:not(:empty)) {
display: inline-flex;
display: inline-block;
color: var(--wa-form-control-label-color);
font-weight: var(--wa-form-control-label-font-weight);
line-height: var(--wa-form-control-label-line-height);
margin-block-end: 0.5em;
}
:host([required]) :is([part~='form-control-label'], [part~='label'])::after {
content: var(--wa-form-control-required-content);
margin-inline-start: var(--wa-form-control-required-content-offset);
color: var(--wa-form-control-required-content-color);
:host([required]) &::after {
content: var(--wa-form-control-required-content);
margin-inline-start: var(--wa-form-control-required-content-offset);
color: var(--wa-form-control-required-content-color);
}
}
/* Help text */

View File

@@ -228,7 +228,6 @@
font-family: var(--wa-font-family-code);
font-size: var(--wa-font-size-smaller);
font-weight: var(--wa-font-weight-code);
border: solid var(--wa-border-width-s) color-mix(in oklab, currentColor, transparent 50%);
border-radius: var(--wa-border-radius-s);
@@ -282,7 +281,6 @@
font-family: var(--wa-font-family-code);
font-size: var(--wa-font-size-smaller);
font-weight: var(--wa-font-weight-code);
background-color: var(--wa-color-overlay-inline);
border-radius: var(--wa-border-radius-s);
@@ -293,7 +291,6 @@
font-family: var(--wa-font-family-code);
font-size: var(--wa-font-size-smaller);
font-weight: var(--wa-font-weight-code);
white-space: pre;
background-color: var(--wa-color-overlay-inline);
@@ -465,7 +462,7 @@
&::after {
content: '';
background-color: var(--wa-color-text-quiet);
mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>')
mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="16" width="10" viewBox="0 0 320 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"/></svg>')
center no-repeat;
width: 1rem;
height: 1rem;
@@ -877,6 +874,7 @@
input[type='radio'] {
appearance: none;
position: relative;
flex: 0 0 auto;
align-items: center;
justify-content: center;
@@ -924,18 +922,21 @@
&:checked::after,
&:indeterminate::after {
position: absolute;
width: round(calc(100% - var(--wa-form-control-border-width) * 2), 1px);
height: round(calc(100% - var(--wa-form-control-border-width) * 2), 1px);
content: '';
width: var(--wa-form-control-toggle-size);
height: var(--wa-form-control-toggle-size);
scale: var(--checked-icon-scale);
background-color: currentColor;
scale: var(--checked-icon-scale);
}
&:checked::after {
mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"/></svg>')
center / 1em 1em no-repeat;
mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="currentColor" d="M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"/></svg>')
center no-repeat;
}
&:indeterminate::after {
@@ -963,8 +964,7 @@
content: '';
aspect-ratio: 1;
width: 100%;
scale: var(--checked-icon-scale);
width: round(calc(100% * var(--checked-icon-scale)), 1px);
background-color: currentColor;
border-radius: 50%;
@@ -1065,7 +1065,9 @@
/* Select */
select {
--icon-caret: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Free 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --><path fill="rgb(180 180 200)" d="M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/></svg>');
--icon-caret: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" viewBox="0 0 512 512"><path fill="rgb(180 180 200)" d="M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/></svg>');
--icon-caret: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" viewBox="0 0 448 512"><!--! Font Awesome Pro 7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2025 Fonticons, Inc. --><path fill="rgb(180 180 200)" d="M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"/></svg>');
appearance: none;
@@ -1078,7 +1080,6 @@
background-repeat: no-repeat;
background-position: center right var(--wa-form-control-padding-inline);
background-blend-mode: hue, difference;
background-size: 1rem 1rem;
cursor: pointer;
}

View File

@@ -332,7 +332,7 @@
--wa-form-control-required-content: '*';
--wa-form-control-required-content-color: inherit;
--wa-form-control-required-content-offset: 0.1em;
--wa-form-control-required-content-offset: -0.1em;
--wa-form-control-padding-block: 1em;
--wa-form-control-padding-inline: 1.25em;

View File

@@ -326,7 +326,7 @@
--wa-form-control-required-content: '*';
--wa-form-control-required-content-color: inherit;
--wa-form-control-required-content-offset: 0.1em;
--wa-form-control-required-content-offset: -0.1em;
--wa-form-control-padding-block: 0.75em;
--wa-form-control-padding-inline: 1em;

View File

@@ -332,7 +332,7 @@
--wa-form-control-required-content: '*';
--wa-form-control-required-content-color: inherit;
--wa-form-control-required-content-offset: 0.1em;
--wa-form-control-required-content-offset: -0.1em;
--wa-form-control-padding-block: 0.75em;
--wa-form-control-padding-inline: 1em;
@@ -457,7 +457,7 @@
border-color: var(--wa-color-gray-50);
}
&:state(checked)::part(control) {
&[checked]::part(control) {
background-color: var(--wa-form-control-activated-color);
border-color: var(--wa-form-control-activated-color);
}
@@ -466,7 +466,7 @@
background-color: var(--wa-color-surface-default);
border: var(--wa-border-width-s) var(--wa-border-style) var(--wa-color-gray-50);
}
&:state(checked)::part(thumb) {
&[checked]::part(thumb) {
border-color: var(--wa-form-control-activated-color);
}
}

View File

@@ -1,139 +1,106 @@
@layer wa-utilities {
/* #region General ~~~~~ */
[class*='wa-body'] {
font-family: var(--wa-font-family-body);
font-weight: var(--wa-font-weight-body);
line-height: var(--wa-line-height-normal);
}
[class*='wa-heading'] {
.wa-heading-xs,
.wa-heading-s,
.wa-heading-m,
.wa-heading-l,
.wa-heading-xl,
.wa-heading-2xl,
.wa-heading-3xl {
font-family: var(--wa-font-family-heading);
font-weight: var(--wa-font-weight-heading);
line-height: var(--wa-line-height-condensed);
text-wrap: balance;
}
[class*='wa-caption'] {
.wa-heading-xs {
font-size: var(--wa-font-size-s);
}
.wa-heading-s {
font-size: var(--wa-font-size-m);
}
.wa-heading-m {
font-size: var(--wa-font-size-l);
}
.wa-heading-l {
font-size: var(--wa-font-size-xl);
}
.wa-heading-xl {
font-size: var(--wa-font-size-2xl);
}
.wa-heading-2xl {
font-size: var(--wa-font-size-3xl);
}
.wa-heading-3xl {
font-size: var(--wa-font-size-4xl);
}
.wa-body-xs,
.wa-body-s,
.wa-body-m,
.wa-body-l,
.wa-body-xl {
font-family: var(--wa-font-family-body);
font-weight: var(--wa-font-weight-body);
line-height: var(--wa-line-height-normal);
}
.wa-body-xs {
font-size: var(--wa-font-size-xs);
}
.wa-body-s {
font-size: var(--wa-font-size-s);
}
.wa-body-m {
font-size: var(--wa-font-size-m);
}
.wa-body-l {
font-size: var(--wa-font-size-l);
}
.wa-body-xl {
font-size: var(--wa-font-size-xl);
}
.wa-caption-xs,
.wa-caption-s,
.wa-caption-m,
.wa-caption-l,
.wa-caption-xl {
color: var(--wa-color-text-quiet);
font-family: var(--wa-font-family-body);
font-weight: var(--wa-font-weight-body);
line-height: var(--wa-line-height-condensed);
}
[class*='wa-longform'] {
font-family: var(--wa-font-family-longform);
font-weight: var(--wa-font-weight-longform);
line-height: var(--wa-line-height-normal);
}
.wa-font-size-2xs,
.wa-body-2xs,
.wa-heading-2xs,
.wa-caption-2xs,
.wa-longform-2xs {
.wa-caption-xs {
font-size: var(--wa-font-size-2xs);
}
.wa-font-size-xs,
.wa-body-xs,
.wa-heading-xs,
.wa-caption-xs,
.wa-longform-xs {
.wa-caption-s {
font-size: var(--wa-font-size-xs);
}
.wa-font-size-s,
.wa-body-s,
.wa-heading-s,
.wa-caption-s,
.wa-longform-s {
.wa-caption-m {
font-size: var(--wa-font-size-s);
}
.wa-font-size-m,
.wa-body-m,
.wa-heading-m,
.wa-caption-m,
.wa-longform-m {
.wa-caption-l {
font-size: var(--wa-font-size-m);
}
.wa-font-size-l,
.wa-body-l,
.wa-heading-l,
.wa-caption-l,
.wa-longform-l {
.wa-caption-xl {
font-size: var(--wa-font-size-l);
}
.wa-font-size-xl,
.wa-body-xl,
.wa-heading-xl,
.wa-caption-xl,
.wa-longform-xl {
font-size: var(--wa-font-size-xl);
}
.wa-font-size-2xl,
.wa-body-2xl,
.wa-heading-2xl,
.wa-caption-2xl,
.wa-longform-2xl {
font-size: var(--wa-font-size-2xl);
}
.wa-font-size-3xl,
.wa-body-3xl,
.wa-heading-3xl,
.wa-caption-3xl,
.wa-longform-3xl {
font-size: var(--wa-font-size-3xl);
}
.wa-font-size-4xl,
.wa-body-4xl,
.wa-heading-4xl,
.wa-caption-4xl,
.wa-longform-4xl {
font-size: var(--wa-font-size-4xl);
}
.wa-font-weight-light {
font-weight: var(--wa-font-weight-light);
}
.wa-font-weight-normal {
font-weight: var(--wa-font-weight-normal);
}
.wa-font-weight-semibold {
font-weight: var(--wa-font-weight-semibold);
}
.wa-font-weight-bold {
font-weight: var(--wa-font-weight-bold);
}
.wa-color-text-normal {
color: var(--wa-color-text-normal);
}
.wa-color-text-quiet {
color: var(--wa-color-text-quiet);
}
.wa-color-text-link {
color: var(--wa-color-text-link);
}
.wa-text-truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* #endregion */
/* #region Links ~~~~~~~ */
.wa-link {
color: var(--wa-color-text-link);
text-decoration: var(--wa-link-decoration-default);
@@ -159,43 +126,4 @@
}
}
}
/* #endregion */
/* #region Lists ~~~~~~~ */
.wa-list-plain:is(ol, ul) {
list-style: none;
padding-inline-start: 0;
> li {
margin-inline-start: 0;
}
}
/* #endregion */
/* #region Form Controls */
.wa-form-control-label {
color: var(--wa-form-control-label-color);
font-weight: var(--wa-form-control-label-font-weight);
line-height: var(--wa-form-control-label-line-height);
}
.wa-form-control-value {
color: var(--wa-form-control-value-color);
font-weight: var(--wa-form-control-value-font-weight);
line-height: var(--wa-form-control-value-line-height);
}
.wa-form-control-placeholder {
color: var(--wa-form-control-placeholder-color);
font-weight: var(--wa-form-control-value-font-weight);
line-height: var(--wa-form-control-value-line-height);
}
.wa-form-control-hint {
color: var(--wa-form-control-hint-color);
font-weight: var(--wa-form-control-hint-font-weight);
font-size: var(--wa-font-size-smaller);
line-height: var(--wa-form-control-hint-line-height);
}
/* #endregion */
}