chrome: the shared shell, extracted from four copies
One page frame, one palette, one set of components, one implementation of config readers, proxy auth, /healthz, i18n and cache-busted asset URLs. The design tokens had been copied into homepage, marketplace, agent-bridge and scribe and had started to drift; so had theme.js and the asset() helper, which existed in two incompatible versions. board.css carried the instruction "Copy the values from homepage's style.css when they change there", which is the problem stated as a procedure. Components come from Web Awesome 3.14.0 (MIT), vendored under static/wa by vendor-webawesome.sh - curl and tar against the npm registry, so there is no node_modules, no lockfile and nothing for CI or a Containerfile to run. The script prunes type definitions and IDE metadata, 13M down to 3.4M, and keeps only the en and pl translations. Components style themselves inside a shadow root, so a page rule cannot reach into one: "this input is the wrong width" stops being a thing that can happen rather than a thing to be careful about. Two decisions worth recording here: - Asset versioning is a content digest over the whole static tree, not each file's mtime. mtime is wrong in a container, where every COPY'd file carries the build timestamp, so every asset appeared to change on every build. A single tree-wide token also means a cached page can never pair itself with a newer script. - Pages keep the data-theme="light|dark|system" attribute the services have always used. Web Awesome drives light/dark from a wa-light/wa-dark class instead; base.html and theme.js own that mapping so nothing else learns it. The compatibility aliases in tokens.css (--bg, --surface, --accent, ...) are deliberate: they let a service move page by page instead of all at once. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
f6c8fe3d36
609 changed files with 56337 additions and 0 deletions
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
__pycache__/
|
||||
*.egg-info/
|
||||
.pytest_cache/
|
||||
.venv/
|
||||
dist/
|
||||
build/
|
||||
7
LICENSE-webawesome.md
Normal file
7
LICENSE-webawesome.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
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.
|
||||
93
README.md
Normal file
93
README.md
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
# chrome
|
||||
|
||||
The shared shell for the internal services: one page frame, one palette, one
|
||||
set of components, one implementation of the handful of things every service
|
||||
needs (config readers, proxy auth, `/healthz`, i18n, cache-busted assets).
|
||||
|
||||
It exists because the same stylesheet had been copied into four repositories
|
||||
and had started to drift — along with `theme.js`, the `asset()` helper and
|
||||
the error pages. A token change should be one commit here and a version bump
|
||||
there, not four hand-edits with one forgotten.
|
||||
|
||||
## What's in it
|
||||
|
||||
| Module | Replaces |
|
||||
|---|---|
|
||||
| `chrome.app.Chrome` | per-service app factory boilerplate, error pages, static mounts |
|
||||
| `chrome.config` | three near-identical `_bool`/`_int`/`_list` env readers |
|
||||
| `chrome.auth` | agent-bridge's `Remote-User` + proxy-key check |
|
||||
| `chrome.health` | four copies of `/healthz` |
|
||||
| `chrome.i18n` | homepage's pl/en machinery, which nothing else could reuse |
|
||||
| `chrome.assets` | two different cache-busting strategies, one of them broken in containers |
|
||||
| `templates/base.html` | four page shells |
|
||||
| `static/tokens.css` | four copies of the design tokens |
|
||||
|
||||
## UI components
|
||||
|
||||
[Web Awesome](https://webawesome.com) (MIT, Fonticons) is vendored under
|
||||
`chrome/static/wa/`. The autoloader registers each `<wa-*>` element the first
|
||||
time it appears, so there is no per-component import list.
|
||||
|
||||
Components are styled inside a shadow root, which means a page rule **cannot**
|
||||
reach into one. That is the point: "this input is the wrong width" stops being
|
||||
a thing that can happen. Customise through `--wa-*` tokens and `::part()`.
|
||||
|
||||
Note that Combobox, Date Picker, File Input and the chart components are
|
||||
Web Awesome **Pro**, and are not vendored here. Use a native control or a
|
||||
different component.
|
||||
|
||||
### Upgrading Web Awesome
|
||||
|
||||
```sh
|
||||
./vendor-webawesome.sh 3.15.0 # then commit the diff
|
||||
```
|
||||
|
||||
Plain `curl` and `tar` against the npm registry — no `npm install`, no
|
||||
`node_modules`, no lockfile, nothing for CI or a Containerfile to run.
|
||||
The script prunes type definitions and IDE metadata (~13M down to ~3.4M)
|
||||
and keeps only the `en` and `pl` translations.
|
||||
|
||||
## Using it
|
||||
|
||||
```python
|
||||
from fastapi import FastAPI
|
||||
from chrome.app import Chrome
|
||||
|
||||
app = FastAPI()
|
||||
ui = Chrome(
|
||||
app,
|
||||
service="marketplace",
|
||||
version="0.2.0",
|
||||
title="Skills Marketplace",
|
||||
templates_dir=HERE / "templates",
|
||||
static_dir=HERE / "static",
|
||||
locales_dir=HERE / "locales",
|
||||
)
|
||||
|
||||
@app.get("/")
|
||||
def index(request: Request):
|
||||
return ui.render(request, "index.html", things=[...])
|
||||
```
|
||||
|
||||
Templates `{% extends "base.html" %}` and fill `content`. Service templates
|
||||
and chrome's are both on the loader path, service first.
|
||||
|
||||
## Depending on it
|
||||
|
||||
Pin a tag, not a branch:
|
||||
|
||||
```toml
|
||||
dependencies = [
|
||||
"chrome @ git+https://git.wierzbowa.cloud/michal/chrome@v0.1.0",
|
||||
]
|
||||
```
|
||||
|
||||
For the edit loop, install it editable alongside the service:
|
||||
`pip install -e ../chrome`.
|
||||
|
||||
## Theme convention
|
||||
|
||||
Pages use `data-theme="light|dark|system"` on `<html>`, which is what the
|
||||
services have always used. Web Awesome drives light/dark from a `wa-light` /
|
||||
`wa-dark` class instead; `base.html` and `theme.js` own that mapping, so no
|
||||
service or stylesheet needs to know about it.
|
||||
17
chrome/__init__.py
Normal file
17
chrome/__init__.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
"""Shared chrome for the internal services: page shell, design tokens,
|
||||
Web Awesome, config/auth/health helpers.
|
||||
|
||||
Nothing in here knows what any particular service does. If a change would
|
||||
need an `if service == "marketplace"`, it belongs in the service.
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
__version__ = "0.1.0"
|
||||
|
||||
PACKAGE_DIR = Path(__file__).parent
|
||||
STATIC_DIR = PACKAGE_DIR / "static"
|
||||
TEMPLATES_DIR = PACKAGE_DIR / "templates"
|
||||
|
||||
#: Web Awesome release vendored under static/wa. Written by vendor-webawesome.sh.
|
||||
WEBAWESOME_VERSION = (STATIC_DIR / "wa" / "VERSION").read_text().strip()
|
||||
149
chrome/app.py
Normal file
149
chrome/app.py
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
"""The FastAPI seam.
|
||||
|
||||
`Chrome` is a helper a service composes with, not a framework that owns the
|
||||
service's app. It mounts the two static trees, builds a Jinja environment
|
||||
that can see both chrome's templates and the service's own, injects the
|
||||
shell's context, and installs themed error pages. Everything else is the
|
||||
service's business.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from fastapi import FastAPI, Request
|
||||
from fastapi.responses import HTMLResponse, RedirectResponse, Response
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
from fastapi.templating import Jinja2Templates
|
||||
from jinja2 import ChoiceLoader, FileSystemLoader
|
||||
from starlette.exceptions import HTTPException as StarletteHTTPException
|
||||
|
||||
from . import STATIC_DIR, TEMPLATES_DIR, WEBAWESOME_VERSION, assets, i18n
|
||||
from .health import health_router
|
||||
|
||||
#: Where chrome's own static tree is served. Distinct from the service's
|
||||
#: /static so a service can never shadow a shell asset by accident.
|
||||
CHROME_STATIC_PATH = "/chrome"
|
||||
|
||||
|
||||
class Chrome:
|
||||
def __init__(
|
||||
self,
|
||||
app: FastAPI,
|
||||
*,
|
||||
service: str,
|
||||
version: str,
|
||||
title: str,
|
||||
subtitle: str = "",
|
||||
templates_dir: Path | None = None,
|
||||
static_dir: Path | None = None,
|
||||
locales_dir: Path | None = None,
|
||||
) -> None:
|
||||
self.app = app
|
||||
self.service = service
|
||||
self.version = version
|
||||
self.title = title
|
||||
self.subtitle = subtitle
|
||||
self.translations = i18n.Translations(locales_dir)
|
||||
|
||||
app.mount(
|
||||
CHROME_STATIC_PATH, StaticFiles(directory=STATIC_DIR), name="chrome-static"
|
||||
)
|
||||
if static_dir:
|
||||
app.mount("/static", StaticFiles(directory=static_dir), name="static")
|
||||
|
||||
# One token over chrome's tree and the service's, so any change to
|
||||
# either invalidates both and a page can never pair old CSS with new JS.
|
||||
self.asset_version = assets.digest(
|
||||
*(p for p in (STATIC_DIR, static_dir) if p is not None)
|
||||
)
|
||||
|
||||
loaders = [FileSystemLoader(templates_dir)] if templates_dir else []
|
||||
loaders.append(FileSystemLoader(TEMPLATES_DIR))
|
||||
self.templates = Jinja2Templates(directory=str(TEMPLATES_DIR))
|
||||
self.templates.env.loader = ChoiceLoader(loaders)
|
||||
self.templates.env.globals.update(
|
||||
asset=self.asset,
|
||||
chrome_asset=self.chrome_asset,
|
||||
wa_version=WEBAWESOME_VERSION,
|
||||
)
|
||||
|
||||
app.include_router(health_router(service, version))
|
||||
self._install_language_route()
|
||||
self._install_error_pages()
|
||||
|
||||
# --- urls ---------------------------------------------------------------
|
||||
|
||||
def asset(self, path: str) -> str:
|
||||
return f"/static/{path.lstrip('/')}?v={self.asset_version}"
|
||||
|
||||
def chrome_asset(self, path: str) -> str:
|
||||
return f"{CHROME_STATIC_PATH}/{path.lstrip('/')}?v={self.asset_version}"
|
||||
|
||||
# --- rendering ----------------------------------------------------------
|
||||
|
||||
def context(self, request: Request, **extra: object) -> dict[str, object]:
|
||||
locale = self.translations.locale_for(request)
|
||||
return {
|
||||
"title": self.title,
|
||||
"subtitle": self.subtitle,
|
||||
"service": self.service,
|
||||
"version": self.version,
|
||||
"lang": locale,
|
||||
"languages": self.translations.languages,
|
||||
"t": lambda key: self.translations.translate(key, locale),
|
||||
**extra,
|
||||
}
|
||||
|
||||
def render(
|
||||
self,
|
||||
request: Request,
|
||||
template: str,
|
||||
*,
|
||||
status_code: int = 200,
|
||||
**extra: object,
|
||||
) -> HTMLResponse:
|
||||
return self.templates.TemplateResponse(
|
||||
request=request,
|
||||
name=template,
|
||||
context=self.context(request, **extra),
|
||||
status_code=status_code,
|
||||
)
|
||||
|
||||
# --- shell routes -------------------------------------------------------
|
||||
|
||||
def _install_language_route(self) -> None:
|
||||
@self.app.get("/language/{code}", include_in_schema=False)
|
||||
def set_language(code: str, request: Request) -> Response:
|
||||
# Server-side so the choice survives a new browser and so the
|
||||
# page renders in the right language on first paint rather than
|
||||
# being swapped after load.
|
||||
target = request.headers.get("referer") or "/"
|
||||
response = RedirectResponse(target, status_code=303)
|
||||
if code in i18n.SUPPORTED:
|
||||
response.set_cookie(
|
||||
i18n.COOKIE, code, max_age=31536000, samesite="lax", httponly=False
|
||||
)
|
||||
return response
|
||||
|
||||
def _install_error_pages(self) -> None:
|
||||
@self.app.exception_handler(StarletteHTTPException)
|
||||
async def http_error(request: Request, exc: StarletteHTTPException) -> Response:
|
||||
if request.url.path.startswith(("/api/", "/healthz")):
|
||||
from fastapi.responses import JSONResponse
|
||||
|
||||
return JSONResponse({"error": exc.detail}, status_code=exc.status_code)
|
||||
key = "404" if exc.status_code == 404 else "500"
|
||||
locale = self.translations.locale_for(request)
|
||||
return self.render(
|
||||
request,
|
||||
"error.html",
|
||||
status_code=exc.status_code,
|
||||
code=exc.status_code,
|
||||
error_title=self.translations.translate(f"error_{key}_title", locale),
|
||||
error_message=(
|
||||
exc.detail
|
||||
if exc.status_code not in (404, 500)
|
||||
else self.translations.translate(f"error_{key}_message", locale)
|
||||
),
|
||||
)
|
||||
36
chrome/assets.py
Normal file
36
chrome/assets.py
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
"""Cache-busting static URLs.
|
||||
|
||||
One strategy, chosen deliberately over the two that were in use. homepage and
|
||||
marketplace stamped each file with its own mtime; that breaks in a container,
|
||||
where every COPY'd file carries the build timestamp and so every asset changes
|
||||
version on every build even when its bytes did not. scribe hashed the contents
|
||||
of its static tree into a single token, which is stable across rebuilds and
|
||||
changes exactly when something actually changed. That one wins.
|
||||
|
||||
A single token for the whole tree also means a cached page can never be paired
|
||||
with a newer script: either both are current or both are stale.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import hashlib
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def digest(*roots: Path) -> str:
|
||||
"""A short, stable token over the contents of one or more static trees."""
|
||||
h = hashlib.sha256()
|
||||
for root in roots:
|
||||
if not root.is_dir():
|
||||
continue
|
||||
for path in sorted(root.rglob("*")):
|
||||
# The vendored Web Awesome tree is ~3.4M across 500+ files and
|
||||
# only ever changes when vendor-webawesome.sh runs, so its version
|
||||
# marker stands in for its contents. Hashing it on every start
|
||||
# would add seconds to boot for a token that never moves.
|
||||
if "wa" in path.relative_to(root).parts[:1] and path.name != "VERSION":
|
||||
continue
|
||||
if path.is_file():
|
||||
h.update(path.relative_to(root).as_posix().encode())
|
||||
h.update(path.read_bytes())
|
||||
return h.hexdigest()[:10]
|
||||
92
chrome/auth.py
Normal file
92
chrome/auth.py
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
"""Identity from the reverse proxy.
|
||||
|
||||
Caddy's forward_auth hands Authelia's answer down as `Remote-User` /
|
||||
`Remote-Name`. The catch, learned in agent-bridge: anything else on caddy-net
|
||||
can reach a service's port directly and set those headers itself. So a service
|
||||
trusts them only when the request also carries the shared key that only Caddy
|
||||
is configured to send.
|
||||
|
||||
An unset key means the trusting path is OFF rather than open. A service that
|
||||
wants to run without a proxy at all (a laptop, a test) must say so explicitly.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
from fastapi import HTTPException, Request
|
||||
|
||||
PROXY_KEY_HEADER = "x-proxy-key"
|
||||
USER_HEADER = "remote-user"
|
||||
NAME_HEADER = "remote-name"
|
||||
GROUPS_HEADER = "remote-groups"
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class User:
|
||||
name: str
|
||||
display_name: str = ""
|
||||
groups: tuple[str, ...] = ()
|
||||
|
||||
def in_group(self, *names: str) -> bool:
|
||||
return any(g in self.groups for g in names)
|
||||
|
||||
|
||||
class ProxyAuth:
|
||||
"""Reads the proxy's headers, or refuses to.
|
||||
|
||||
:param proxy_key: the shared secret Caddy sends. None disables the
|
||||
trusting path entirely.
|
||||
:param allow_unauthenticated: a local run with no proxy in front. Never
|
||||
set this where the service is reachable by anything else.
|
||||
:param local_user: who an unauthenticated local run is.
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
proxy_key: str | None,
|
||||
allow_unauthenticated: bool = False,
|
||||
local_user: str = "local",
|
||||
) -> None:
|
||||
self.proxy_key = proxy_key
|
||||
self.allow_unauthenticated = allow_unauthenticated
|
||||
self.local_user = local_user
|
||||
|
||||
def __call__(self, request: Request) -> User:
|
||||
if self.allow_unauthenticated:
|
||||
return User(name=self.local_user, display_name=self.local_user)
|
||||
|
||||
if not self.proxy_key:
|
||||
raise HTTPException(
|
||||
503,
|
||||
"This service has no proxy key configured, so it cannot "
|
||||
"establish who you are. Set PROXY_KEY, or run with "
|
||||
"ALLOW_UNAUTHENTICATED=1 if this is a local instance.",
|
||||
)
|
||||
|
||||
presented = request.headers.get(PROXY_KEY_HEADER, "")
|
||||
# Compared in full, not short-circuited on the first differing byte.
|
||||
if not _constant_time_equal(presented, self.proxy_key):
|
||||
raise HTTPException(403, "Request did not come through the proxy.")
|
||||
|
||||
name = request.headers.get(USER_HEADER, "").strip()
|
||||
if not name:
|
||||
raise HTTPException(401, "The proxy did not identify you.")
|
||||
|
||||
groups = tuple(
|
||||
g.strip()
|
||||
for g in request.headers.get(GROUPS_HEADER, "").split(",")
|
||||
if g.strip()
|
||||
)
|
||||
return User(
|
||||
name=name,
|
||||
display_name=request.headers.get(NAME_HEADER, "").strip() or name,
|
||||
groups=groups,
|
||||
)
|
||||
|
||||
|
||||
def _constant_time_equal(a: str, b: str) -> bool:
|
||||
import hmac
|
||||
|
||||
return hmac.compare_digest(a.encode(), b.encode())
|
||||
48
chrome/config.py
Normal file
48
chrome/config.py
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
"""Environment readers.
|
||||
|
||||
Every service reads its whole configuration from the environment so one image
|
||||
can run anywhere. These are the four readers that were previously copied,
|
||||
with small differences, into three separate config modules.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
|
||||
_TRUE = ("1", "true", "yes", "on")
|
||||
|
||||
|
||||
def boolean(name: str, default: bool = False) -> bool:
|
||||
raw = os.environ.get(name)
|
||||
if raw is None:
|
||||
return default
|
||||
return raw.strip().lower() in _TRUE
|
||||
|
||||
|
||||
def integer(name: str, default: int) -> int:
|
||||
try:
|
||||
return int(os.environ.get(name, "").strip())
|
||||
except (ValueError, AttributeError):
|
||||
return default
|
||||
|
||||
|
||||
def text(name: str, default: str = "") -> str:
|
||||
return os.environ.get(name, default)
|
||||
|
||||
|
||||
def csv(name: str) -> list[str]:
|
||||
return [p.strip() for p in os.environ.get(name, "").split(",") if p.strip()]
|
||||
|
||||
|
||||
def required(name: str) -> str:
|
||||
"""A setting with no sensible default, read at import time.
|
||||
|
||||
Deliberately raises rather than returning a placeholder. agent-bridge
|
||||
spent two days 404ing against a Vikunja project that had been deleted,
|
||||
because a wrong id looks exactly like a right one until something asks
|
||||
for it. An unset value should stop the process, not send it somewhere.
|
||||
"""
|
||||
value = os.environ.get(name)
|
||||
if not value:
|
||||
raise RuntimeError(f"{name} is required and is not set")
|
||||
return value
|
||||
21
chrome/health.py
Normal file
21
chrome/health.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
"""The /healthz contract every service exposes for its container HealthCmd."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from fastapi import APIRouter
|
||||
|
||||
|
||||
def health_router(service: str, version: str) -> APIRouter:
|
||||
"""Unauthenticated liveness probe.
|
||||
|
||||
Reports the service name and version as well as liveness, because the
|
||||
question asked of a running container after an AutoUpdate=registry pull
|
||||
is usually "which build is this?" and not "is it up?".
|
||||
"""
|
||||
router = APIRouter()
|
||||
|
||||
@router.get("/healthz", include_in_schema=False)
|
||||
def healthz() -> dict[str, str]:
|
||||
return {"status": "ok", "service": service, "version": version}
|
||||
|
||||
return router
|
||||
88
chrome/i18n.py
Normal file
88
chrome/i18n.py
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
"""Polish/English strings, shared because homepage already had them and the
|
||||
other services kept doing without rather than copying the machinery.
|
||||
|
||||
Strings live in each service's own `locales/<code>.json`; chrome supplies the
|
||||
shell's own strings and merges the service's over the top, so a service only
|
||||
writes what is actually its own.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
from fastapi import Request
|
||||
|
||||
SUPPORTED = ("pl", "en")
|
||||
DEFAULT = "pl"
|
||||
LABELS = {"pl": {"label": "PL", "name": "Polski"}, "en": {"label": "EN", "name": "English"}}
|
||||
COOKIE = "lang"
|
||||
|
||||
#: The shell's own strings: anything that appears in chrome's base.html.
|
||||
SHELL: dict[str, dict[str, str]] = {
|
||||
"pl": {
|
||||
"theme_light": "Jasny",
|
||||
"theme_dark": "Ciemny",
|
||||
"theme_system": "Systemowy",
|
||||
"theme_label": "Motyw",
|
||||
"language_label": "Język",
|
||||
"skip_to_content": "Przejdź do treści",
|
||||
"error_404_title": "Nie znaleziono",
|
||||
"error_404_message": "Taka strona lub plik nie istnieje.",
|
||||
"error_500_title": "Coś poszło nie tak",
|
||||
"error_500_message": "Wystąpił nieoczekiwany błąd. Spróbuj ponownie.",
|
||||
"logout": "Wyloguj",
|
||||
},
|
||||
"en": {
|
||||
"theme_light": "Light",
|
||||
"theme_dark": "Dark",
|
||||
"theme_system": "System",
|
||||
"theme_label": "Theme",
|
||||
"language_label": "Language",
|
||||
"skip_to_content": "Skip to content",
|
||||
"error_404_title": "Not found",
|
||||
"error_404_message": "The page or file you requested doesn't exist.",
|
||||
"error_500_title": "Something went wrong",
|
||||
"error_500_message": "An unexpected error occurred. Please try again.",
|
||||
"logout": "Log out",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
class Translations:
|
||||
"""Shell strings merged with a service's own `locales/` directory."""
|
||||
|
||||
def __init__(self, locales_dir: Path | None = None) -> None:
|
||||
self._strings: dict[str, dict[str, str]] = {
|
||||
code: dict(SHELL.get(code, {})) for code in SUPPORTED
|
||||
}
|
||||
if locales_dir and locales_dir.is_dir():
|
||||
for code in SUPPORTED:
|
||||
path = locales_dir / f"{code}.json"
|
||||
if path.is_file():
|
||||
self._strings[code].update(json.loads(path.read_text("utf-8")))
|
||||
|
||||
def locale_for(self, request: Request) -> str:
|
||||
"""Cookie first, then Accept-Language, then the default."""
|
||||
cookie = request.cookies.get(COOKIE, "")
|
||||
if cookie in SUPPORTED:
|
||||
return cookie
|
||||
header = request.headers.get("accept-language", "")
|
||||
for part in header.split(","):
|
||||
code = part.split(";")[0].strip().lower()[:2]
|
||||
if code in SUPPORTED:
|
||||
return code
|
||||
return DEFAULT
|
||||
|
||||
def translate(self, key: str, locale: str) -> str:
|
||||
# Falling back to the key itself, not to an empty string: a missing
|
||||
# translation should be visible in the page, not silently blank.
|
||||
return self._strings.get(locale, {}).get(key) or SHELL.get(locale, {}).get(key) or key
|
||||
|
||||
def subset(self, keys: tuple[str, ...], locale: str) -> dict[str, str]:
|
||||
"""Strings handed to client-side code as a JSON blob."""
|
||||
return {k: self.translate(k, locale) for k in keys}
|
||||
|
||||
@property
|
||||
def languages(self) -> list[dict[str, str]]:
|
||||
return [{"code": c, **LABELS[c]} for c in SUPPORTED]
|
||||
78
chrome/static/chrome.css
Normal file
78
chrome/static/chrome.css
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
/* The shell: header, page frame, and the handful of things every service
|
||||
* draws the same way. Components themselves are Web Awesome's problem -
|
||||
* a rule in here cannot reach inside one, which is the entire point of
|
||||
* adopting it.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
background: var(--wa-color-surface-lowered);
|
||||
color: var(--wa-color-text-normal);
|
||||
font-family: var(--wa-font-family-body);
|
||||
font-size: var(--wa-font-size-m);
|
||||
line-height: var(--wa-line-height-normal);
|
||||
}
|
||||
|
||||
/* Custom elements have no styling until the autoloader defines them. Hiding
|
||||
* them for that moment avoids a flash of unstyled markup. `:defined` flips
|
||||
* per element, so this costs nothing once a component is registered. */
|
||||
:not(:defined) { visibility: hidden; }
|
||||
|
||||
.skip-link {
|
||||
position: absolute;
|
||||
left: -9999px;
|
||||
top: 0;
|
||||
z-index: 100;
|
||||
padding: 0.6rem 1rem;
|
||||
background: var(--wa-color-surface-default);
|
||||
border-radius: 0 0 var(--wa-border-radius-m) 0;
|
||||
}
|
||||
.skip-link:focus { left: 0; }
|
||||
|
||||
.site-header {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 1.2rem 1rem 0.6rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1.2rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.brand { display: flex; flex-direction: column; gap: 0.15rem; }
|
||||
.brand h1 { margin: 0; font-size: 1.5rem; letter-spacing: -0.01em; }
|
||||
.subtitle { margin: 0; color: var(--wa-color-text-quiet); font-size: 0.85rem; }
|
||||
|
||||
.header-actions {
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.lang-select { width: 5.5rem; }
|
||||
|
||||
main {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0.6rem 1rem 3rem;
|
||||
}
|
||||
|
||||
.error-page { text-align: center; padding: 4rem 1rem; }
|
||||
.error-code {
|
||||
margin: 0;
|
||||
font-size: 4rem;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
color: var(--wa-color-brand-70);
|
||||
}
|
||||
.error-page h2 { margin: 0.4rem 0 0.2rem; }
|
||||
.error-page wa-button { margin-top: 1.4rem; }
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.site-header { padding-inline: 0.75rem; }
|
||||
main { padding-inline: 0.75rem; }
|
||||
.header-actions { width: 100%; }
|
||||
}
|
||||
60
chrome/static/theme.js
Normal file
60
chrome/static/theme.js
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/* Theme and language controls for the shell.
|
||||
*
|
||||
* The <head> script already applied the saved theme before first paint; this
|
||||
* only wires the controls and keeps Web Awesome's wa-light/wa-dark class in
|
||||
* step with our data-theme attribute. Loaded as a module, so it runs after
|
||||
* the DOM is parsed and needs no DOMContentLoaded dance.
|
||||
*/
|
||||
|
||||
const root = document.documentElement;
|
||||
const media = window.matchMedia("(prefers-color-scheme: dark)");
|
||||
|
||||
function apply(choice) {
|
||||
root.setAttribute("data-theme", choice);
|
||||
const dark = choice === "dark" || (choice === "system" && media.matches);
|
||||
root.classList.toggle("wa-dark", dark);
|
||||
root.classList.toggle("wa-light", !dark);
|
||||
for (const button of document.querySelectorAll("[data-theme-choice]")) {
|
||||
const active = button.dataset.themeChoice === choice;
|
||||
button.toggleAttribute("appearance", false);
|
||||
button.setAttribute("appearance", active ? "accent" : "outlined");
|
||||
button.setAttribute("aria-pressed", String(active));
|
||||
}
|
||||
}
|
||||
|
||||
function current() {
|
||||
try {
|
||||
return localStorage.getItem("theme") || "system";
|
||||
} catch {
|
||||
return "system";
|
||||
}
|
||||
}
|
||||
|
||||
for (const button of document.querySelectorAll("[data-theme-choice]")) {
|
||||
button.addEventListener("click", () => {
|
||||
const choice = button.dataset.themeChoice;
|
||||
try {
|
||||
localStorage.setItem("theme", choice);
|
||||
} catch {
|
||||
/* private window: the choice applies for this page only */
|
||||
}
|
||||
apply(choice);
|
||||
});
|
||||
}
|
||||
|
||||
// Following the system while "system" is selected, without a reload.
|
||||
media.addEventListener("change", () => {
|
||||
if (current() === "system") apply("system");
|
||||
});
|
||||
|
||||
apply(current());
|
||||
|
||||
// Language: each option's value is a code; the server sets the cookie and
|
||||
// redirects back, so the next page renders translated on first paint.
|
||||
const select = document.querySelector("[data-lang-select]");
|
||||
if (select) {
|
||||
select.addEventListener("change", (event) => {
|
||||
const code = event.target.value;
|
||||
if (code) window.location.href = `/language/${code}`;
|
||||
});
|
||||
}
|
||||
51
chrome/static/tokens.css
Normal file
51
chrome/static/tokens.css
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/* The palette, defined once for every service.
|
||||
*
|
||||
* This file does two jobs:
|
||||
*
|
||||
* 1. Points Web Awesome's `brand` ramp at yellow, which is the accent the
|
||||
* services have always used. WA's own yellow ramp is a full 11-step scale
|
||||
* in oklch, so hover/active/border/on-colour all derive correctly - which
|
||||
* is the thing hand-picking a single #eab308 never gave us.
|
||||
*
|
||||
* 2. Keeps the old semantic names (--bg, --surface, --accent, ...) alive as
|
||||
* aliases onto WA tokens. Nothing new should use them, but every service
|
||||
* has hundreds of lines of CSS that does, and aliasing lets a service
|
||||
* migrate page by page instead of all at once. Delete a name here only
|
||||
* once no service references it.
|
||||
*/
|
||||
|
||||
:root {
|
||||
--wa-color-brand-95: var(--wa-color-yellow-95);
|
||||
--wa-color-brand-90: var(--wa-color-yellow-90);
|
||||
--wa-color-brand-80: var(--wa-color-yellow-80);
|
||||
--wa-color-brand-70: var(--wa-color-yellow-70);
|
||||
--wa-color-brand-60: var(--wa-color-yellow-60);
|
||||
--wa-color-brand-50: var(--wa-color-yellow-50);
|
||||
--wa-color-brand-40: var(--wa-color-yellow-40);
|
||||
--wa-color-brand-30: var(--wa-color-yellow-30);
|
||||
--wa-color-brand-20: var(--wa-color-yellow-20);
|
||||
--wa-color-brand-10: var(--wa-color-yellow-10);
|
||||
--wa-color-brand-05: var(--wa-color-yellow-05);
|
||||
|
||||
/* Corner radius: the services settled on 14px long before WA arrived. */
|
||||
--wa-border-radius-m: 10px;
|
||||
--wa-border-radius-l: 14px;
|
||||
}
|
||||
|
||||
/* --- compatibility aliases (deprecated) ---------------------------------- */
|
||||
:root {
|
||||
--bg: var(--wa-color-surface-lowered);
|
||||
--surface: var(--wa-color-surface-default);
|
||||
--surface-hover: var(--wa-color-surface-raised);
|
||||
--border: var(--wa-color-surface-border);
|
||||
--text: var(--wa-color-text-normal);
|
||||
--text-muted: var(--wa-color-text-quiet);
|
||||
--accent: var(--wa-color-brand-70);
|
||||
--on-accent: var(--wa-color-brand-on-loud);
|
||||
--radius: var(--wa-border-radius-l);
|
||||
--shadow: var(--wa-shadow-m);
|
||||
--ok: var(--wa-color-success-fill-loud);
|
||||
--warn: var(--wa-color-warning-fill-loud);
|
||||
--err: var(--wa-color-danger-fill-loud);
|
||||
--info: var(--wa-color-brand-fill-loud);
|
||||
}
|
||||
2
chrome/static/vendor/hooks.module.js
vendored
Normal file
2
chrome/static/vendor/hooks.module.js
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
import{options as n}from"preact";var t,r,u,i,o=0,f=[],c=n,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,p=c.__;function s(n,t){c.__h&&c.__h(r,n,o||t),o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({}),u.__[n]}function d(n){return o=1,y(D,n)}function y(n,u,i){var o=s(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.__f)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=!1,i=o.__c.props!==n;if(o.__c.__H.__.some(function(n){if(n.__N){u=!0;var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),c){var f=c.call(this,n,t,r);return u?f||i:f}return!u||i};r.__f=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function h(n,u){var i=s(t++,3);!c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__H.__h.push(i))}function _(n,u){var i=s(t++,4);!c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__h.push(i))}function A(n){return o=5,T(function(){return{current:n}},[])}function F(n,t,r){o=6,_(function(){if("function"==typeof n){var r=n(t());return function(){n(null),r&&"function"==typeof r&&r()}}if(n)return n.current=t(),function(){return n.current=null}},null==r?r:r.concat(n))}function T(n,r){var u=s(t++,7);return C(u.__H,r)&&(u.__=n(),u.__H=r,u.__h=n),u.__}function q(n,t){return o=8,T(function(){return n},t)}function x(n){var u=r.context[n.__c],i=s(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function P(n,t){c.useDebugValue&&c.useDebugValue(t?t(n):n)}function b(n){var u=s(t++,10),i=d();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function g(){var n=s(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__="P"+i[0]+"-"+i[1]++}return n.__}function j(){for(var n;n=f.shift();){var t=n.__H;if(n.__P&&t)try{t.__h.some(z),t.__h.some(B),t.__h=[]}catch(r){t.__h=[],c.__e(r,n.__v)}}}c.__b=function(n){r=null,e&&e(n)},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),p&&p(n,t)},c.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(i.__h.some(z),i.__h.some(B),i.__h=[],t=0)),u=r},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j)),t.__H.__.some(function(n){n.u&&(n.__H=n.u,n.u=void 0)})),u=r=null},c.__c=function(n,t){t.some(function(n){try{n.__h.some(z),n.__h=n.__h.filter(function(n){return!n.__||B(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],c.__e(r,n.__v)}}),l&&l(n,t)},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.some(function(n){try{z(n)}catch(n){t=n}}),r.__H=void 0,t&&c.__e(t,r.__v))};var k="function"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,35);k&&(t=requestAnimationFrame(r))}function z(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t}function B(n){var t=r;n.__c=n.__(),r=t}function C(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return"function"==typeof t?t(n):t}export{q as useCallback,x as useContext,P as useDebugValue,h as useEffect,b as useErrorBoundary,g as useId,F as useImperativeHandle,_ as useLayoutEffect,T as useMemo,y as useReducer,A as useRef,d as useState};
|
||||
//# sourceMappingURL=hooks.module.js.map
|
||||
1
chrome/static/vendor/htm.module.js
vendored
Normal file
1
chrome/static/vendor/htm.module.js
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
var n=function(t,s,r,e){var u;s[0]=0;for(var h=1;h<s.length;h++){var p=s[h++],a=s[h]?(s[0]|=p?1:2,r[s[h++]]):s[++h];3===p?e[0]=a:4===p?e[1]=Object.assign(e[1]||{},a):5===p?(e[1]=e[1]||{})[s[++h]]=a:6===p?e[1][s[++h]]+=a+"":p?(u=t.apply(a,n(t,a,r,["",null])),e.push(u),a[0]?s[0]|=2:(s[h-2]=0,s[h]=u)):e.push(a)}return e},t=new Map;export default function(s){var r=t.get(this);return r||(r=new Map,t.set(this,r)),(r=n(this,r.get(s)||(r.set(s,r=function(n){for(var t,s,r=1,e="",u="",h=[0],p=function(n){1===r&&(n||(e=e.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?h.push(0,n,e):3===r&&(n||e)?(h.push(3,n,e),r=2):2===r&&"..."===e&&n?h.push(4,n,0):2===r&&e&&!n?h.push(5,0,!0,e):r>=5&&((e||!n&&5===r)&&(h.push(r,0,e,s),r=6),n&&(h.push(r,n,0,s),r=6)),e=""},a=0;a<n.length;a++){a&&(1===r&&p(),p(a));for(var l=0;l<n[a].length;l++)t=n[a][l],1===r?"<"===t?(p(),h=[h],r=3):e+=t:4===r?"--"===e&&">"===t?(r=1,e=""):e=t+e[0]:u?t===u?u="":e+=t:'"'===t||"'"===t?u=t:">"===t?(p(),r=1):r&&("="===t?(r=5,s=e,e=""):"/"===t&&(r<5||">"===n[a][l+1])?(p(),3===r&&(h=h[0]),r=h,(h=h[0]).push(2,0,r),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(p(),r=2):e+=t),3===r&&"!--"===e&&(r=4,h=h[0])}return p(),h}(s)),r),arguments,[])).length>1?r:r[0]}
|
||||
2
chrome/static/vendor/preact.module.js
vendored
Normal file
2
chrome/static/vendor/preact.module.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
chrome/static/wa/LICENSE.md
Normal file
7
chrome/static/wa/LICENSE.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
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.
|
||||
1
chrome/static/wa/VERSION
Normal file
1
chrome/static/wa/VERSION
Normal file
|
|
@ -0,0 +1 @@
|
|||
3.14.0
|
||||
12
chrome/static/wa/chunks/chunk.26QE47KB.js
Normal file
12
chrome/static/wa/chunks/chunk.26QE47KB.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
|
||||
// src/events/lazy-load.ts
|
||||
var WaLazyLoadEvent = class extends Event {
|
||||
constructor() {
|
||||
super("wa-lazy-load", { bubbles: true, cancelable: false, composed: true });
|
||||
}
|
||||
};
|
||||
|
||||
export {
|
||||
WaLazyLoadEvent
|
||||
};
|
||||
41
chrome/static/wa/chunks/chunk.2BXLTQVW.js
Normal file
41
chrome/static/wa/chunks/chunk.2BXLTQVW.js
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
e,
|
||||
i,
|
||||
t
|
||||
} from "./chunk.H23DVATU.js";
|
||||
import {
|
||||
E,
|
||||
T
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
|
||||
// ../../node_modules/lit-html/directives/unsafe-html.js
|
||||
var e2 = class extends i {
|
||||
constructor(i2) {
|
||||
if (super(i2), this.it = E, i2.type !== t.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
||||
}
|
||||
render(r) {
|
||||
if (r === E || null == r) return this._t = void 0, this.it = r;
|
||||
if (r === T) return r;
|
||||
if ("string" != typeof r) throw Error(this.constructor.directiveName + "() called with a non-string value");
|
||||
if (r === this.it) return this._t;
|
||||
this.it = r;
|
||||
const s = [r];
|
||||
return s.raw = s, this._t = { _$litType$: this.constructor.resultType, strings: s, values: [] };
|
||||
}
|
||||
};
|
||||
e2.directiveName = "unsafeHTML", e2.resultType = 1;
|
||||
var o = e(e2);
|
||||
|
||||
export {
|
||||
o
|
||||
};
|
||||
/*! Bundled license information:
|
||||
|
||||
lit-html/directives/unsafe-html.js:
|
||||
(**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*)
|
||||
*/
|
||||
121
chrome/static/wa/chunks/chunk.2E2VZMOR.js
Normal file
121
chrome/static/wa/chunks/chunk.2E2VZMOR.js
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
card_styles_default
|
||||
} from "./chunk.FG2PKHMT.js";
|
||||
import {
|
||||
HasSlotController
|
||||
} from "./chunk.RWNXKUCF.js";
|
||||
import {
|
||||
size_styles_default
|
||||
} from "./chunk.JB5Y2AN3.js";
|
||||
import {
|
||||
e
|
||||
} from "./chunk.KWDPKKFO.js";
|
||||
import {
|
||||
WebAwesomeElement,
|
||||
n,
|
||||
t
|
||||
} from "./chunk.LBLI4KS5.js";
|
||||
import {
|
||||
x
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
import {
|
||||
__decorateClass
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/components/card/card.ts
|
||||
var WaCard = class extends WebAwesomeElement {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.hasSlotController = new HasSlotController(
|
||||
this,
|
||||
"footer",
|
||||
"header",
|
||||
"media",
|
||||
"header-actions",
|
||||
"footer-actions",
|
||||
"actions"
|
||||
);
|
||||
this.appearance = "outlined";
|
||||
this.withHeader = false;
|
||||
this.withMedia = false;
|
||||
this.withFooter = false;
|
||||
this.withHeaderActions = false;
|
||||
this.withFooterActions = false;
|
||||
this.orientation = "vertical";
|
||||
}
|
||||
willUpdate(changedProperties) {
|
||||
this.withHeader = this.hasSlotController.test("header", "withHeader");
|
||||
this.withMedia = this.hasSlotController.test("media", "withMedia");
|
||||
this.withFooter = this.hasSlotController.test("footer", "withFooter");
|
||||
super.willUpdate(changedProperties);
|
||||
}
|
||||
render() {
|
||||
if (this.orientation === "horizontal") {
|
||||
return x`
|
||||
<slot name="media" part="media" class="media"></slot>
|
||||
<div part="body" class="body"><slot></slot></div>
|
||||
<slot name="actions" part="actions" class="actions"></slot>
|
||||
`;
|
||||
}
|
||||
const hasHeaderActions = this.hasSlotController.test("header-actions", "withHeaderActions");
|
||||
const hasFooterActions = this.hasSlotController.test("footer-actions", "withFooterActions");
|
||||
return x`
|
||||
<slot name="media" part="media" class="media"></slot>
|
||||
|
||||
<div
|
||||
part="header"
|
||||
class=${e({
|
||||
header: true,
|
||||
"has-actions": hasHeaderActions
|
||||
})}
|
||||
>
|
||||
<slot name="header"></slot>
|
||||
<slot name="header-actions"></slot>
|
||||
</div>
|
||||
|
||||
<div part="body" class="body"><slot></slot></div>
|
||||
|
||||
<div
|
||||
part="footer"
|
||||
class=${e({
|
||||
footer: true,
|
||||
"has-actions": hasFooterActions
|
||||
})}
|
||||
>
|
||||
<slot name="footer"></slot>
|
||||
<slot name="footer-actions"></slot>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
};
|
||||
WaCard.css = [size_styles_default, card_styles_default];
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaCard.prototype, "appearance", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "with-header", type: Boolean, reflect: true })
|
||||
], WaCard.prototype, "withHeader", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "with-media", type: Boolean, reflect: true })
|
||||
], WaCard.prototype, "withMedia", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "with-footer", type: Boolean, reflect: true })
|
||||
], WaCard.prototype, "withFooter", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "with-header-actions", type: Boolean, reflect: true })
|
||||
], WaCard.prototype, "withHeaderActions", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "with-footer-actions", type: Boolean, reflect: true })
|
||||
], WaCard.prototype, "withFooterActions", 2);
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaCard.prototype, "orientation", 2);
|
||||
WaCard = __decorateClass([
|
||||
t("wa-card")
|
||||
], WaCard);
|
||||
WaCard.disableWarning?.("change-in-update");
|
||||
|
||||
export {
|
||||
WaCard
|
||||
};
|
||||
30
chrome/static/wa/chunks/chunk.2FVCYQY4.js
Normal file
30
chrome/static/wa/chunks/chunk.2FVCYQY4.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaRating
|
||||
} from "./chunk.RXATNCKH.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/rating/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-rating";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaRating,
|
||||
react: React,
|
||||
events: {
|
||||
onWaHover: "wa-hover",
|
||||
onWaInvalid: "wa-invalid"
|
||||
},
|
||||
displayName: "WaRating"
|
||||
});
|
||||
var rating_default = reactWrapper;
|
||||
|
||||
export {
|
||||
rating_default
|
||||
};
|
||||
13
chrome/static/wa/chunks/chunk.2LXKNNNE.js
Normal file
13
chrome/static/wa/chunks/chunk.2LXKNNNE.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
|
||||
// src/events/select.ts
|
||||
var WaSelectEvent = class extends Event {
|
||||
constructor(detail) {
|
||||
super("wa-select", { bubbles: true, cancelable: true, composed: true });
|
||||
this.detail = detail;
|
||||
}
|
||||
};
|
||||
|
||||
export {
|
||||
WaSelectEvent
|
||||
};
|
||||
64
chrome/static/wa/chunks/chunk.2NOGQWD2.js
Normal file
64
chrome/static/wa/chunks/chunk.2NOGQWD2.js
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
variants_styles_default
|
||||
} from "./chunk.K5Q2EBKV.js";
|
||||
import {
|
||||
badge_styles_default
|
||||
} from "./chunk.2NV6QW6C.js";
|
||||
import {
|
||||
WebAwesomeElement,
|
||||
n,
|
||||
t
|
||||
} from "./chunk.LBLI4KS5.js";
|
||||
import {
|
||||
x
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
import {
|
||||
__decorateClass
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/components/badge/badge.ts
|
||||
var WaBadge = class extends WebAwesomeElement {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.variant = "brand";
|
||||
this.appearance = "accent";
|
||||
this.pill = false;
|
||||
this.attention = "none";
|
||||
}
|
||||
render() {
|
||||
return x`
|
||||
<span part="start">
|
||||
<slot name="start"></slot>
|
||||
</span>
|
||||
|
||||
<span part="base badge" role="status">
|
||||
<slot></slot>
|
||||
</span>
|
||||
|
||||
<span part="end">
|
||||
<slot name="end"></slot>
|
||||
</span>
|
||||
`;
|
||||
}
|
||||
};
|
||||
WaBadge.css = [variants_styles_default, badge_styles_default];
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaBadge.prototype, "variant", 2);
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaBadge.prototype, "appearance", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean, reflect: true })
|
||||
], WaBadge.prototype, "pill", 2);
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaBadge.prototype, "attention", 2);
|
||||
WaBadge = __decorateClass([
|
||||
t("wa-badge")
|
||||
], WaBadge);
|
||||
|
||||
export {
|
||||
WaBadge
|
||||
};
|
||||
127
chrome/static/wa/chunks/chunk.2NV6QW6C.js
Normal file
127
chrome/static/wa/chunks/chunk.2NV6QW6C.js
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/badge/badge.styles.ts
|
||||
var badge_styles_default = i`
|
||||
:host {
|
||||
--pulse-color: var(--wa-color-fill-loud, var(--wa-color-brand-fill-loud));
|
||||
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0.375em 0.625em;
|
||||
color: var(--wa-color-on-loud, var(--wa-color-brand-on-loud));
|
||||
font-size: max(var(--wa-font-size-3xs), 0.75em);
|
||||
font-weight: var(--wa-font-weight-semibold);
|
||||
line-height: 1;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
background-color: var(--wa-color-fill-loud, var(--wa-color-brand-fill-loud));
|
||||
border-color: transparent;
|
||||
border-radius: var(--wa-border-radius-s);
|
||||
border-style: var(--wa-border-style);
|
||||
border-width: var(--wa-border-width-s);
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
cursor: inherit;
|
||||
|
||||
min-width: 1.25em; /* <-- this is what Safari respects for intrinsic */
|
||||
min-height: 1em;
|
||||
}
|
||||
|
||||
/* Appearance modifiers */
|
||||
: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));
|
||||
background-color: transparent;
|
||||
border-color: var(--wa-color-border-loud, var(--wa-color-brand-border-loud));
|
||||
}
|
||||
|
||||
: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));
|
||||
background-color: var(--wa-color-fill-normal, var(--wa-color-brand-fill-normal));
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
:host([appearance='filled-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']) {
|
||||
--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));
|
||||
background-color: var(--wa-color-fill-loud, var(--wa-color-brand-fill-loud));
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
/* Pill modifier */
|
||||
:host([pill]) {
|
||||
border-radius: var(--wa-border-radius-pill);
|
||||
}
|
||||
|
||||
/* Pulse attention */
|
||||
:host([attention='pulse']) {
|
||||
animation: pulse 1.5s infinite;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
box-shadow: 0 0 0 0 var(--pulse-color);
|
||||
}
|
||||
70% {
|
||||
box-shadow: 0 0 0 0.5rem transparent;
|
||||
}
|
||||
100% {
|
||||
box-shadow: 0 0 0 0 transparent;
|
||||
}
|
||||
}
|
||||
|
||||
/* Bounce attention */
|
||||
:host([attention='bounce']) {
|
||||
animation: bounce 1s cubic-bezier(0.28, 0.84, 0.42, 1) infinite;
|
||||
}
|
||||
|
||||
@keyframes bounce {
|
||||
0%,
|
||||
20%,
|
||||
50%,
|
||||
80%,
|
||||
100% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
40% {
|
||||
transform: translateY(-5px);
|
||||
}
|
||||
60% {
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
}
|
||||
|
||||
/* Prevents vertical space when icons with vertical-align are slotted in - https://github.com/shoelace-style/webawesome/issues/2280 */
|
||||
[part='start'],
|
||||
[part='end'] {
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
slot[name='start']::slotted(*) {
|
||||
margin-inline-end: 0.375em;
|
||||
}
|
||||
|
||||
slot[name='end']::slotted(*) {
|
||||
margin-inline-start: 0.375em;
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
badge_styles_default
|
||||
};
|
||||
34
chrome/static/wa/chunks/chunk.2OUDDW5N.js
Normal file
34
chrome/static/wa/chunks/chunk.2OUDDW5N.js
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaTreeItem
|
||||
} from "./chunk.F2PHWUN2.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/tree-item/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-tree-item";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaTreeItem,
|
||||
react: React,
|
||||
events: {
|
||||
onWaExpand: "wa-expand",
|
||||
onWaAfterExpand: "wa-after-expand",
|
||||
onWaCollapse: "wa-collapse",
|
||||
onWaAfterCollapse: "wa-after-collapse",
|
||||
onWaLazyChange: "wa-lazy-change",
|
||||
onWaLazyLoad: "wa-lazy-load"
|
||||
},
|
||||
displayName: "WaTreeItem"
|
||||
});
|
||||
var tree_item_default = reactWrapper;
|
||||
|
||||
export {
|
||||
tree_item_default
|
||||
};
|
||||
211
chrome/static/wa/chunks/chunk.2QMPIFI4.js
Normal file
211
chrome/static/wa/chunks/chunk.2QMPIFI4.js
Normal file
|
|
@ -0,0 +1,211 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/radio/radio.styles.ts
|
||||
var radio_styles_default = i`
|
||||
:host {
|
||||
--checked-icon-color: var(--wa-form-control-activated-color);
|
||||
--checked-icon-scale: 0.7;
|
||||
|
||||
color: var(--wa-form-control-value-color);
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
align-items: top;
|
||||
font-family: inherit;
|
||||
font-weight: var(--wa-form-control-value-font-weight);
|
||||
line-height: var(--wa-form-control-value-line-height);
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
:host(:focus) {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
/* When the control isn't checked, hide the circle for Windows High Contrast mode a11y */
|
||||
:host(:not(:state(checked))) svg circle {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
[part~='label'] {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
[part~='hint'] {
|
||||
margin-block-start: 0.5em;
|
||||
}
|
||||
|
||||
/* Default spacing for default appearance radios */
|
||||
:host([appearance='default']) {
|
||||
margin-block: 0.375em; /* Half of the original 0.75em gap on each side */
|
||||
}
|
||||
|
||||
:host([appearance='default'][data-wa-radio-horizontal]) {
|
||||
margin-block: 0;
|
||||
margin-inline: 0.5em; /* Half of the original 1em gap on each side */
|
||||
}
|
||||
|
||||
/* Remove margin from first/last items to prevent extra space */
|
||||
:host([appearance='default'][data-wa-radio-first]) {
|
||||
margin-block-start: 0;
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
:host([appearance='default'][data-wa-radio-last]) {
|
||||
margin-block-end: 0;
|
||||
margin-inline-end: 0;
|
||||
}
|
||||
|
||||
/* Button appearance have no spacing, they get handled by the overlap margins below */
|
||||
:host([appearance='button']) {
|
||||
margin: 0;
|
||||
align-items: center;
|
||||
min-height: var(--wa-form-control-height);
|
||||
background-color: var(--wa-color-surface-default);
|
||||
border: var(--wa-form-control-border-width) var(--wa-form-control-border-style) var(--wa-form-control-border-color);
|
||||
border-radius: var(--wa-border-radius-m);
|
||||
padding: 0 var(--wa-form-control-padding-inline);
|
||||
transition:
|
||||
background-color var(--wa-transition-fast),
|
||||
border-color var(--wa-transition-fast);
|
||||
}
|
||||
|
||||
/* Default appearance */
|
||||
:host([appearance='default']) {
|
||||
.control {
|
||||
flex: 0 0 auto;
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: var(--wa-form-control-toggle-size);
|
||||
height: var(--wa-form-control-toggle-size);
|
||||
border-color: var(--wa-form-control-border-color);
|
||||
border-radius: 50%;
|
||||
border-style: var(--wa-form-control-border-style);
|
||||
border-width: var(--wa-form-control-border-width);
|
||||
background-color: var(--wa-form-control-background-color);
|
||||
color: transparent;
|
||||
transition:
|
||||
background var(--wa-transition-normal),
|
||||
border-color var(--wa-transition-fast),
|
||||
box-shadow var(--wa-transition-fast),
|
||||
color var(--wa-transition-fast);
|
||||
transition-timing-function: var(--wa-transition-easing);
|
||||
|
||||
margin-inline-end: 0.5em;
|
||||
}
|
||||
|
||||
.checked-icon {
|
||||
display: flex;
|
||||
fill: currentColor;
|
||||
width: var(--wa-form-control-toggle-size);
|
||||
height: var(--wa-form-control-toggle-size);
|
||||
scale: var(--checked-icon-scale);
|
||||
}
|
||||
}
|
||||
|
||||
/* Button appearance */
|
||||
:host([appearance='button']) {
|
||||
.control {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Checked */
|
||||
:host(:state(checked)) .control {
|
||||
color: var(--checked-icon-color);
|
||||
border-color: var(--wa-form-control-activated-color);
|
||||
background-color: var(--wa-form-control-background-color);
|
||||
}
|
||||
|
||||
/* Focus */
|
||||
:host(:focus-visible) .control {
|
||||
outline: var(--wa-focus-ring);
|
||||
outline-offset: var(--wa-focus-ring-offset);
|
||||
}
|
||||
|
||||
/* Disabled */
|
||||
:host(:state(disabled)) {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* Horizontal grouping - remove inner border radius */
|
||||
:host([appearance='button'][data-wa-radio-horizontal][data-wa-radio-inner]) {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
:host([appearance='button'][data-wa-radio-horizontal][data-wa-radio-first]) {
|
||||
border-start-end-radius: 0;
|
||||
border-end-end-radius: 0;
|
||||
}
|
||||
|
||||
:host([appearance='button'][data-wa-radio-horizontal][data-wa-radio-last]) {
|
||||
border-start-start-radius: 0;
|
||||
border-end-start-radius: 0;
|
||||
}
|
||||
|
||||
/* Vertical grouping - remove inner border radius */
|
||||
:host([appearance='button'][data-wa-radio-vertical][data-wa-radio-inner]) {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
:host([appearance='button'][data-wa-radio-vertical][data-wa-radio-first]) {
|
||||
border-end-start-radius: 0;
|
||||
border-end-end-radius: 0;
|
||||
}
|
||||
|
||||
:host([appearance='button'][data-wa-radio-vertical][data-wa-radio-last]) {
|
||||
border-start-start-radius: 0;
|
||||
border-start-end-radius: 0;
|
||||
}
|
||||
|
||||
@media (hover: hover) {
|
||||
:host([appearance='button']:hover:not(:state(disabled), :state(checked))) {
|
||||
background-color: color-mix(in srgb, var(--wa-color-surface-default) 95%, var(--wa-color-mix-hover));
|
||||
}
|
||||
}
|
||||
|
||||
:host([appearance='button']:focus-visible) {
|
||||
outline: var(--wa-focus-ring);
|
||||
outline-offset: var(--wa-focus-ring-offset);
|
||||
}
|
||||
|
||||
:host([appearance='button']:state(checked)) {
|
||||
border-color: var(--wa-form-control-activated-color);
|
||||
background-color: var(--wa-color-brand-fill-quiet);
|
||||
}
|
||||
|
||||
:host([appearance='button']:state(checked):focus-visible) {
|
||||
outline: var(--wa-focus-ring);
|
||||
outline-offset: var(--wa-focus-ring-offset);
|
||||
}
|
||||
|
||||
/* Button overlap margins */
|
||||
:host([appearance='button'][data-wa-radio-horizontal]:not([data-wa-radio-first])) {
|
||||
margin-inline-start: calc(-1 * var(--wa-form-control-border-width));
|
||||
}
|
||||
|
||||
:host([appearance='button'][data-wa-radio-vertical]:not([data-wa-radio-first])) {
|
||||
margin-block-start: calc(-1 * var(--wa-form-control-border-width));
|
||||
}
|
||||
|
||||
/* Ensure interactive states are visible above adjacent buttons */
|
||||
:host([appearance='button']:hover),
|
||||
:host([appearance='button']:state(checked)) {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
:host([appearance='button']:focus-visible) {
|
||||
z-index: 2;
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
radio_styles_default
|
||||
};
|
||||
72
chrome/static/wa/chunks/chunk.2SO23SX3.js
Normal file
72
chrome/static/wa/chunks/chunk.2SO23SX3.js
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
tab_panel_styles_default
|
||||
} from "./chunk.IOZQCLLD.js";
|
||||
import {
|
||||
e
|
||||
} from "./chunk.KWDPKKFO.js";
|
||||
import {
|
||||
watch
|
||||
} from "./chunk.PZAN6FPN.js";
|
||||
import {
|
||||
WebAwesomeElement,
|
||||
n,
|
||||
t
|
||||
} from "./chunk.LBLI4KS5.js";
|
||||
import {
|
||||
x
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
import {
|
||||
__decorateClass
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/components/tab-panel/tab-panel.ts
|
||||
var id = 0;
|
||||
var WaTabPanel = class extends WebAwesomeElement {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.attrId = ++id;
|
||||
this.componentId = `wa-tab-panel-${this.attrId}`;
|
||||
this.name = "";
|
||||
this.active = false;
|
||||
this.role = "tabpanel";
|
||||
}
|
||||
connectedCallback() {
|
||||
super.connectedCallback();
|
||||
this.id = (this.id || "").length > 0 ? this.id : this.componentId;
|
||||
}
|
||||
handleActiveChange() {
|
||||
this.setAttribute("aria-hidden", this.active ? "false" : "true");
|
||||
}
|
||||
render() {
|
||||
return x`
|
||||
<slot
|
||||
part="base"
|
||||
class=${e({
|
||||
"tab-panel": true,
|
||||
"tab-panel-active": this.active
|
||||
})}
|
||||
></slot>
|
||||
`;
|
||||
}
|
||||
};
|
||||
WaTabPanel.css = tab_panel_styles_default;
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaTabPanel.prototype, "name", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean, reflect: true })
|
||||
], WaTabPanel.prototype, "active", 2);
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaTabPanel.prototype, "role", 2);
|
||||
__decorateClass([
|
||||
watch("active")
|
||||
], WaTabPanel.prototype, "handleActiveChange", 1);
|
||||
WaTabPanel = __decorateClass([
|
||||
t("wa-tab-panel")
|
||||
], WaTabPanel);
|
||||
|
||||
export {
|
||||
WaTabPanel
|
||||
};
|
||||
29
chrome/static/wa/chunks/chunk.2WDGLBJO.js
Normal file
29
chrome/static/wa/chunks/chunk.2WDGLBJO.js
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaCarousel
|
||||
} from "./chunk.V3B4FDYO.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/carousel/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-carousel";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaCarousel,
|
||||
react: React,
|
||||
events: {
|
||||
onWaSlideChange: "wa-slide-change"
|
||||
},
|
||||
displayName: "WaCarousel"
|
||||
});
|
||||
var carousel_default = reactWrapper;
|
||||
|
||||
export {
|
||||
carousel_default
|
||||
};
|
||||
112
chrome/static/wa/chunks/chunk.2YEETXBR.js
Normal file
112
chrome/static/wa/chunks/chunk.2YEETXBR.js
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/random-content/random-content.styles.ts
|
||||
var random_content_styles_default = i`
|
||||
:host {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
/*
|
||||
* Force-hide unselected children. A bare [hidden] (display: none from the UA sheet) loses to any
|
||||
* author display set on the child — a utility class like .wa-flank, or a component's own
|
||||
* :host display — so children with their own layout wouldn't actually hide without this.
|
||||
*/
|
||||
::slotted([hidden]) {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/*
|
||||
* @keyframes are defined in both document scope (random-content.ts) and here:
|
||||
* Chromium resolves animation-name from the document for slotted elements;
|
||||
* WebKit resolves it from the shadow root. Both copies are needed.
|
||||
*/
|
||||
|
||||
@keyframes wa-rc-fade {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wa-rc-fade-up {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(var(--animation-translate, 0.5em));
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wa-rc-fade-down {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(calc(-1 * var(--animation-translate, 0.5em)));
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wa-rc-fade-left {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateX(var(--animation-translate, 0.5em));
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wa-rc-fade-right {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateX(calc(-1 * var(--animation-translate, 0.5em)));
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
/* The JS already skips animations under reduced motion; this guards CSS-only consumers too. */
|
||||
@media (prefers-reduced-motion: no-preference) {
|
||||
::slotted([data-wa-animation]) {
|
||||
animation-duration: var(--animation-duration, 300ms);
|
||||
animation-timing-function: var(--animation-easing, ease);
|
||||
animation-fill-mode: both;
|
||||
}
|
||||
|
||||
::slotted([data-wa-animation='fade']) {
|
||||
animation-name: wa-rc-fade;
|
||||
}
|
||||
|
||||
::slotted([data-wa-animation='fade-up']) {
|
||||
animation-name: wa-rc-fade-up;
|
||||
}
|
||||
|
||||
::slotted([data-wa-animation='fade-down']) {
|
||||
animation-name: wa-rc-fade-down;
|
||||
}
|
||||
|
||||
::slotted([data-wa-animation='fade-left']) {
|
||||
animation-name: wa-rc-fade-left;
|
||||
}
|
||||
|
||||
::slotted([data-wa-animation='fade-right']) {
|
||||
animation-name: wa-rc-fade-right;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
random_content_styles_default
|
||||
};
|
||||
29
chrome/static/wa/chunks/chunk.3774FK3E.js
Normal file
29
chrome/static/wa/chunks/chunk.3774FK3E.js
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaSlider
|
||||
} from "./chunk.KBLB7M2I.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/slider/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-slider";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaSlider,
|
||||
react: React,
|
||||
events: {
|
||||
onWaInvalid: "wa-invalid"
|
||||
},
|
||||
displayName: "WaSlider"
|
||||
});
|
||||
var slider_default = reactWrapper;
|
||||
|
||||
export {
|
||||
slider_default
|
||||
};
|
||||
301
chrome/static/wa/chunks/chunk.3BILHKLX.js
Normal file
301
chrome/static/wa/chunks/chunk.3BILHKLX.js
Normal file
|
|
@ -0,0 +1,301 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/select/select.styles.ts
|
||||
var select_styles_default = i`
|
||||
:host {
|
||||
--tag-max-size: 10ch;
|
||||
--show-duration: var(--wa-transition-fast);
|
||||
--hide-duration: var(--wa-transition-fast);
|
||||
}
|
||||
|
||||
/* Add ellipses to multi select options */
|
||||
:host wa-tag::part(content) {
|
||||
display: initial;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
max-width: var(--tag-max-size);
|
||||
}
|
||||
|
||||
:host .disabled [part~='combobox'] {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
:host .enabled:is(.open, :focus-within) [part~='combobox'] {
|
||||
outline-color: var(--wa-color-focus);
|
||||
}
|
||||
|
||||
/** The popup */
|
||||
.select {
|
||||
flex: 1 1 auto;
|
||||
display: inline-flex;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
|
||||
/* Pass through from select to the popup */
|
||||
--show-duration: inherit;
|
||||
--hide-duration: inherit;
|
||||
|
||||
&::part(popup) {
|
||||
z-index: 900;
|
||||
}
|
||||
|
||||
&[data-current-placement^='top']::part(popup) {
|
||||
transform-origin: bottom;
|
||||
}
|
||||
|
||||
&[data-current-placement^='bottom']::part(popup) {
|
||||
transform-origin: top;
|
||||
}
|
||||
}
|
||||
|
||||
/* Combobox */
|
||||
.combobox {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
align-items: center;
|
||||
justify-content: start;
|
||||
|
||||
min-height: var(--wa-form-control-height);
|
||||
|
||||
background-color: var(--wa-form-control-background-color);
|
||||
border-color: var(--wa-form-control-border-color);
|
||||
border-radius: var(--wa-form-control-border-radius);
|
||||
border-style: var(--wa-form-control-border-style);
|
||||
border-width: var(--wa-form-control-border-width);
|
||||
color: var(--wa-form-control-value-color);
|
||||
cursor: pointer;
|
||||
font-family: inherit;
|
||||
font-weight: var(--wa-form-control-value-font-weight);
|
||||
line-height: var(--wa-form-control-value-line-height);
|
||||
overflow: hidden;
|
||||
padding: 0 var(--wa-form-control-padding-inline);
|
||||
position: relative;
|
||||
vertical-align: middle;
|
||||
transition:
|
||||
background-color var(--wa-transition-normal),
|
||||
border-color var(--wa-transition-normal),
|
||||
outline-color var(--wa-transition-fast);
|
||||
transition-timing-function: var(--wa-transition-easing);
|
||||
outline: var(--wa-focus-ring-style) var(--wa-focus-ring-width) transparent;
|
||||
outline-offset: var(--wa-focus-ring-offset);
|
||||
|
||||
/* Pills */
|
||||
:host([pill]) & {
|
||||
border-radius: var(--wa-border-radius-pill);
|
||||
}
|
||||
}
|
||||
|
||||
/* Appearance modifiers */
|
||||
:host([appearance='outlined']) .combobox {
|
||||
background-color: var(--wa-form-control-background-color);
|
||||
border-color: var(--wa-form-control-border-color);
|
||||
}
|
||||
|
||||
: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);
|
||||
border-color: var(--wa-form-control-border-color);
|
||||
}
|
||||
|
||||
.display-input {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
font: inherit;
|
||||
border: none;
|
||||
background: none;
|
||||
line-height: var(--wa-form-control-value-line-height);
|
||||
color: var(--wa-form-control-value-color);
|
||||
cursor: inherit;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
-webkit-appearance: none;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
&::placeholder {
|
||||
color: var(--wa-form-control-placeholder-color);
|
||||
}
|
||||
}
|
||||
|
||||
/* Manage spacing when tags are present */
|
||||
:host([multiple]) {
|
||||
--_padding-with-tags: calc(var(--wa-form-control-height) * 0.1 - var(--wa-form-control-border-width));
|
||||
|
||||
& .combobox:has(.tags wa-tag) {
|
||||
padding-block: var(--_padding-with-tags);
|
||||
padding-inline-start: var(--_padding-with-tags);
|
||||
}
|
||||
}
|
||||
|
||||
/* Visually hide the display input when multiple is enabled */
|
||||
:host([multiple]) .combobox:has(.tags wa-tag) .display-input {
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.value-input {
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.tags {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.25em;
|
||||
|
||||
/* Nested inside the box, so a step down from the box's radius */
|
||||
& wa-tag:not([pill]) {
|
||||
border-radius: var(--wa-border-radius-s);
|
||||
}
|
||||
|
||||
.disabled & {
|
||||
cursor: not-allowed !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Start and End */
|
||||
|
||||
.start,
|
||||
.end {
|
||||
flex: 0;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
color: var(--wa-color-neutral-on-quiet);
|
||||
}
|
||||
|
||||
.end::slotted(*) {
|
||||
margin-inline-start: var(--wa-form-control-padding-inline);
|
||||
}
|
||||
|
||||
.start::slotted(*) {
|
||||
margin-inline-end: var(--wa-form-control-padding-inline);
|
||||
}
|
||||
|
||||
:host([multiple]) .combobox:has(.tags wa-tag) .start::slotted(*) {
|
||||
margin-inline-start: calc(var(--wa-form-control-padding-inline) - var(--_padding-with-tags));
|
||||
}
|
||||
|
||||
/* Clear button */
|
||||
[part~='clear-button'] {
|
||||
flex: 0 0 auto;
|
||||
display: inline-flex;
|
||||
align-self: stretch;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
inline-size: 1.5em;
|
||||
font-size: inherit;
|
||||
color: var(--wa-color-neutral-on-quiet);
|
||||
border: none;
|
||||
background: none;
|
||||
padding: 0;
|
||||
transition: color var(--wa-transition-normal);
|
||||
cursor: pointer;
|
||||
/* The box is wider than the glyph, so overhang half that growth on each side. Keeps the glyph
|
||||
on the same trailing axis as the segmented-field pickers' clear buttons. */
|
||||
margin-inline-start: calc(var(--wa-form-control-padding-inline) - 0.125em);
|
||||
margin-inline-end: -0.125em;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
@media (hover: hover) {
|
||||
&:hover {
|
||||
color: color-mix(in oklab, currentColor, var(--wa-color-mix-hover));
|
||||
}
|
||||
}
|
||||
|
||||
&:active {
|
||||
color: color-mix(in oklab, currentColor, var(--wa-color-mix-active));
|
||||
}
|
||||
}
|
||||
|
||||
/* Expand icon */
|
||||
.expand-icon {
|
||||
flex: 0 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: var(--wa-color-neutral-on-quiet);
|
||||
transition: rotate var(--wa-transition-slow) var(--wa-transition-easing);
|
||||
rotate: 0deg;
|
||||
margin-inline-start: var(--wa-form-control-padding-inline);
|
||||
|
||||
.open & {
|
||||
rotate: -180deg;
|
||||
}
|
||||
}
|
||||
|
||||
/* Listbox */
|
||||
.listbox {
|
||||
display: block;
|
||||
position: relative;
|
||||
font: inherit;
|
||||
box-shadow: var(--wa-shadow-m);
|
||||
background: var(--wa-color-surface-raised);
|
||||
border-color: var(--wa-color-surface-border);
|
||||
border-radius: var(--wa-border-radius-m);
|
||||
border-style: var(--wa-border-style);
|
||||
border-width: var(--wa-border-width-s);
|
||||
padding: 0.25em;
|
||||
overflow: auto;
|
||||
overscroll-behavior: none;
|
||||
|
||||
/* Make sure it adheres to the popup's auto size */
|
||||
max-width: var(--auto-size-available-width);
|
||||
max-height: var(--auto-size-available-height);
|
||||
|
||||
&::slotted(wa-divider) {
|
||||
--spacing: 0.5em;
|
||||
}
|
||||
}
|
||||
|
||||
/* Space options with half the listbox's padding */
|
||||
.listbox slot:not([name]) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.125em;
|
||||
}
|
||||
|
||||
slot:not([name])::slotted(small) {
|
||||
display: block;
|
||||
font-size: var(--wa-font-size-smaller);
|
||||
font-weight: var(--wa-font-weight-semibold);
|
||||
color: var(--wa-color-text-quiet);
|
||||
padding-block: 0.5em;
|
||||
padding-inline: 2.25em;
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
select_styles_default
|
||||
};
|
||||
25
chrome/static/wa/chunks/chunk.3H2FQERJ.js
Normal file
25
chrome/static/wa/chunks/chunk.3H2FQERJ.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
|
||||
// src/internal/dismissible-stack.ts
|
||||
var dismissibleStack = [];
|
||||
function registerDismissible(key) {
|
||||
unregisterDismissible(key);
|
||||
dismissibleStack.push(key);
|
||||
}
|
||||
function unregisterDismissible(key) {
|
||||
for (let i = dismissibleStack.length - 1; i >= 0; i--) {
|
||||
if (dismissibleStack[i] === key) {
|
||||
dismissibleStack.splice(i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
function isTopDismissible(key) {
|
||||
return dismissibleStack.length > 0 && dismissibleStack[dismissibleStack.length - 1] === key;
|
||||
}
|
||||
|
||||
export {
|
||||
registerDismissible,
|
||||
unregisterDismissible,
|
||||
isTopDismissible
|
||||
};
|
||||
29
chrome/static/wa/chunks/chunk.3MALJW2P.js
Normal file
29
chrome/static/wa/chunks/chunk.3MALJW2P.js
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaAvatar
|
||||
} from "./chunk.JBSQSXSP.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/avatar/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-avatar";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaAvatar,
|
||||
react: React,
|
||||
events: {
|
||||
onWaError: "wa-error"
|
||||
},
|
||||
displayName: "WaAvatar"
|
||||
});
|
||||
var avatar_default = reactWrapper;
|
||||
|
||||
export {
|
||||
avatar_default
|
||||
};
|
||||
20
chrome/static/wa/chunks/chunk.3MSWQ3RG.js
Normal file
20
chrome/static/wa/chunks/chunk.3MSWQ3RG.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
E
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
|
||||
// ../../node_modules/lit-html/directives/if-defined.js
|
||||
var o = (o2) => o2 ?? E;
|
||||
|
||||
export {
|
||||
o
|
||||
};
|
||||
/*! Bundled license information:
|
||||
|
||||
lit-html/directives/if-defined.js:
|
||||
(**
|
||||
* @license
|
||||
* Copyright 2018 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*)
|
||||
*/
|
||||
12
chrome/static/wa/chunks/chunk.3NKIHICW.js
Normal file
12
chrome/static/wa/chunks/chunk.3NKIHICW.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
|
||||
// src/events/after-hide.ts
|
||||
var WaAfterHideEvent = class extends Event {
|
||||
constructor() {
|
||||
super("wa-after-hide", { bubbles: true, cancelable: false, composed: true });
|
||||
}
|
||||
};
|
||||
|
||||
export {
|
||||
WaAfterHideEvent
|
||||
};
|
||||
29
chrome/static/wa/chunks/chunk.43IMJ6LM.js
Normal file
29
chrome/static/wa/chunks/chunk.43IMJ6LM.js
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaRandomContent
|
||||
} from "./chunk.HE4U2ARF.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/random-content/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-random-content";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaRandomContent,
|
||||
react: React,
|
||||
events: {
|
||||
onWaContentChange: "wa-content-change"
|
||||
},
|
||||
displayName: "WaRandomContent"
|
||||
});
|
||||
var random_content_default = reactWrapper;
|
||||
|
||||
export {
|
||||
random_content_default
|
||||
};
|
||||
440
chrome/static/wa/chunks/chunk.457WG26C.js
Normal file
440
chrome/static/wa/chunks/chunk.457WG26C.js
Normal file
|
|
@ -0,0 +1,440 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
WaClearEvent
|
||||
} from "./chunk.JTOY5KP3.js";
|
||||
import {
|
||||
submitOnEnter
|
||||
} from "./chunk.4XYGFHPR.js";
|
||||
import {
|
||||
input_styles_default
|
||||
} from "./chunk.DOVAIU4B.js";
|
||||
import {
|
||||
form_control_styles_default
|
||||
} from "./chunk.HJ65SLMP.js";
|
||||
import {
|
||||
l
|
||||
} from "./chunk.K5EDTD7G.js";
|
||||
import {
|
||||
MirrorValidator
|
||||
} from "./chunk.R7QX4M6R.js";
|
||||
import {
|
||||
WebAwesomeFormAssociatedElement
|
||||
} from "./chunk.5VKLVAP2.js";
|
||||
import {
|
||||
warnDeprecatedSize
|
||||
} from "./chunk.RPQJAXXR.js";
|
||||
import {
|
||||
HasSlotController
|
||||
} from "./chunk.RWNXKUCF.js";
|
||||
import {
|
||||
size_styles_default
|
||||
} from "./chunk.JB5Y2AN3.js";
|
||||
import {
|
||||
o as o2
|
||||
} from "./chunk.3MSWQ3RG.js";
|
||||
import {
|
||||
e as e2
|
||||
} from "./chunk.KWDPKKFO.js";
|
||||
import {
|
||||
watch
|
||||
} from "./chunk.PZAN6FPN.js";
|
||||
import {
|
||||
e,
|
||||
n,
|
||||
r,
|
||||
t
|
||||
} from "./chunk.LBLI4KS5.js";
|
||||
import {
|
||||
LocalizeController
|
||||
} from "./chunk.DL7HG4WM.js";
|
||||
import {
|
||||
o
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
import {
|
||||
x
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
import {
|
||||
__decorateClass
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/components/input/input.ts
|
||||
var WaInput = class extends WebAwesomeFormAssociatedElement {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.assumeInteractionOn = ["blur", "input"];
|
||||
this.hasSlotController = new HasSlotController(this, "hint", "label");
|
||||
this.localize = new LocalizeController(this);
|
||||
this.title = "";
|
||||
this.type = "text";
|
||||
this._value = null;
|
||||
this.defaultValue = this.getAttribute("value") || null;
|
||||
this.size = "m";
|
||||
this.appearance = "outlined";
|
||||
this.pill = false;
|
||||
this.label = "";
|
||||
this.hint = "";
|
||||
this.withClear = false;
|
||||
this.placeholder = "";
|
||||
this.readonly = false;
|
||||
this.passwordToggle = false;
|
||||
this.passwordVisible = false;
|
||||
this.withoutSpinButtons = false;
|
||||
this.required = false;
|
||||
this.spellcheck = true;
|
||||
this.withLabel = false;
|
||||
this.withHint = false;
|
||||
}
|
||||
static get validators() {
|
||||
return o ? [] : [...super.validators, MirrorValidator()];
|
||||
}
|
||||
/** The current value of the input, submitted as a name/value pair with form data. */
|
||||
get value() {
|
||||
if (this.valueHasChanged) {
|
||||
return this._value;
|
||||
}
|
||||
return this._value ?? this.defaultValue;
|
||||
}
|
||||
set value(val) {
|
||||
if (this._value === val) {
|
||||
return;
|
||||
}
|
||||
this.valueHasChanged = true;
|
||||
this._value = val;
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
updateFormValue(value) {
|
||||
if (value == null) {
|
||||
this.setValue("", null);
|
||||
return;
|
||||
}
|
||||
super.updateFormValue(value);
|
||||
}
|
||||
handleSizeChange() {
|
||||
warnDeprecatedSize(this.localName, this.size);
|
||||
}
|
||||
handleChange(event) {
|
||||
this.value = this.input.value;
|
||||
this.relayNativeEvent(event, { bubbles: true, composed: true });
|
||||
}
|
||||
handleClearClick(event) {
|
||||
event.preventDefault();
|
||||
if (this.value !== "") {
|
||||
this.value = "";
|
||||
this.updateComplete.then(() => {
|
||||
this.dispatchEvent(new WaClearEvent());
|
||||
this.dispatchEvent(new InputEvent("input", { bubbles: true, composed: true }));
|
||||
this.dispatchEvent(new Event("change", { bubbles: true, composed: true }));
|
||||
});
|
||||
}
|
||||
this.input.focus();
|
||||
}
|
||||
handleInput() {
|
||||
this.value = this.input.value;
|
||||
}
|
||||
handleKeyDown(event) {
|
||||
submitOnEnter(event, this);
|
||||
}
|
||||
handlePasswordToggle() {
|
||||
this.passwordVisible = !this.passwordVisible;
|
||||
}
|
||||
updated(changedProperties) {
|
||||
super.updated(changedProperties);
|
||||
if (changedProperties.has("value") || changedProperties.has("defaultValue") || changedProperties.has("type")) {
|
||||
const sanitizingTypes = ["number", "date", "time", "datetime-local"];
|
||||
if (this.input && sanitizingTypes.includes(this.type) && this.value && this.input.value !== this.value) {
|
||||
this._value = this.input.value;
|
||||
}
|
||||
this.customStates.set("blank", !this.value);
|
||||
this.updateValidity();
|
||||
}
|
||||
}
|
||||
handleStepChange() {
|
||||
this.input.step = String(this.step);
|
||||
this.updateValidity();
|
||||
}
|
||||
/** Sets focus on the input. */
|
||||
focus(options) {
|
||||
this.input.focus(options);
|
||||
}
|
||||
/** Removes focus from the input. */
|
||||
blur() {
|
||||
this.input.blur();
|
||||
}
|
||||
/** Selects all the text in the input. */
|
||||
select() {
|
||||
this.input.select();
|
||||
}
|
||||
/** Sets the start and end positions of the text selection (0-based). */
|
||||
setSelectionRange(selectionStart, selectionEnd, selectionDirection = "none") {
|
||||
this.input.setSelectionRange(selectionStart, selectionEnd, selectionDirection);
|
||||
}
|
||||
/** Replaces a range of text with a new string. */
|
||||
setRangeText(replacement, start, end, selectMode = "preserve") {
|
||||
const selectionStart = start ?? this.input.selectionStart;
|
||||
const selectionEnd = end ?? this.input.selectionEnd;
|
||||
this.input.setRangeText(replacement, selectionStart, selectionEnd, selectMode);
|
||||
if (this.value !== this.input.value) {
|
||||
this.value = this.input.value;
|
||||
}
|
||||
}
|
||||
/** Displays the browser picker for an input element (only works if the browser supports it for the input type). */
|
||||
showPicker() {
|
||||
if ("showPicker" in HTMLInputElement.prototype) {
|
||||
this.input.showPicker();
|
||||
}
|
||||
}
|
||||
/** Increments the value of a numeric input type by the value of the step attribute. */
|
||||
stepUp() {
|
||||
this.input.stepUp();
|
||||
if (this.value !== this.input.value) {
|
||||
this.value = this.input.value;
|
||||
}
|
||||
}
|
||||
/** Decrements the value of a numeric input type by the value of the step attribute. */
|
||||
stepDown() {
|
||||
this.input.stepDown();
|
||||
if (this.value !== this.input.value) {
|
||||
this.value = this.input.value;
|
||||
}
|
||||
}
|
||||
formResetCallback() {
|
||||
this.value = null;
|
||||
if (this.input) {
|
||||
this.input.value = this.value;
|
||||
}
|
||||
super.formResetCallback();
|
||||
}
|
||||
render() {
|
||||
const hasLabelSlot = this.hasSlotController.test("label", "withLabel");
|
||||
const hasHintSlot = this.hasSlotController.test("hint", "withHint");
|
||||
const hasLabel = this.label ? true : !!hasLabelSlot;
|
||||
const hasHint = this.hint ? true : !!hasHintSlot;
|
||||
const hasClearIcon = this.withClear && !this.disabled && !this.readonly;
|
||||
const isClearIconVisible = (
|
||||
// prevents hydration mismatch errors.
|
||||
(!this.didSSR || this.hasUpdated) && hasClearIcon && (typeof this.value === "number" || this.value && this.value.length > 0)
|
||||
);
|
||||
return x`
|
||||
<label
|
||||
part="form-control-label label"
|
||||
class=${e2({
|
||||
label: true,
|
||||
"has-label": hasLabel
|
||||
})}
|
||||
for="input"
|
||||
aria-hidden=${hasLabel ? "false" : "true"}
|
||||
>
|
||||
<slot name="label">${this.label}</slot>
|
||||
</label>
|
||||
|
||||
<div part="base input-wrapper" class="text-field">
|
||||
<slot name="start" part="start" class="start"></slot>
|
||||
|
||||
<input
|
||||
part="input"
|
||||
id="input"
|
||||
class="control"
|
||||
type=${this.type === "password" && this.passwordVisible ? "text" : this.type}
|
||||
title=${this.title}
|
||||
name=${o2(this.name)}
|
||||
?disabled=${this.disabled}
|
||||
?readonly=${this.readonly}
|
||||
?required=${this.required}
|
||||
placeholder=${o2(this.placeholder)}
|
||||
minlength=${o2(this.minlength)}
|
||||
maxlength=${o2(this.maxlength)}
|
||||
min=${o2(this.min)}
|
||||
max=${o2(this.max)}
|
||||
step=${o2(this.step)}
|
||||
.value=${l(this.value ?? "")}
|
||||
autocapitalize=${o2(this.autocapitalize)}
|
||||
autocomplete=${o2(this.autocomplete)}
|
||||
autocorrect=${this.autocorrect ? "on" : "off"}
|
||||
?autofocus=${this.autofocus}
|
||||
spellcheck=${this.spellcheck}
|
||||
pattern=${o2(this.pattern)}
|
||||
enterkeyhint=${o2(this.enterkeyhint)}
|
||||
inputmode=${o2(this.inputmode)}
|
||||
aria-describedby="hint"
|
||||
@change=${this.handleChange}
|
||||
@input=${this.handleInput}
|
||||
@keydown=${this.handleKeyDown}
|
||||
/>
|
||||
|
||||
${isClearIconVisible ? x`
|
||||
<button
|
||||
part="clear-button"
|
||||
class="clear"
|
||||
type="button"
|
||||
aria-label=${this.localize.term("clearEntry")}
|
||||
@click=${this.handleClearClick}
|
||||
tabindex="-1"
|
||||
>
|
||||
<slot name="clear-icon">
|
||||
<wa-icon name="circle-xmark" library="system" variant="regular"></wa-icon>
|
||||
</slot>
|
||||
</button>
|
||||
` : ""}
|
||||
${this.passwordToggle && !this.disabled ? x`
|
||||
<button
|
||||
part="password-toggle-button"
|
||||
class="password-toggle"
|
||||
type="button"
|
||||
aria-label=${this.localize.term(this.passwordVisible ? "hidePassword" : "showPassword")}
|
||||
@click=${this.handlePasswordToggle}
|
||||
>
|
||||
${!this.passwordVisible ? x`
|
||||
<slot name="show-password-icon">
|
||||
<wa-icon name="eye" library="system" variant="regular"></wa-icon>
|
||||
</slot>
|
||||
` : x`
|
||||
<slot name="hide-password-icon">
|
||||
<wa-icon name="eye-slash" library="system" variant="regular"></wa-icon>
|
||||
</slot>
|
||||
`}
|
||||
</button>
|
||||
` : ""}
|
||||
|
||||
<slot name="end" part="end" class="end"></slot>
|
||||
</div>
|
||||
|
||||
<slot
|
||||
id="hint"
|
||||
part="hint"
|
||||
name="hint"
|
||||
class=${e2({
|
||||
"has-slotted": hasHint
|
||||
})}
|
||||
aria-hidden=${hasHint ? "false" : "true"}
|
||||
>${this.hint}</slot
|
||||
>
|
||||
`;
|
||||
}
|
||||
};
|
||||
WaInput.css = [size_styles_default, form_control_styles_default, input_styles_default];
|
||||
WaInput.shadowRootOptions = { ...WebAwesomeFormAssociatedElement.shadowRootOptions, delegatesFocus: true };
|
||||
__decorateClass([
|
||||
e("input")
|
||||
], WaInput.prototype, "input", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaInput.prototype, "title", 2);
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaInput.prototype, "type", 2);
|
||||
__decorateClass([
|
||||
r()
|
||||
], WaInput.prototype, "value", 1);
|
||||
__decorateClass([
|
||||
n({ attribute: "value", reflect: true })
|
||||
], WaInput.prototype, "defaultValue", 2);
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaInput.prototype, "size", 2);
|
||||
__decorateClass([
|
||||
watch("size")
|
||||
], WaInput.prototype, "handleSizeChange", 1);
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaInput.prototype, "appearance", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean, reflect: true })
|
||||
], WaInput.prototype, "pill", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaInput.prototype, "label", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "hint" })
|
||||
], WaInput.prototype, "hint", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "with-clear", type: Boolean })
|
||||
], WaInput.prototype, "withClear", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaInput.prototype, "placeholder", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean, reflect: true })
|
||||
], WaInput.prototype, "readonly", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "password-toggle", type: Boolean })
|
||||
], WaInput.prototype, "passwordToggle", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "password-visible", type: Boolean })
|
||||
], WaInput.prototype, "passwordVisible", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "without-spin-buttons", type: Boolean, reflect: true })
|
||||
], WaInput.prototype, "withoutSpinButtons", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean, reflect: true })
|
||||
], WaInput.prototype, "required", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaInput.prototype, "pattern", 2);
|
||||
__decorateClass([
|
||||
n({ type: Number })
|
||||
], WaInput.prototype, "minlength", 2);
|
||||
__decorateClass([
|
||||
n({ type: Number })
|
||||
], WaInput.prototype, "maxlength", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaInput.prototype, "min", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaInput.prototype, "max", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaInput.prototype, "step", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaInput.prototype, "autocapitalize", 2);
|
||||
__decorateClass([
|
||||
n({
|
||||
type: Boolean,
|
||||
converter: {
|
||||
fromAttribute: (value) => !value || value === "off" ? false : true,
|
||||
toAttribute: (value) => value ? "on" : "off"
|
||||
}
|
||||
})
|
||||
], WaInput.prototype, "autocorrect", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaInput.prototype, "autocomplete", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean })
|
||||
], WaInput.prototype, "autofocus", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaInput.prototype, "enterkeyhint", 2);
|
||||
__decorateClass([
|
||||
n({
|
||||
type: Boolean,
|
||||
converter: {
|
||||
// Allow "true|false" attribute values but keep the property boolean
|
||||
fromAttribute: (value) => !value || value === "false" ? false : true,
|
||||
toAttribute: (value) => value ? "true" : "false"
|
||||
}
|
||||
})
|
||||
], WaInput.prototype, "spellcheck", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaInput.prototype, "inputmode", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "with-label", type: Boolean })
|
||||
], WaInput.prototype, "withLabel", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "with-hint", type: Boolean })
|
||||
], WaInput.prototype, "withHint", 2);
|
||||
__decorateClass([
|
||||
watch("step", { waitUntilFirstUpdate: true })
|
||||
], WaInput.prototype, "handleStepChange", 1);
|
||||
WaInput = __decorateClass([
|
||||
t("wa-input")
|
||||
], WaInput);
|
||||
WaInput.disableWarning?.("change-in-update");
|
||||
|
||||
export {
|
||||
WaInput
|
||||
};
|
||||
2239
chrome/static/wa/chunks/chunk.46NHROTP.js
Normal file
2239
chrome/static/wa/chunks/chunk.46NHROTP.js
Normal file
File diff suppressed because it is too large
Load diff
261
chrome/static/wa/chunks/chunk.4AI6OCVC.js
Normal file
261
chrome/static/wa/chunks/chunk.4AI6OCVC.js
Normal file
|
|
@ -0,0 +1,261 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
checkbox_styles_default
|
||||
} from "./chunk.YNIJJMXK.js";
|
||||
import {
|
||||
RequiredValidator
|
||||
} from "./chunk.GWSUX3V5.js";
|
||||
import {
|
||||
form_control_styles_default
|
||||
} from "./chunk.HJ65SLMP.js";
|
||||
import {
|
||||
l
|
||||
} from "./chunk.K5EDTD7G.js";
|
||||
import {
|
||||
WebAwesomeFormAssociatedElement
|
||||
} from "./chunk.5VKLVAP2.js";
|
||||
import {
|
||||
warnDeprecatedSize
|
||||
} from "./chunk.RPQJAXXR.js";
|
||||
import {
|
||||
HasSlotController
|
||||
} from "./chunk.RWNXKUCF.js";
|
||||
import {
|
||||
size_styles_default
|
||||
} from "./chunk.JB5Y2AN3.js";
|
||||
import {
|
||||
o as o2
|
||||
} from "./chunk.3MSWQ3RG.js";
|
||||
import {
|
||||
e as e2
|
||||
} from "./chunk.KWDPKKFO.js";
|
||||
import {
|
||||
watch
|
||||
} from "./chunk.PZAN6FPN.js";
|
||||
import {
|
||||
e,
|
||||
n,
|
||||
t
|
||||
} from "./chunk.LBLI4KS5.js";
|
||||
import {
|
||||
o
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
import {
|
||||
x
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
import {
|
||||
__decorateClass
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/components/checkbox/checkbox.ts
|
||||
var WaCheckbox = class extends WebAwesomeFormAssociatedElement {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.hasSlotController = new HasSlotController(this, "hint");
|
||||
this.title = "";
|
||||
// make reactive to pass through
|
||||
this._value = this.getAttribute("value") ?? null;
|
||||
this.size = "m";
|
||||
this.disabled = false;
|
||||
this.indeterminate = false;
|
||||
this._checked = null;
|
||||
this.defaultChecked = this.hasAttribute("checked");
|
||||
this.required = false;
|
||||
this.hint = "";
|
||||
}
|
||||
static get validators() {
|
||||
const validators = o ? [] : [
|
||||
RequiredValidator({
|
||||
validationProperty: "checked",
|
||||
// Use a checkbox so we get "free" translation strings.
|
||||
validationElement: Object.assign(document.createElement("input"), {
|
||||
type: "checkbox",
|
||||
required: true
|
||||
})
|
||||
})
|
||||
];
|
||||
return [...super.validators, ...validators];
|
||||
}
|
||||
/** The value of the checkbox, submitted as a name/value pair with form data. */
|
||||
get value() {
|
||||
return this._value ?? "on";
|
||||
}
|
||||
set value(val) {
|
||||
this._value = val;
|
||||
}
|
||||
handleSizeChange() {
|
||||
warnDeprecatedSize(this.localName, this.size);
|
||||
}
|
||||
get checked() {
|
||||
if (this.valueHasChanged) {
|
||||
return Boolean(this._checked);
|
||||
}
|
||||
return this._checked ?? this.defaultChecked;
|
||||
}
|
||||
set checked(val) {
|
||||
this._checked = Boolean(val);
|
||||
this.valueHasChanged = true;
|
||||
}
|
||||
handleClick() {
|
||||
this.hasInteracted = true;
|
||||
this.checked = !this.checked;
|
||||
this.indeterminate = false;
|
||||
this.updateComplete.then(() => {
|
||||
this.dispatchEvent(new Event("change", { bubbles: true, composed: true }));
|
||||
});
|
||||
}
|
||||
connectedCallback() {
|
||||
super.connectedCallback();
|
||||
if (this.didSSR && !this.hasUpdated) {
|
||||
this.updateComplete.then(() => {
|
||||
this.handleDefaultCheckedChange();
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.handleDefaultCheckedChange();
|
||||
}
|
||||
handleDefaultCheckedChange() {
|
||||
this.handleValueOrCheckedChange();
|
||||
}
|
||||
handleValueOrCheckedChange() {
|
||||
if (this.didSSR && !this.hasUpdated) {
|
||||
this.updateComplete.then(() => {
|
||||
this.handleValueOrCheckedChange();
|
||||
});
|
||||
return;
|
||||
}
|
||||
this.setValue(this.checked ? this.value : null, this._value);
|
||||
this.updateValidity();
|
||||
}
|
||||
handleStateChange() {
|
||||
if (this.hasUpdated) {
|
||||
this.input.checked = this.checked;
|
||||
this.input.indeterminate = this.indeterminate;
|
||||
}
|
||||
this.customStates.set("checked", this.checked);
|
||||
this.customStates.set("indeterminate", this.indeterminate);
|
||||
this.updateValidity();
|
||||
}
|
||||
handleDisabledChange() {
|
||||
this.customStates.set("disabled", this.disabled);
|
||||
}
|
||||
willUpdate(changedProperties) {
|
||||
super.willUpdate(changedProperties);
|
||||
if (changedProperties.has("value") || changedProperties.has("checked") || changedProperties.has("defaultChecked") || changedProperties.has("disabled")) {
|
||||
this.handleValueOrCheckedChange();
|
||||
}
|
||||
}
|
||||
formResetCallback() {
|
||||
this._checked = null;
|
||||
super.formResetCallback();
|
||||
this.handleValueOrCheckedChange();
|
||||
}
|
||||
/** Simulates a click on the checkbox. */
|
||||
click() {
|
||||
this.input.click();
|
||||
}
|
||||
/** Sets focus on the checkbox. */
|
||||
focus(options) {
|
||||
this.input.focus(options);
|
||||
}
|
||||
/** Removes focus from the checkbox. */
|
||||
blur() {
|
||||
this.input.blur();
|
||||
}
|
||||
render() {
|
||||
const hasHintSlot = o ? true : this.hasSlotController.test("hint");
|
||||
const hasHint = this.hint ? true : !!hasHintSlot;
|
||||
const isIndeterminate = !this.checked && this.indeterminate;
|
||||
const iconName = isIndeterminate ? "indeterminate" : "check";
|
||||
const iconState = isIndeterminate ? "indeterminate" : "checked";
|
||||
const checkedAttribute = this.didSSR && !this.hasUpdated ? this.checked : this.defaultChecked;
|
||||
const checkedProperty = this.didSSR && !this.hasUpdated ? null : l(this.checked);
|
||||
return x`
|
||||
<label part="base checkbox">
|
||||
<span part="control">
|
||||
<input
|
||||
class="input"
|
||||
type="checkbox"
|
||||
title=${this.title}
|
||||
name=${o2(this.name)}
|
||||
value=${o2(this.value)}
|
||||
.indeterminate=${l(this.indeterminate)}
|
||||
.checked=${o2(checkedProperty)}
|
||||
?checked=${checkedAttribute}
|
||||
?disabled=${this.disabled}
|
||||
?required=${this.required}
|
||||
aria-checked=${this.indeterminate ? "mixed" : this.checked ? "true" : "false"}
|
||||
aria-describedby="hint"
|
||||
@click=${this.handleClick}
|
||||
/>
|
||||
|
||||
<wa-icon part="${iconState}-icon icon" library="system" name=${iconName}></wa-icon>
|
||||
</span>
|
||||
|
||||
<slot part="label"></slot>
|
||||
</label>
|
||||
|
||||
<slot
|
||||
id="hint"
|
||||
part="hint"
|
||||
name="hint"
|
||||
aria-hidden=${hasHint ? "false" : "true"}
|
||||
class="${e2({ "has-slotted": hasHint })}"
|
||||
>
|
||||
${this.hint}
|
||||
</slot>
|
||||
`;
|
||||
}
|
||||
};
|
||||
WaCheckbox.css = [form_control_styles_default, size_styles_default, checkbox_styles_default];
|
||||
WaCheckbox.shadowRootOptions = { ...WebAwesomeFormAssociatedElement.shadowRootOptions, delegatesFocus: true };
|
||||
__decorateClass([
|
||||
e('input[type="checkbox"]')
|
||||
], WaCheckbox.prototype, "input", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaCheckbox.prototype, "title", 2);
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaCheckbox.prototype, "value", 1);
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaCheckbox.prototype, "size", 2);
|
||||
__decorateClass([
|
||||
watch("size")
|
||||
], WaCheckbox.prototype, "handleSizeChange", 1);
|
||||
__decorateClass([
|
||||
n({ type: Boolean })
|
||||
], WaCheckbox.prototype, "disabled", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean, reflect: true })
|
||||
], WaCheckbox.prototype, "indeterminate", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean, attribute: false })
|
||||
], WaCheckbox.prototype, "checked", 1);
|
||||
__decorateClass([
|
||||
n({ type: Boolean, reflect: true, attribute: "checked" })
|
||||
], WaCheckbox.prototype, "defaultChecked", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean, reflect: true })
|
||||
], WaCheckbox.prototype, "required", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaCheckbox.prototype, "hint", 2);
|
||||
__decorateClass([
|
||||
watch(["checked", "defaultChecked"])
|
||||
], WaCheckbox.prototype, "handleDefaultCheckedChange", 1);
|
||||
__decorateClass([
|
||||
watch(["checked", "indeterminate"])
|
||||
], WaCheckbox.prototype, "handleStateChange", 1);
|
||||
__decorateClass([
|
||||
watch("disabled")
|
||||
], WaCheckbox.prototype, "handleDisabledChange", 1);
|
||||
WaCheckbox = __decorateClass([
|
||||
t("wa-checkbox")
|
||||
], WaCheckbox);
|
||||
WaCheckbox.disableWarning?.("change-in-update");
|
||||
|
||||
export {
|
||||
WaCheckbox
|
||||
};
|
||||
353
chrome/static/wa/chunks/chunk.4EC7IRRU.js
Normal file
353
chrome/static/wa/chunks/chunk.4EC7IRRU.js
Normal file
|
|
@ -0,0 +1,353 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/color-picker/color-picker.styles.ts
|
||||
var color_picker_styles_default = i`
|
||||
:host {
|
||||
--grid-width: 17em;
|
||||
--grid-height: 12em;
|
||||
--grid-handle-size: 1.25em;
|
||||
--slider-height: 1em;
|
||||
--slider-handle-size: calc(var(--slider-height) + 0.25em);
|
||||
}
|
||||
|
||||
.color-picker {
|
||||
background-color: var(--wa-color-surface-raised);
|
||||
border-radius: var(--wa-border-radius-m);
|
||||
border-style: var(--wa-border-style);
|
||||
border-width: var(--wa-border-width-s);
|
||||
border-color: var(--wa-color-surface-border);
|
||||
box-shadow: var(--wa-shadow-m);
|
||||
color: var(--color);
|
||||
font: inherit;
|
||||
font-size: inherit;
|
||||
user-select: none;
|
||||
width: var(--grid-width);
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.grid {
|
||||
position: relative;
|
||||
height: var(--grid-height);
|
||||
background-image:
|
||||
linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%),
|
||||
linear-gradient(to right, #fff 0%, rgba(255, 255, 255, 0) 100%);
|
||||
border-top-left-radius: calc(var(--wa-border-radius-m) - var(--wa-border-width-s));
|
||||
border-top-right-radius: calc(var(--wa-border-radius-m) - var(--wa-border-width-s));
|
||||
cursor: crosshair;
|
||||
forced-color-adjust: none;
|
||||
}
|
||||
|
||||
.grid-handle {
|
||||
position: absolute;
|
||||
width: var(--grid-handle-size);
|
||||
height: var(--grid-handle-size);
|
||||
border-radius: var(--wa-border-radius-circle);
|
||||
box-shadow: 0 0 0 0.0625rem rgba(0, 0, 0, 0.2);
|
||||
border: solid 0.125rem white;
|
||||
margin-top: calc(var(--grid-handle-size) / -2);
|
||||
margin-left: calc(var(--grid-handle-size) / -2);
|
||||
transition: scale var(--wa-transition-normal) var(--wa-transition-easing);
|
||||
}
|
||||
|
||||
.grid-handle-dragging {
|
||||
cursor: none;
|
||||
scale: 1.5;
|
||||
}
|
||||
|
||||
.grid-handle:focus-visible {
|
||||
outline: var(--wa-focus-ring);
|
||||
}
|
||||
|
||||
.controls {
|
||||
padding: 0.75em;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.sliders {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.slider {
|
||||
position: relative;
|
||||
height: var(--slider-height);
|
||||
border-radius: var(--wa-border-radius-s);
|
||||
box-shadow: inset 0 0 0 0.0625rem rgba(0, 0, 0, 0.2);
|
||||
forced-color-adjust: none;
|
||||
}
|
||||
|
||||
.slider:not(:last-of-type) {
|
||||
margin-bottom: 0.75em;
|
||||
}
|
||||
|
||||
.slider-handle {
|
||||
position: absolute;
|
||||
top: calc(50% - var(--slider-handle-size) / 2);
|
||||
width: var(--slider-handle-size);
|
||||
height: var(--slider-handle-size);
|
||||
border-radius: var(--wa-border-radius-circle);
|
||||
border: solid 0.125rem white;
|
||||
box-shadow: 0 0 0 0.0625rem rgba(0, 0, 0, 0.2);
|
||||
margin-left: calc(var(--slider-handle-size) / -2);
|
||||
}
|
||||
|
||||
.slider-handle:focus-visible {
|
||||
outline: var(--wa-focus-ring);
|
||||
}
|
||||
|
||||
.hue {
|
||||
background-image: linear-gradient(
|
||||
to right,
|
||||
rgb(255, 0, 0) 0%,
|
||||
rgb(255, 255, 0) 17%,
|
||||
rgb(0, 255, 0) 33%,
|
||||
rgb(0, 255, 255) 50%,
|
||||
rgb(0, 0, 255) 67%,
|
||||
rgb(255, 0, 255) 83%,
|
||||
rgb(255, 0, 0) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.alpha .alpha-gradient {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
}
|
||||
|
||||
.preview {
|
||||
flex: 0 0 auto;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
width: 3em;
|
||||
height: 3em;
|
||||
border: none;
|
||||
border-radius: var(--wa-border-radius-circle);
|
||||
background: none;
|
||||
font-size: inherit;
|
||||
margin-inline-start: 0.75em;
|
||||
cursor: copy;
|
||||
forced-color-adjust: none;
|
||||
}
|
||||
|
||||
.preview:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
box-shadow: inset 0 0 0 0.0625rem rgba(0, 0, 0, 0.2);
|
||||
|
||||
/* We use a custom property in lieu of currentColor because of https://bugs.webkit.org/show_bug.cgi?id=216780 */
|
||||
background-color: var(--preview-color);
|
||||
}
|
||||
|
||||
.preview:focus-visible {
|
||||
outline: var(--wa-focus-ring);
|
||||
outline-offset: var(--wa-focus-ring-offset);
|
||||
}
|
||||
|
||||
.preview-color {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: solid 0.0625rem rgba(0, 0, 0, 0.125);
|
||||
}
|
||||
|
||||
.preview-color-copied {
|
||||
animation: pulse 850ms;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
box-shadow: 0 0 0 0 var(--wa-color-brand-fill-loud);
|
||||
}
|
||||
70% {
|
||||
box-shadow: 0 0 0 0.5rem transparent;
|
||||
}
|
||||
100% {
|
||||
box-shadow: 0 0 0 0 transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.user-input {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 0.75em 0.75em 0.75em;
|
||||
}
|
||||
|
||||
.user-input wa-input {
|
||||
min-width: 0; /* fix input width in Safari */
|
||||
flex: 1 1 auto;
|
||||
|
||||
&::part(form-control-label) {
|
||||
/* Visually hidden */
|
||||
position: absolute !important;
|
||||
width: 1px !important;
|
||||
height: 1px !important;
|
||||
clip: rect(0 0 0 0) !important;
|
||||
clip-path: inset(50%) !important;
|
||||
border: none !important;
|
||||
overflow: hidden !important;
|
||||
white-space: nowrap !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.user-input wa-button-group {
|
||||
margin-inline-start: 0.75em;
|
||||
|
||||
&::part(base) {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.user-input wa-button:first-of-type {
|
||||
min-width: 3em;
|
||||
max-width: 3em;
|
||||
}
|
||||
|
||||
.swatches {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(min(1.5em, 100%), 1fr));
|
||||
grid-gap: 0.5em;
|
||||
justify-items: center;
|
||||
border-block-start: var(--wa-form-control-border-style) var(--wa-form-control-border-width)
|
||||
var(--wa-color-surface-border);
|
||||
padding: 0.5em;
|
||||
forced-color-adjust: none;
|
||||
}
|
||||
|
||||
.swatch {
|
||||
position: relative;
|
||||
aspect-ratio: 1 / 1;
|
||||
width: 100%;
|
||||
border-radius: var(--wa-border-radius-s);
|
||||
}
|
||||
|
||||
.swatch .swatch-color {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: solid 0.0625rem rgba(0, 0, 0, 0.125);
|
||||
border-radius: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.swatch:focus-visible {
|
||||
outline: var(--wa-focus-ring);
|
||||
outline-offset: var(--wa-focus-ring-offset);
|
||||
}
|
||||
|
||||
.transparent-bg {
|
||||
background-image:
|
||||
linear-gradient(45deg, var(--wa-color-neutral-fill-normal) 25%, transparent 25%),
|
||||
linear-gradient(45deg, transparent 75%, var(--wa-color-neutral-fill-normal) 75%),
|
||||
linear-gradient(45deg, transparent 75%, var(--wa-color-neutral-fill-normal) 75%),
|
||||
linear-gradient(45deg, var(--wa-color-neutral-fill-normal) 25%, transparent 25%);
|
||||
background-size: 0.5rem 0.5rem;
|
||||
background-position:
|
||||
0 0,
|
||||
0 0,
|
||||
-0.25rem -0.25rem,
|
||||
0.25rem 0.25rem;
|
||||
}
|
||||
|
||||
:host([disabled]) {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
|
||||
.grid,
|
||||
.grid-handle,
|
||||
.slider,
|
||||
.slider-handle,
|
||||
.preview,
|
||||
.swatch,
|
||||
.swatch-color {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Color dropdown
|
||||
*/
|
||||
|
||||
.color-dropdown {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.color-dropdown::part(panel) {
|
||||
max-height: none;
|
||||
background-color: var(--wa-color-surface-raised);
|
||||
border: var(--wa-border-style) var(--wa-border-width-s) var(--wa-color-surface-border);
|
||||
border-radius: var(--wa-border-radius-m);
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.trigger {
|
||||
display: block;
|
||||
position: relative;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-size: inherit;
|
||||
forced-color-adjust: none;
|
||||
width: var(--wa-form-control-height);
|
||||
height: var(--wa-form-control-height);
|
||||
border-radius: var(--wa-form-control-border-radius);
|
||||
}
|
||||
|
||||
.trigger:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
background-color: currentColor;
|
||||
box-shadow:
|
||||
inset 0 0 0 var(--wa-form-control-border-width) var(--wa-form-control-border-color),
|
||||
inset 0 0 0 calc(var(--wa-form-control-border-width) * 3) var(--wa-color-surface-default);
|
||||
}
|
||||
|
||||
.trigger-empty:before {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.trigger:focus-visible {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.trigger:focus-visible:not(.trigger:disabled) {
|
||||
outline: var(--wa-focus-ring);
|
||||
outline-offset: var(--wa-focus-ring-offset);
|
||||
}
|
||||
|
||||
:host([disabled]) :is(.label, .trigger) {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.form-control.form-control-has-label .label {
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
color_picker_styles_default
|
||||
};
|
||||
13
chrome/static/wa/chunks/chunk.4IALDZ4Y.js
Normal file
13
chrome/static/wa/chunks/chunk.4IALDZ4Y.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
startLoader
|
||||
} from "./chunk.ZFSRFTCP.js";
|
||||
|
||||
// src/webawesome.loader.ts
|
||||
startLoader();
|
||||
Promise.race([
|
||||
new Promise((resolve) => document.addEventListener("wa-discovery-complete", resolve)),
|
||||
new Promise((resolve) => setTimeout(resolve, 2e3))
|
||||
]).then(() => {
|
||||
document.querySelectorAll(".wa-cloak").forEach((el) => el.classList.remove("wa-cloak"));
|
||||
});
|
||||
18
chrome/static/wa/chunks/chunk.4LIBWWJL.js
Normal file
18
chrome/static/wa/chunks/chunk.4LIBWWJL.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
|
||||
// src/internal/active-elements.ts
|
||||
function* activeElements(activeElement = document.activeElement) {
|
||||
if (activeElement === null || activeElement === void 0) return;
|
||||
yield activeElement;
|
||||
if ("shadowRoot" in activeElement && activeElement.shadowRoot && activeElement.shadowRoot.mode !== "closed") {
|
||||
yield* activeElements(activeElement.shadowRoot.activeElement);
|
||||
}
|
||||
}
|
||||
function getDeepestActiveElement() {
|
||||
return [...activeElements()].pop();
|
||||
}
|
||||
|
||||
export {
|
||||
activeElements,
|
||||
getDeepestActiveElement
|
||||
};
|
||||
12
chrome/static/wa/chunks/chunk.4MQTK254.js
Normal file
12
chrome/static/wa/chunks/chunk.4MQTK254.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
|
||||
// src/events/accordion-item-collapsed.ts
|
||||
var WaAccordionItemCollapsedEvent = class extends Event {
|
||||
constructor() {
|
||||
super("wa-accordion-item-collapsed", { bubbles: false, cancelable: false, composed: false });
|
||||
}
|
||||
};
|
||||
|
||||
export {
|
||||
WaAccordionItemCollapsedEvent
|
||||
};
|
||||
312
chrome/static/wa/chunks/chunk.4OSDOJJ4.js
Normal file
312
chrome/static/wa/chunks/chunk.4OSDOJJ4.js
Normal file
|
|
@ -0,0 +1,312 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
popover_styles_default
|
||||
} from "./chunk.Q23D34AW.js";
|
||||
import {
|
||||
WaShowEvent
|
||||
} from "./chunk.4ZAKP7NY.js";
|
||||
import {
|
||||
WaHideEvent
|
||||
} from "./chunk.MQODJ75V.js";
|
||||
import {
|
||||
WaAfterHideEvent
|
||||
} from "./chunk.3NKIHICW.js";
|
||||
import {
|
||||
WaAfterShowEvent
|
||||
} from "./chunk.PX3HMKF7.js";
|
||||
import {
|
||||
WaPopup
|
||||
} from "./chunk.EFKLEU6F.js";
|
||||
import {
|
||||
isTopDismissible,
|
||||
registerDismissible,
|
||||
unregisterDismissible
|
||||
} from "./chunk.3H2FQERJ.js";
|
||||
import {
|
||||
uniqueId
|
||||
} from "./chunk.O6IZ4I7T.js";
|
||||
import {
|
||||
waitForEvent
|
||||
} from "./chunk.F25QOBDY.js";
|
||||
import {
|
||||
animateWithClass
|
||||
} from "./chunk.L6CIKOFQ.js";
|
||||
import {
|
||||
e as e2
|
||||
} from "./chunk.KWDPKKFO.js";
|
||||
import {
|
||||
watch
|
||||
} from "./chunk.PZAN6FPN.js";
|
||||
import {
|
||||
WebAwesomeElement,
|
||||
e,
|
||||
n,
|
||||
r,
|
||||
t
|
||||
} from "./chunk.LBLI4KS5.js";
|
||||
import {
|
||||
x
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
import {
|
||||
__decorateClass
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/components/popover/popover.ts
|
||||
var openPopovers = /* @__PURE__ */ new Set();
|
||||
var WaPopover = class extends WebAwesomeElement {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.anchor = null;
|
||||
this.placement = "top";
|
||||
this.open = false;
|
||||
this.distance = 8;
|
||||
this.skidding = 0;
|
||||
this.for = null;
|
||||
this.withoutArrow = false;
|
||||
this.eventController = new AbortController();
|
||||
this.pressStartedInside = false;
|
||||
this.handleAnchorClick = () => {
|
||||
this.open = !this.open;
|
||||
};
|
||||
this.handleBodyClick = (event) => {
|
||||
const target = event.target;
|
||||
const button = target.closest('[data-popover="close"]');
|
||||
if (button) {
|
||||
event.stopPropagation();
|
||||
this.open = false;
|
||||
}
|
||||
};
|
||||
this.handleDocumentKeyDown = (event) => {
|
||||
if (event.key === "Escape" && this.open && isTopDismissible(this)) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
this.open = false;
|
||||
if (this.anchor && typeof this.anchor.focus === "function") {
|
||||
this.anchor.focus({ preventScroll: true });
|
||||
}
|
||||
}
|
||||
};
|
||||
this.handleDocumentPointerDown = (event) => {
|
||||
this.pressStartedInside = event.composedPath().includes(this);
|
||||
};
|
||||
this.handleDocumentClick = (event) => {
|
||||
const pressStartedInside = this.pressStartedInside;
|
||||
this.pressStartedInside = false;
|
||||
if (pressStartedInside) {
|
||||
return;
|
||||
}
|
||||
if (this.anchor && event.composedPath().includes(this.anchor)) {
|
||||
return;
|
||||
}
|
||||
if (!event.composedPath().includes(this)) {
|
||||
this.open = false;
|
||||
}
|
||||
};
|
||||
}
|
||||
connectedCallback() {
|
||||
super.connectedCallback();
|
||||
if (!this.id) {
|
||||
this.id = uniqueId("wa-popover-");
|
||||
}
|
||||
if (this.eventController.signal.aborted) {
|
||||
this.eventController = new AbortController();
|
||||
}
|
||||
if (this.for && this.anchor) {
|
||||
this.anchor = null;
|
||||
this.handleForChange();
|
||||
}
|
||||
}
|
||||
disconnectedCallback() {
|
||||
super.disconnectedCallback();
|
||||
document.removeEventListener("keydown", this.handleDocumentKeyDown);
|
||||
document.removeEventListener("pointerdown", this.handleDocumentPointerDown, { capture: true });
|
||||
unregisterDismissible(this);
|
||||
this.eventController.abort();
|
||||
}
|
||||
firstUpdated(changedProperties) {
|
||||
super.firstUpdated(changedProperties);
|
||||
if (this.open) {
|
||||
this.dialog.show();
|
||||
this.popup.active = true;
|
||||
this.popup.reposition();
|
||||
}
|
||||
}
|
||||
updated(changedProperties) {
|
||||
if (changedProperties.has("open")) {
|
||||
this.customStates.set("open", this.open);
|
||||
}
|
||||
}
|
||||
async handleOpenChange() {
|
||||
if (this.open) {
|
||||
const waShowEvent = new WaShowEvent();
|
||||
this.dispatchEvent(waShowEvent);
|
||||
if (waShowEvent.defaultPrevented) {
|
||||
this.open = false;
|
||||
return;
|
||||
}
|
||||
openPopovers.forEach((popover) => popover.open = false);
|
||||
document.addEventListener("keydown", this.handleDocumentKeyDown, { signal: this.eventController.signal });
|
||||
document.addEventListener("pointerdown", this.handleDocumentPointerDown, {
|
||||
capture: true,
|
||||
signal: this.eventController.signal
|
||||
});
|
||||
document.addEventListener("click", this.handleDocumentClick, { signal: this.eventController.signal });
|
||||
this.dialog.setAttribute("open", "");
|
||||
this.popup.active = true;
|
||||
openPopovers.add(this);
|
||||
registerDismissible(this);
|
||||
requestAnimationFrame(() => {
|
||||
const elementToFocus = this.querySelector("[autofocus]");
|
||||
if (elementToFocus && typeof elementToFocus.focus === "function") {
|
||||
elementToFocus.focus({ preventScroll: true });
|
||||
} else {
|
||||
this.dialog.focus({ preventScroll: true });
|
||||
}
|
||||
});
|
||||
await animateWithClass(this.popup.popup, "show-with-scale");
|
||||
this.popup.reposition();
|
||||
this.dispatchEvent(new WaAfterShowEvent());
|
||||
} else {
|
||||
const waHideEvent = new WaHideEvent();
|
||||
this.dispatchEvent(waHideEvent);
|
||||
if (waHideEvent.defaultPrevented) {
|
||||
this.open = true;
|
||||
return;
|
||||
}
|
||||
document.removeEventListener("keydown", this.handleDocumentKeyDown);
|
||||
document.removeEventListener("pointerdown", this.handleDocumentPointerDown, { capture: true });
|
||||
document.removeEventListener("click", this.handleDocumentClick);
|
||||
this.pressStartedInside = false;
|
||||
openPopovers.delete(this);
|
||||
unregisterDismissible(this);
|
||||
await animateWithClass(this.popup.popup, "hide-with-scale");
|
||||
this.popup.active = false;
|
||||
this.dialog.close();
|
||||
this.dispatchEvent(new WaAfterHideEvent());
|
||||
}
|
||||
}
|
||||
handleForChange() {
|
||||
const rootNode = this.getRootNode();
|
||||
if (!rootNode) {
|
||||
return;
|
||||
}
|
||||
const newAnchor = this.for ? rootNode.getElementById(this.for) : null;
|
||||
const oldAnchor = this.anchor;
|
||||
if (newAnchor === oldAnchor) {
|
||||
return;
|
||||
}
|
||||
const { signal } = this.eventController;
|
||||
if (newAnchor) {
|
||||
newAnchor.addEventListener("click", this.handleAnchorClick, { signal });
|
||||
}
|
||||
if (oldAnchor) {
|
||||
oldAnchor.removeEventListener("click", this.handleAnchorClick);
|
||||
}
|
||||
this.anchor = newAnchor;
|
||||
if (this.for && !newAnchor) {
|
||||
console.warn(
|
||||
`A popover was assigned to an element with an ID of "${this.for}" but the element could not be found.`,
|
||||
this
|
||||
);
|
||||
}
|
||||
}
|
||||
async handleOptionsChange() {
|
||||
if (this.hasUpdated) {
|
||||
await this.updateComplete;
|
||||
this.popup.reposition();
|
||||
}
|
||||
}
|
||||
/** Shows the popover. */
|
||||
async show() {
|
||||
if (this.open) {
|
||||
return void 0;
|
||||
}
|
||||
this.open = true;
|
||||
return waitForEvent(this, "wa-after-show");
|
||||
}
|
||||
/** Hides the popover. */
|
||||
async hide() {
|
||||
if (!this.open) {
|
||||
return void 0;
|
||||
}
|
||||
this.open = false;
|
||||
return waitForEvent(this, "wa-after-hide");
|
||||
}
|
||||
render() {
|
||||
return x`
|
||||
<dialog part="dialog" class="dialog">
|
||||
<wa-popup
|
||||
part="popup"
|
||||
exportparts="
|
||||
popup:popup__popup,
|
||||
arrow:popup__arrow
|
||||
"
|
||||
class=${e2({
|
||||
popover: true,
|
||||
"popover-open": this.open
|
||||
})}
|
||||
placement=${this.placement}
|
||||
distance=${this.distance}
|
||||
skidding=${this.skidding}
|
||||
flip
|
||||
shift
|
||||
shift-padding="8"
|
||||
?arrow=${!this.withoutArrow}
|
||||
.anchor=${this.anchor}
|
||||
>
|
||||
<div part="body" class="body" @click=${this.handleBodyClick}>
|
||||
<slot></slot>
|
||||
</div>
|
||||
</wa-popup>
|
||||
</dialog>
|
||||
`;
|
||||
}
|
||||
};
|
||||
WaPopover.css = popover_styles_default;
|
||||
WaPopover.dependencies = { "wa-popup": WaPopup };
|
||||
__decorateClass([
|
||||
e("dialog")
|
||||
], WaPopover.prototype, "dialog", 2);
|
||||
__decorateClass([
|
||||
e(".body")
|
||||
], WaPopover.prototype, "body", 2);
|
||||
__decorateClass([
|
||||
e("wa-popup")
|
||||
], WaPopover.prototype, "popup", 2);
|
||||
__decorateClass([
|
||||
r()
|
||||
], WaPopover.prototype, "anchor", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaPopover.prototype, "placement", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean, reflect: true })
|
||||
], WaPopover.prototype, "open", 2);
|
||||
__decorateClass([
|
||||
n({ type: Number })
|
||||
], WaPopover.prototype, "distance", 2);
|
||||
__decorateClass([
|
||||
n({ type: Number })
|
||||
], WaPopover.prototype, "skidding", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaPopover.prototype, "for", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "without-arrow", type: Boolean, reflect: true })
|
||||
], WaPopover.prototype, "withoutArrow", 2);
|
||||
__decorateClass([
|
||||
watch("open", { waitUntilFirstUpdate: true })
|
||||
], WaPopover.prototype, "handleOpenChange", 1);
|
||||
__decorateClass([
|
||||
watch("for")
|
||||
], WaPopover.prototype, "handleForChange", 1);
|
||||
__decorateClass([
|
||||
watch(["distance", "placement", "skidding"])
|
||||
], WaPopover.prototype, "handleOptionsChange", 1);
|
||||
WaPopover = __decorateClass([
|
||||
t("wa-popover")
|
||||
], WaPopover);
|
||||
|
||||
export {
|
||||
WaPopover
|
||||
};
|
||||
27
chrome/static/wa/chunks/chunk.4UDEZ2KB.js
Normal file
27
chrome/static/wa/chunks/chunk.4UDEZ2KB.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaDivider
|
||||
} from "./chunk.ONMWPE2G.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/divider/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-divider";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaDivider,
|
||||
react: React,
|
||||
events: {},
|
||||
displayName: "WaDivider"
|
||||
});
|
||||
var divider_default = reactWrapper;
|
||||
|
||||
export {
|
||||
divider_default
|
||||
};
|
||||
99
chrome/static/wa/chunks/chunk.4XYGFHPR.js
Normal file
99
chrome/static/wa/chunks/chunk.4XYGFHPR.js
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
|
||||
// src/internal/submit-on-enter.ts
|
||||
function submitOnEnter(event, el) {
|
||||
const hasModifier = event.metaKey || event.ctrlKey || event.shiftKey || event.altKey;
|
||||
if (event.key === "Enter" && !hasModifier) {
|
||||
setTimeout(() => {
|
||||
if (!event.defaultPrevented && !event.isComposing) {
|
||||
submitForm(el);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
var submittableTags = /* @__PURE__ */ new Map([
|
||||
["input", true],
|
||||
["wa-input", true],
|
||||
["wa-tag-input", true],
|
||||
["wa-number-input", true],
|
||||
["wa-otp-input", true],
|
||||
["wa-slider", true]
|
||||
]);
|
||||
var submittableTypes = /* @__PURE__ */ new Map([
|
||||
["button", false],
|
||||
["checkbox", false],
|
||||
["color", false],
|
||||
["date", false],
|
||||
["datetime-local", false],
|
||||
["email", true],
|
||||
["file", false],
|
||||
["hidden", false],
|
||||
["image", false],
|
||||
["month", false],
|
||||
["number", true],
|
||||
["password", true],
|
||||
["radio", false],
|
||||
["range", false],
|
||||
["reset", true],
|
||||
["search", true],
|
||||
["submit", false],
|
||||
["tel", true],
|
||||
["text", true],
|
||||
["time", false],
|
||||
["url", true],
|
||||
["week", false]
|
||||
]);
|
||||
var isSubmittableElement = (el) => {
|
||||
const tagName = el?.localName;
|
||||
if (!tagName) {
|
||||
return false;
|
||||
}
|
||||
const isSubmittableTag = Boolean(submittableTags.get(tagName));
|
||||
if (!isSubmittableTag) {
|
||||
return false;
|
||||
}
|
||||
if (tagName !== "input" && tagName !== "wa-input") {
|
||||
return true;
|
||||
}
|
||||
const type = el.type;
|
||||
return Boolean(submittableTypes.get(type));
|
||||
};
|
||||
function submitForm(el) {
|
||||
let form = null;
|
||||
if ("form" in el) {
|
||||
form = el.form;
|
||||
}
|
||||
if (!form && "getForm" in el) {
|
||||
form = el.getForm();
|
||||
}
|
||||
if (!form) {
|
||||
return;
|
||||
}
|
||||
const formElements = Array.from(form.elements);
|
||||
let submittableFormElements = 0;
|
||||
for (const el2 of formElements) {
|
||||
if (isSubmittableElement(el2)) {
|
||||
submittableFormElements += 1;
|
||||
}
|
||||
}
|
||||
if (submittableFormElements === 1) {
|
||||
form.requestSubmit(null);
|
||||
return;
|
||||
}
|
||||
const button = formElements.find((el2) => {
|
||||
return el2.type === "submit" && !el2.matches(":disabled");
|
||||
});
|
||||
if (!button) {
|
||||
return;
|
||||
}
|
||||
if (["input", "button"].includes(button.localName)) {
|
||||
form.requestSubmit(button);
|
||||
} else {
|
||||
button.click();
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
submitOnEnter,
|
||||
submitForm
|
||||
};
|
||||
12
chrome/static/wa/chunks/chunk.4ZAKP7NY.js
Normal file
12
chrome/static/wa/chunks/chunk.4ZAKP7NY.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
|
||||
// src/events/show.ts
|
||||
var WaShowEvent = class extends Event {
|
||||
constructor() {
|
||||
super("wa-show", { bubbles: true, cancelable: true, composed: true });
|
||||
}
|
||||
};
|
||||
|
||||
export {
|
||||
WaShowEvent
|
||||
};
|
||||
76
chrome/static/wa/chunks/chunk.55AH5UAX.js
Normal file
76
chrome/static/wa/chunks/chunk.55AH5UAX.js
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/progress-ring/progress-ring.styles.ts
|
||||
var progress_ring_styles_default = i`
|
||||
:host {
|
||||
--size: 8rem;
|
||||
--track-width: 0.25em; /* avoid using rems here */
|
||||
--track-color: var(--wa-color-neutral-fill-normal);
|
||||
--indicator-width: var(--track-width);
|
||||
--indicator-color: var(--wa-color-brand-fill-loud);
|
||||
--indicator-transition-duration: 0.35s;
|
||||
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.progress-ring {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: var(--size);
|
||||
height: var(--size);
|
||||
rotate: -90deg;
|
||||
transform-origin: 50% 50%;
|
||||
}
|
||||
|
||||
.track,
|
||||
.indicator {
|
||||
--radius: calc(var(--size) / 2 - max(var(--track-width), var(--indicator-width)) * 0.5);
|
||||
--circumference: calc(var(--radius) * 2 * 3.141592654);
|
||||
|
||||
fill: none;
|
||||
r: var(--radius);
|
||||
cx: calc(var(--size) / 2);
|
||||
cy: calc(var(--size) / 2);
|
||||
}
|
||||
|
||||
.track {
|
||||
stroke: var(--track-color);
|
||||
stroke-width: var(--track-width);
|
||||
}
|
||||
|
||||
.indicator {
|
||||
stroke: var(--indicator-color);
|
||||
stroke-width: var(--indicator-width);
|
||||
stroke-linecap: round;
|
||||
transition-property: stroke-dashoffset;
|
||||
transition-duration: var(--indicator-transition-duration);
|
||||
stroke-dasharray: var(--circumference) var(--circumference);
|
||||
stroke-dashoffset: calc(var(--circumference) - var(--percentage) * var(--circumference));
|
||||
}
|
||||
|
||||
.label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
progress_ring_styles_default
|
||||
};
|
||||
27
chrome/static/wa/chunks/chunk.5FPZSTUW.js
Normal file
27
chrome/static/wa/chunks/chunk.5FPZSTUW.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaToast
|
||||
} from "./chunk.BOYYUMGV.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/toast/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-toast";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaToast,
|
||||
react: React,
|
||||
events: {},
|
||||
displayName: "WaToast"
|
||||
});
|
||||
var toast_default = reactWrapper;
|
||||
|
||||
export {
|
||||
toast_default
|
||||
};
|
||||
30
chrome/static/wa/chunks/chunk.5H6HB774.js
Normal file
30
chrome/static/wa/chunks/chunk.5H6HB774.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaStepper
|
||||
} from "./chunk.PUN7URRY.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/stepper/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-stepper";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaStepper,
|
||||
react: React,
|
||||
events: {
|
||||
onWaBeforeStepChange: "wa-before-step-change",
|
||||
onWaStepChange: "wa-step-change"
|
||||
},
|
||||
displayName: "WaStepper"
|
||||
});
|
||||
var stepper_default = reactWrapper;
|
||||
|
||||
export {
|
||||
stepper_default
|
||||
};
|
||||
92
chrome/static/wa/chunks/chunk.5JBQCQFB.js
Normal file
92
chrome/static/wa/chunks/chunk.5JBQCQFB.js
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/tag/tag.styles.ts
|
||||
var tag_styles_default = i`
|
||||
@layer wa-component {
|
||||
:host {
|
||||
display: inline-flex;
|
||||
gap: 0.5em;
|
||||
border-radius: var(--wa-border-radius-m);
|
||||
align-items: center;
|
||||
background-color: var(--wa-color-fill-quiet, var(--wa-color-neutral-fill-quiet));
|
||||
border-color: var(--wa-color-border-normal, var(--wa-color-neutral-border-normal));
|
||||
border-style: var(--wa-border-style);
|
||||
border-width: var(--wa-border-width-s);
|
||||
color: var(--wa-color-on-quiet, var(--wa-color-neutral-on-quiet));
|
||||
font-size: inherit;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
height: calc(var(--wa-form-control-height) * 0.8);
|
||||
line-height: calc(var(--wa-form-control-height) - var(--wa-form-control-border-width) * 2);
|
||||
padding: 0 0.75em;
|
||||
}
|
||||
|
||||
/* Appearance modifiers */
|
||||
: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']) {
|
||||
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));
|
||||
border-color: var(--wa-color-border-normal, var(--wa-color-neutral-border-normal));
|
||||
}
|
||||
|
||||
: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;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
font-size: var(--wa-font-size-smaller);
|
||||
}
|
||||
|
||||
[part='remove-button'] {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
[part='remove-button']::part(base) {
|
||||
padding: 0;
|
||||
height: 1em;
|
||||
width: 1em;
|
||||
color: currentColor;
|
||||
}
|
||||
|
||||
@media (hover: hover) {
|
||||
:host(:hover) > [part='remove-button']::part(base) {
|
||||
background-color: transparent;
|
||||
color: color-mix(in oklab, currentColor, var(--wa-color-mix-hover));
|
||||
}
|
||||
}
|
||||
|
||||
:host(:active) > [part='remove-button']::part(base) {
|
||||
background-color: transparent;
|
||||
color: color-mix(in oklab, currentColor, var(--wa-color-mix-active));
|
||||
}
|
||||
|
||||
/*
|
||||
* Pill modifier
|
||||
*/
|
||||
:host([pill]) {
|
||||
border-radius: var(--wa-border-radius-pill);
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
tag_styles_default
|
||||
};
|
||||
15
chrome/static/wa/chunks/chunk.5KKHTQSP.js
Normal file
15
chrome/static/wa/chunks/chunk.5KKHTQSP.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/include/include.styles.ts
|
||||
var include_styles_default = i`
|
||||
:host {
|
||||
display: block;
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
include_styles_default
|
||||
};
|
||||
15
chrome/static/wa/chunks/chunk.5PFAYAIK.js
Normal file
15
chrome/static/wa/chunks/chunk.5PFAYAIK.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/intersection-observer/intersection-observer.styles.ts
|
||||
var intersection_observer_styles_default = i`
|
||||
:host {
|
||||
display: contents;
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
intersection_observer_styles_default
|
||||
};
|
||||
330
chrome/static/wa/chunks/chunk.5VKLVAP2.js
Normal file
330
chrome/static/wa/chunks/chunk.5VKLVAP2.js
Normal file
|
|
@ -0,0 +1,330 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
WaInvalidEvent
|
||||
} from "./chunk.VC3BPUZJ.js";
|
||||
import {
|
||||
WebAwesomeElement,
|
||||
n
|
||||
} from "./chunk.LBLI4KS5.js";
|
||||
import {
|
||||
o
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
import {
|
||||
__decorateClass
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/internal/validators/custom-error-validator.ts
|
||||
var CustomErrorValidator = () => {
|
||||
return {
|
||||
observedAttributes: ["custom-error"],
|
||||
checkValidity(element) {
|
||||
const validity = {
|
||||
message: "",
|
||||
isValid: true,
|
||||
invalidKeys: []
|
||||
};
|
||||
if (element.customError) {
|
||||
validity.message = element.customError;
|
||||
validity.isValid = false;
|
||||
validity.invalidKeys = ["customError"];
|
||||
}
|
||||
return validity;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// src/internal/webawesome-form-associated-element.ts
|
||||
var WebAwesomeFormAssociatedElement = class extends WebAwesomeElement {
|
||||
constructor() {
|
||||
super();
|
||||
this.name = null;
|
||||
this.disabled = false;
|
||||
this.required = false;
|
||||
this.assumeInteractionOn = ["input"];
|
||||
this.validators = [];
|
||||
this.valueHasChanged = false;
|
||||
this.hasInteracted = false;
|
||||
this.customError = null;
|
||||
this.emittedEvents = [];
|
||||
this.emitInvalid = (e) => {
|
||||
if (e.target !== this) return;
|
||||
this.hasInteracted = true;
|
||||
this.dispatchEvent(new WaInvalidEvent());
|
||||
};
|
||||
this.handleInteraction = (event) => {
|
||||
const emittedEvents = this.emittedEvents;
|
||||
if (!emittedEvents.includes(event.type)) {
|
||||
emittedEvents.push(event.type);
|
||||
}
|
||||
if (emittedEvents.length === this.assumeInteractionOn?.length) {
|
||||
this.hasInteracted = true;
|
||||
}
|
||||
};
|
||||
if ("addEventListener" in this) {
|
||||
this.addEventListener("invalid", this.emitInvalid);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Validators are static because they have `observedAttributes`, essentially attributes to "watch"
|
||||
* for changes. Whenever these attributes change, we want to be notified and update the validator.
|
||||
*/
|
||||
static get validators() {
|
||||
return o ? [] : [CustomErrorValidator()];
|
||||
}
|
||||
// Append all Validator "observedAttributes" into the "observedAttributes" so they can run.
|
||||
static get observedAttributes() {
|
||||
const parentAttrs = new Set(super.observedAttributes || []);
|
||||
for (const validator of this.validators) {
|
||||
if (!validator.observedAttributes) {
|
||||
continue;
|
||||
}
|
||||
for (const attr of validator.observedAttributes) {
|
||||
parentAttrs.add(attr);
|
||||
}
|
||||
}
|
||||
return [...parentAttrs];
|
||||
}
|
||||
connectedCallback() {
|
||||
super.connectedCallback();
|
||||
if (this.didSSR && !this.hasUpdated) {
|
||||
this.updateComplete.then(() => {
|
||||
this.updateValidity();
|
||||
});
|
||||
} else {
|
||||
this.updateValidity();
|
||||
}
|
||||
this.assumeInteractionOn.forEach((event) => {
|
||||
this.addEventListener?.(event, this.handleInteraction);
|
||||
});
|
||||
}
|
||||
firstUpdated(...args) {
|
||||
super.firstUpdated(...args);
|
||||
this.updateValidity();
|
||||
}
|
||||
willUpdate(changedProperties) {
|
||||
if (!o && changedProperties.has("customError")) {
|
||||
if (!this.customError) {
|
||||
this.customError = null;
|
||||
}
|
||||
this.setCustomValidity(this.customError || "");
|
||||
}
|
||||
if (changedProperties.has("value") || changedProperties.has("disabled") || changedProperties.has("defaultValue")) {
|
||||
const value = this.value;
|
||||
this.updateFormValue(value);
|
||||
}
|
||||
if (changedProperties.has("disabled")) {
|
||||
this.customStates.set("disabled", this.disabled);
|
||||
if (this.hasAttribute("disabled") || !o && !this.matches(":disabled")) {
|
||||
this.toggleAttribute("disabled", this.disabled);
|
||||
}
|
||||
}
|
||||
super.willUpdate(changedProperties);
|
||||
if (this.didSSR && !this.hasUpdated) {
|
||||
this.updateComplete.then(() => this.updateValidity());
|
||||
} else {
|
||||
this.updateValidity();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
updateFormValue(value) {
|
||||
if (Array.isArray(value)) {
|
||||
if (this.name) {
|
||||
const formData = new FormData();
|
||||
for (const val of value) {
|
||||
formData.append(this.name, val);
|
||||
}
|
||||
this.setValue(formData, formData);
|
||||
}
|
||||
} else {
|
||||
this.setValue(value, value);
|
||||
}
|
||||
}
|
||||
get labels() {
|
||||
return this.internals.labels;
|
||||
}
|
||||
getForm() {
|
||||
return this.internals.form;
|
||||
}
|
||||
/**
|
||||
* By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you
|
||||
* to place the form control outside of a form and associate it with the form that has this `id`. The form must be in
|
||||
* the same document or shadow root for this to work.
|
||||
*/
|
||||
set form(val) {
|
||||
if (val) {
|
||||
this.setAttribute("form", val);
|
||||
} else {
|
||||
this.removeAttribute("form");
|
||||
}
|
||||
}
|
||||
get form() {
|
||||
return this.internals.form;
|
||||
}
|
||||
get validity() {
|
||||
return this.internals.validity;
|
||||
}
|
||||
// Not sure if this supports `novalidate`. Will need to test.
|
||||
get willValidate() {
|
||||
return this.internals.willValidate;
|
||||
}
|
||||
get validationMessage() {
|
||||
return this.internals.validationMessage;
|
||||
}
|
||||
checkValidity() {
|
||||
this.updateValidity();
|
||||
return this.internals.checkValidity();
|
||||
}
|
||||
reportValidity() {
|
||||
this.updateValidity();
|
||||
this.hasInteracted = true;
|
||||
return this.internals.reportValidity();
|
||||
}
|
||||
/**
|
||||
* Override this to change where constraint validation popups are anchored.
|
||||
*/
|
||||
get validationTarget() {
|
||||
return this.input || void 0;
|
||||
}
|
||||
setValidity(...args) {
|
||||
const flags = args[0];
|
||||
const message = args[1];
|
||||
let anchor = args[2];
|
||||
if (!anchor) {
|
||||
anchor = this.validationTarget;
|
||||
}
|
||||
this.internals.setValidity(flags, message, anchor || void 0);
|
||||
this.requestUpdate("validity");
|
||||
this.setCustomStates();
|
||||
}
|
||||
setCustomStates() {
|
||||
const required = Boolean(this.required);
|
||||
const isValid = this.internals.validity.valid;
|
||||
const hasInteracted = this.hasInteracted;
|
||||
this.customStates.set("required", required);
|
||||
this.customStates.set("optional", !required);
|
||||
this.customStates.set("invalid", !isValid);
|
||||
this.customStates.set("valid", isValid);
|
||||
this.customStates.set("user-invalid", !isValid && hasInteracted);
|
||||
this.customStates.set("user-valid", isValid && hasInteracted);
|
||||
}
|
||||
/**
|
||||
* Do not use this when creating a "Validator". This is intended for end users of components.
|
||||
* We track manually defined custom errors so we don't clear them on accident in our validators.
|
||||
*
|
||||
*/
|
||||
setCustomValidity(message) {
|
||||
if (!message) {
|
||||
this.customError = null;
|
||||
this.setValidity({});
|
||||
return;
|
||||
}
|
||||
this.customError = message;
|
||||
this.setValidity({ customError: true }, message, this.validationTarget);
|
||||
}
|
||||
formResetCallback() {
|
||||
this.resetValidity();
|
||||
this.hasInteracted = false;
|
||||
this.valueHasChanged = false;
|
||||
this.emittedEvents = [];
|
||||
this.updateValidity();
|
||||
}
|
||||
formDisabledCallback(isDisabled) {
|
||||
this.disabled = isDisabled;
|
||||
this.updateValidity();
|
||||
}
|
||||
/**
|
||||
* Called when the browser is trying to restore element’s state to state in which case reason is "restore", or when
|
||||
* the browser is trying to fulfill autofill on behalf of user in which case reason is "autocomplete". In the case of
|
||||
* "restore", state is a string, File, or FormData object previously set as the second argument to setFormValue.
|
||||
*/
|
||||
formStateRestoreCallback(state, reason) {
|
||||
if (this.didSSR && !this.hasUpdated) {
|
||||
this.updateComplete.then(() => {
|
||||
this.value = state;
|
||||
if (reason === "restore") {
|
||||
this.resetValidity();
|
||||
}
|
||||
this.updateValidity();
|
||||
});
|
||||
} else {
|
||||
this.value = state;
|
||||
if (reason === "restore") {
|
||||
this.resetValidity();
|
||||
}
|
||||
this.updateValidity();
|
||||
}
|
||||
}
|
||||
setValue(...args) {
|
||||
const [value, state] = args;
|
||||
this.internals.setFormValue(value, state);
|
||||
}
|
||||
get allValidators() {
|
||||
const staticValidators = this.constructor.validators || [];
|
||||
const validators = this.validators || [];
|
||||
return [...staticValidators, ...validators];
|
||||
}
|
||||
/**
|
||||
* Reset validity is a way of removing manual custom errors and native validation.
|
||||
*/
|
||||
resetValidity() {
|
||||
this.setCustomValidity("");
|
||||
this.setValidity({});
|
||||
}
|
||||
updateValidity() {
|
||||
if (this.disabled || this.hasAttribute("disabled") || !this.willValidate) {
|
||||
this.resetValidity();
|
||||
return;
|
||||
}
|
||||
const validators = this.allValidators;
|
||||
if (!validators?.length) {
|
||||
return;
|
||||
}
|
||||
const flags = {
|
||||
// Don't trust custom errors from the Browser. Safari breaks the spec.
|
||||
customError: Boolean(this.customError)
|
||||
};
|
||||
const formControl = this.validationTarget || this.input || void 0;
|
||||
let finalMessage = "";
|
||||
for (const validator of validators) {
|
||||
const { isValid, message, invalidKeys } = validator.checkValidity(this);
|
||||
if (isValid) {
|
||||
continue;
|
||||
}
|
||||
if (!finalMessage) {
|
||||
finalMessage = message;
|
||||
}
|
||||
if (invalidKeys?.length >= 0) {
|
||||
invalidKeys.forEach((str) => flags[str] = true);
|
||||
}
|
||||
}
|
||||
if (!finalMessage) {
|
||||
finalMessage = this.validationMessage;
|
||||
}
|
||||
this.setValidity(flags, finalMessage, formControl);
|
||||
}
|
||||
};
|
||||
WebAwesomeFormAssociatedElement.formAssociated = true;
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WebAwesomeFormAssociatedElement.prototype, "name", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean })
|
||||
], WebAwesomeFormAssociatedElement.prototype, "disabled", 2);
|
||||
__decorateClass([
|
||||
n({ state: true, attribute: false })
|
||||
], WebAwesomeFormAssociatedElement.prototype, "valueHasChanged", 2);
|
||||
__decorateClass([
|
||||
n({ state: true, attribute: false })
|
||||
], WebAwesomeFormAssociatedElement.prototype, "hasInteracted", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "custom-error", reflect: true })
|
||||
], WebAwesomeFormAssociatedElement.prototype, "customError", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: false, state: true, type: Object })
|
||||
], WebAwesomeFormAssociatedElement.prototype, "validity", 1);
|
||||
|
||||
export {
|
||||
WebAwesomeFormAssociatedElement
|
||||
};
|
||||
68
chrome/static/wa/chunks/chunk.5ZSSLK3M.js
Normal file
68
chrome/static/wa/chunks/chunk.5ZSSLK3M.js
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/tab/tab.styles.ts
|
||||
var tab_styles_default = i`
|
||||
:host {
|
||||
display: inline-block;
|
||||
color: var(--wa-color-neutral-on-quiet);
|
||||
font-weight: var(--wa-font-weight-action);
|
||||
}
|
||||
|
||||
.tab {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
font: inherit;
|
||||
padding: 1em 1.5em;
|
||||
white-space: nowrap;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
cursor: pointer;
|
||||
transition: color var(--wa-transition-fast) var(--wa-transition-easing);
|
||||
|
||||
::slotted(wa-icon:first-child) {
|
||||
margin-inline-end: 0.5em;
|
||||
}
|
||||
|
||||
::slotted(wa-icon:last-child) {
|
||||
margin-inline-start: 0.5em;
|
||||
}
|
||||
}
|
||||
|
||||
@media (hover: hover) {
|
||||
:host(:hover:not([disabled])) .tab {
|
||||
color: currentColor;
|
||||
}
|
||||
}
|
||||
|
||||
:host(:focus) {
|
||||
outline: transparent;
|
||||
}
|
||||
|
||||
:host(:focus-visible) .tab {
|
||||
outline: var(--wa-focus-ring);
|
||||
outline-offset: calc(-1 * var(--wa-border-width-l) - var(--wa-focus-ring-offset));
|
||||
}
|
||||
|
||||
:host([active]:not([disabled])) {
|
||||
color: var(--wa-color-brand-on-quiet);
|
||||
}
|
||||
|
||||
:host([disabled]) .tab {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
:host([active]:not([disabled])) {
|
||||
outline: solid 1px transparent;
|
||||
outline-offset: -3px;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
tab_styles_default
|
||||
};
|
||||
65
chrome/static/wa/chunks/chunk.6CIAVEBC.js
Normal file
65
chrome/static/wa/chunks/chunk.6CIAVEBC.js
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/checkbox-group/checkbox-group.styles.ts
|
||||
var checkbox_group_styles_default = i`
|
||||
:host {
|
||||
--gap: 0.5em;
|
||||
|
||||
display: block;
|
||||
}
|
||||
|
||||
:host([orientation='horizontal']) {
|
||||
--gap: 1em;
|
||||
}
|
||||
|
||||
.form-control {
|
||||
position: relative;
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.label {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.checkbox-group-required .label::after {
|
||||
content: var(--wa-form-control-required-content);
|
||||
margin-inline-start: var(--wa-form-control-required-content-offset);
|
||||
}
|
||||
|
||||
/* The group of checkboxes */
|
||||
[part~='form-control-input'] {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* Keep items sized to their content so the clickable label doesn't span the full width */
|
||||
align-items: start;
|
||||
gap: var(--gap);
|
||||
margin-block-start: 0.5em;
|
||||
}
|
||||
|
||||
/* Horizontal */
|
||||
:host([orientation='horizontal']) [part~='form-control-input'] {
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* Hint */
|
||||
[part~='hint'] {
|
||||
margin-block-start: 0.5em;
|
||||
}
|
||||
|
||||
/* Hide the required asterisk on individual controls; the group's label carries the indicator instead. */
|
||||
::slotted(wa-checkbox[required]),
|
||||
::slotted(wa-switch[required]) {
|
||||
--wa-form-control-required-content: '';
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
checkbox_group_styles_default
|
||||
};
|
||||
32
chrome/static/wa/chunks/chunk.6FQNTW2R.js
Normal file
32
chrome/static/wa/chunks/chunk.6FQNTW2R.js
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaDialog
|
||||
} from "./chunk.MOCFCD22.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/dialog/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-dialog";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaDialog,
|
||||
react: React,
|
||||
events: {
|
||||
onWaShow: "wa-show",
|
||||
onWaAfterShow: "wa-after-show",
|
||||
onWaHide: "wa-hide",
|
||||
onWaAfterHide: "wa-after-hide"
|
||||
},
|
||||
displayName: "WaDialog"
|
||||
});
|
||||
var dialog_default = reactWrapper;
|
||||
|
||||
export {
|
||||
dialog_default
|
||||
};
|
||||
30
chrome/static/wa/chunks/chunk.6J5ZEH6X.js
Normal file
30
chrome/static/wa/chunks/chunk.6J5ZEH6X.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaCopyButton
|
||||
} from "./chunk.D7T5MUIJ.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/copy-button/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-copy-button";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaCopyButton,
|
||||
react: React,
|
||||
events: {
|
||||
onWaCopy: "wa-copy",
|
||||
onWaError: "wa-error"
|
||||
},
|
||||
displayName: "WaCopyButton"
|
||||
});
|
||||
var copy_button_default = reactWrapper;
|
||||
|
||||
export {
|
||||
copy_button_default
|
||||
};
|
||||
61
chrome/static/wa/chunks/chunk.6SNQOYNK.js
Normal file
61
chrome/static/wa/chunks/chunk.6SNQOYNK.js
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
|
||||
// src/components/carousel/autoplay-controller.ts
|
||||
var AutoplayController = class {
|
||||
constructor(host, tickCallback) {
|
||||
this.timerId = 0;
|
||||
this.activeInteractions = 0;
|
||||
this.paused = false;
|
||||
this.stopped = true;
|
||||
this.pause = () => {
|
||||
if (!this.activeInteractions++) {
|
||||
this.paused = true;
|
||||
this.host.requestUpdate();
|
||||
}
|
||||
};
|
||||
this.resume = () => {
|
||||
if (!--this.activeInteractions) {
|
||||
this.paused = false;
|
||||
this.host.requestUpdate();
|
||||
}
|
||||
};
|
||||
host.addController(this);
|
||||
this.host = host;
|
||||
this.tickCallback = tickCallback;
|
||||
}
|
||||
hostConnected() {
|
||||
this.host.addEventListener("mouseenter", this.pause);
|
||||
this.host.addEventListener("mouseleave", this.resume);
|
||||
this.host.addEventListener("focusin", this.pause);
|
||||
this.host.addEventListener("focusout", this.resume);
|
||||
this.host.addEventListener("touchstart", this.pause, { passive: true });
|
||||
this.host.addEventListener("touchend", this.resume);
|
||||
}
|
||||
hostDisconnected() {
|
||||
this.stop();
|
||||
this.host.removeEventListener("mouseenter", this.pause);
|
||||
this.host.removeEventListener("mouseleave", this.resume);
|
||||
this.host.removeEventListener("focusin", this.pause);
|
||||
this.host.removeEventListener("focusout", this.resume);
|
||||
this.host.removeEventListener("touchstart", this.pause);
|
||||
this.host.removeEventListener("touchend", this.resume);
|
||||
}
|
||||
start(interval) {
|
||||
this.stop();
|
||||
this.stopped = false;
|
||||
this.timerId = window.setInterval(() => {
|
||||
if (!this.paused) {
|
||||
this.tickCallback();
|
||||
}
|
||||
}, interval);
|
||||
}
|
||||
stop() {
|
||||
clearInterval(this.timerId);
|
||||
this.stopped = true;
|
||||
this.host.requestUpdate();
|
||||
}
|
||||
};
|
||||
|
||||
export {
|
||||
AutoplayController
|
||||
};
|
||||
37
chrome/static/wa/chunks/chunk.6TNHHCAM.js
Normal file
37
chrome/static/wa/chunks/chunk.6TNHHCAM.js
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
|
||||
// src/components/known-date/internal/parts.ts
|
||||
var EMPTY_PARTS = { day: "", month: "", year: "" };
|
||||
function isComplete(parts) {
|
||||
return parts.day !== "" && parts.month !== "" && parts.year !== "";
|
||||
}
|
||||
function isEmpty(parts) {
|
||||
return parts.day === "" && parts.month === "" && parts.year === "";
|
||||
}
|
||||
function partsToIso(parts) {
|
||||
if (!isComplete(parts)) return "";
|
||||
const year = Number(parts.year);
|
||||
const month = Number(parts.month);
|
||||
const day = Number(parts.day);
|
||||
if (!Number.isInteger(year) || year < 1 || year > 9999) return "";
|
||||
if (!Number.isInteger(month) || month < 1 || month > 12) return "";
|
||||
if (!Number.isInteger(day) || day < 1 || day > 31) return "";
|
||||
const date = new Date(2e3, month - 1, day);
|
||||
date.setFullYear(year);
|
||||
if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) return "";
|
||||
return `${String(year).padStart(4, "0")}-${String(month).padStart(2, "0")}-${String(day).padStart(2, "0")}`;
|
||||
}
|
||||
function isoToParts(iso) {
|
||||
if (!iso) return { ...EMPTY_PARTS };
|
||||
const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(iso);
|
||||
if (!match) return { ...EMPTY_PARTS };
|
||||
return { year: match[1], month: match[2], day: match[3] };
|
||||
}
|
||||
|
||||
export {
|
||||
EMPTY_PARTS,
|
||||
isComplete,
|
||||
isEmpty,
|
||||
partsToIso,
|
||||
isoToParts
|
||||
};
|
||||
15
chrome/static/wa/chunks/chunk.6VIHFQLB.js
Normal file
15
chrome/static/wa/chunks/chunk.6VIHFQLB.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/animation/animation.styles.ts
|
||||
var animation_styles_default = i`
|
||||
:host {
|
||||
display: contents;
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
animation_styles_default
|
||||
};
|
||||
274
chrome/static/wa/chunks/chunk.6VPDWW2I.js
Normal file
274
chrome/static/wa/chunks/chunk.6VPDWW2I.js
Normal file
|
|
@ -0,0 +1,274 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
|
||||
// src/components/time-input/internal/time-segments.ts
|
||||
var layoutCache = /* @__PURE__ */ new Map();
|
||||
function clearTimeSegmentLayoutCache() {
|
||||
layoutCache.clear();
|
||||
}
|
||||
function buildTimeSegmentLayout(locale, opts) {
|
||||
const key = `${locale || "en"}|${opts.hour12 ? 12 : 24}|${opts.withSeconds ? 1 : 0}`;
|
||||
const cached = layoutCache.get(key);
|
||||
if (cached) return cached;
|
||||
const formatter = new Intl.DateTimeFormat(locale || "en", {
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
second: opts.withSeconds ? "2-digit" : void 0,
|
||||
hour12: opts.hour12,
|
||||
calendar: "gregory",
|
||||
numberingSystem: "latn"
|
||||
});
|
||||
const probeDate = new Date(2026, 0, 1, 13, 45, 30);
|
||||
const parts = formatter.formatToParts(probeDate);
|
||||
const tokens = [];
|
||||
const order = [];
|
||||
for (const part of parts) {
|
||||
if (part.type === "hour") {
|
||||
tokens.push({ kind: "segment", field: "hour" });
|
||||
order.push("hour");
|
||||
} else if (part.type === "minute") {
|
||||
tokens.push({ kind: "segment", field: "minute" });
|
||||
order.push("minute");
|
||||
} else if (part.type === "second") {
|
||||
tokens.push({ kind: "segment", field: "second" });
|
||||
order.push("second");
|
||||
} else if (part.type === "dayPeriod") {
|
||||
tokens.push({ kind: "segment", field: "dayPeriod" });
|
||||
order.push("dayPeriod");
|
||||
} else if (part.type === "literal") {
|
||||
tokens.push({ kind: "literal", text: part.value });
|
||||
}
|
||||
}
|
||||
const expectedSegments = 2 + (opts.withSeconds ? 1 : 0) + (opts.hour12 ? 1 : 0);
|
||||
if (order.length !== expectedSegments) {
|
||||
const fallbackTokens = [
|
||||
{ kind: "segment", field: "hour" },
|
||||
{ kind: "literal", text: ":" },
|
||||
{ kind: "segment", field: "minute" }
|
||||
];
|
||||
const fallbackOrder = ["hour", "minute"];
|
||||
if (opts.withSeconds) {
|
||||
fallbackTokens.push({ kind: "literal", text: ":" });
|
||||
fallbackTokens.push({ kind: "segment", field: "second" });
|
||||
fallbackOrder.push("second");
|
||||
}
|
||||
if (opts.hour12) {
|
||||
fallbackTokens.push({ kind: "literal", text: " " });
|
||||
fallbackTokens.push({ kind: "segment", field: "dayPeriod" });
|
||||
fallbackOrder.push("dayPeriod");
|
||||
}
|
||||
const fallback = { tokens: fallbackTokens, order: fallbackOrder };
|
||||
layoutCache.set(key, fallback);
|
||||
return fallback;
|
||||
}
|
||||
const layout = { tokens, order };
|
||||
layoutCache.set(key, layout);
|
||||
return layout;
|
||||
}
|
||||
function resolveHour12(locale) {
|
||||
try {
|
||||
const probe = new Intl.DateTimeFormat(locale || "en", { hour: "numeric" });
|
||||
return probe.resolvedOptions().hour12 ?? false;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function formatDayPeriod(locale, period) {
|
||||
try {
|
||||
const formatter = new Intl.DateTimeFormat(locale || "en", { hour: "numeric", hour12: true });
|
||||
const date = new Date(2026, 0, 1, period === 0 ? 9 : 15);
|
||||
const parts = formatter.formatToParts(date);
|
||||
const dp = parts.find((p) => p.type === "dayPeriod");
|
||||
return dp?.value || (period === 0 ? "AM" : "PM");
|
||||
} catch {
|
||||
return period === 0 ? "AM" : "PM";
|
||||
}
|
||||
}
|
||||
function timeSegmentBounds(field, hour12) {
|
||||
if (field === "hour") return hour12 ? { min: 1, max: 12 } : { min: 0, max: 23 };
|
||||
if (field === "minute" || field === "second") return { min: 0, max: 59 };
|
||||
return { min: 0, max: 1 };
|
||||
}
|
||||
function stepTimeSegment(segments, field, delta, hour12, now = /* @__PURE__ */ new Date()) {
|
||||
const next = { ...segments };
|
||||
const current = segments[field];
|
||||
if (field === "dayPeriod") {
|
||||
const seed = current == null ? now.getHours() < 12 ? 0 : 1 : current;
|
||||
next.dayPeriod = seed === 0 ? 1 : 0;
|
||||
return next;
|
||||
}
|
||||
const { min, max } = timeSegmentBounds(field, hour12);
|
||||
if (current == null) {
|
||||
if (field === "hour") {
|
||||
const h24 = now.getHours();
|
||||
next.hour = hour12 ? h24 % 12 || 12 : h24;
|
||||
} else if (field === "minute") {
|
||||
next.minute = now.getMinutes();
|
||||
} else {
|
||||
next.second = now.getSeconds();
|
||||
}
|
||||
return next;
|
||||
}
|
||||
const span = max - min + 1;
|
||||
const stepped = ((current - min + delta) % span + span) % span + min;
|
||||
if (field === "hour") next.hour = stepped;
|
||||
else if (field === "minute") next.minute = stepped;
|
||||
else next.second = stepped;
|
||||
return next;
|
||||
}
|
||||
function typeTimeDigit(field, buffer, digit, hour12) {
|
||||
if (!/^[0-9]$/.test(digit)) return { value: bufferToValue(buffer), buffer, advance: false };
|
||||
if (field === "dayPeriod") return { value: bufferToValue(buffer), buffer, advance: false };
|
||||
if (field === "hour") {
|
||||
if (hour12) return typeNumericSegment(buffer, digit, 1, 12);
|
||||
return typeNumericSegment(buffer, digit, 0, 23);
|
||||
}
|
||||
return typeNumericSegment(buffer, digit, 0, 59);
|
||||
}
|
||||
function typeNumericSegment(buffer, digit, min, max) {
|
||||
const d = Number(digit);
|
||||
if (buffer === "") {
|
||||
if (d === 0 && min === 0) return { value: 0, buffer: "0", advance: false };
|
||||
if (d === 0) return { value: null, buffer: "0", advance: false };
|
||||
if (d * 10 > max) {
|
||||
return { value: clamp(d, min, max), buffer: "", advance: true };
|
||||
}
|
||||
return { value: d, buffer: digit, advance: false };
|
||||
}
|
||||
const combined = Number(buffer + digit);
|
||||
if (combined >= min && combined <= max) {
|
||||
return { value: combined, buffer: "", advance: true };
|
||||
}
|
||||
if (buffer === "0" && d === 0) {
|
||||
return { value: min === 0 ? 0 : null, buffer: "0", advance: false };
|
||||
}
|
||||
return typeNumericSegment("", digit, min, max);
|
||||
}
|
||||
function clamp(value, min, max) {
|
||||
return Math.min(max, Math.max(min, value));
|
||||
}
|
||||
function bufferToValue(buffer) {
|
||||
if (!buffer) return null;
|
||||
const n = Number(buffer);
|
||||
return Number.isFinite(n) ? n : null;
|
||||
}
|
||||
function dayPeriodFromKey(key) {
|
||||
if (key === "a" || key === "A") return 0;
|
||||
if (key === "p" || key === "P") return 1;
|
||||
return null;
|
||||
}
|
||||
function formatTimeSegmentText(field, value, buffer, placeholder, locale) {
|
||||
if (field === "dayPeriod") {
|
||||
if (value == null) return placeholder;
|
||||
return formatDayPeriod(locale, value);
|
||||
}
|
||||
if (buffer) return buffer.padStart(2, "0");
|
||||
if (value == null) return placeholder;
|
||||
return String(value).padStart(2, "0");
|
||||
}
|
||||
function isTimeComplete(segments, opts) {
|
||||
if (segments.hour == null || segments.minute == null) return false;
|
||||
if (opts.withSeconds && segments.second == null) return false;
|
||||
if (opts.hour12 && segments.dayPeriod == null) return false;
|
||||
return true;
|
||||
}
|
||||
function isTimeEmpty(segments) {
|
||||
return segments.hour == null && segments.minute == null && segments.second == null && segments.dayPeriod == null;
|
||||
}
|
||||
function timeSegmentsToWire(segments, opts) {
|
||||
if (!isTimeComplete(segments, opts)) return "";
|
||||
let h24 = segments.hour;
|
||||
if (opts.hour12) {
|
||||
const period = segments.dayPeriod;
|
||||
h24 = h24 === 12 ? period === 0 ? 0 : 12 : period === 1 ? h24 + 12 : h24;
|
||||
}
|
||||
if (h24 < 0 || h24 > 23) return "";
|
||||
const min = segments.minute;
|
||||
if (min < 0 || min > 59) return "";
|
||||
const hh = String(h24).padStart(2, "0");
|
||||
const mm = String(min).padStart(2, "0");
|
||||
if (!opts.withSeconds) return `${hh}:${mm}`;
|
||||
const sec = segments.second;
|
||||
if (sec < 0 || sec > 59) return "";
|
||||
const ss = String(sec).padStart(2, "0");
|
||||
return `${hh}:${mm}:${ss}`;
|
||||
}
|
||||
function wireToTimeSegments(wire, opts) {
|
||||
const empty = { hour: null, minute: null, second: null, dayPeriod: null };
|
||||
if (!wire) return empty;
|
||||
const match = /^(\d{1,2}):(\d{2})(?::(\d{2}(?:\.\d+)?))?$/.exec(wire);
|
||||
if (!match) return empty;
|
||||
const h24 = Number(match[1]);
|
||||
const min = Number(match[2]);
|
||||
const sec = match[3] != null ? Math.trunc(Number(match[3])) : null;
|
||||
if (!Number.isFinite(h24) || !Number.isFinite(min)) return empty;
|
||||
if (h24 < 0 || h24 > 23 || min < 0 || min > 59) return empty;
|
||||
if (sec != null && (sec < 0 || sec > 59)) return empty;
|
||||
let displayHour;
|
||||
let dayPeriod = null;
|
||||
if (opts.hour12) {
|
||||
dayPeriod = h24 >= 12 ? 1 : 0;
|
||||
displayHour = h24 % 12 || 12;
|
||||
} else {
|
||||
displayHour = h24;
|
||||
}
|
||||
return {
|
||||
hour: displayHour,
|
||||
minute: min,
|
||||
second: opts.withSeconds ? sec ?? 0 : null,
|
||||
dayPeriod: opts.hour12 ? dayPeriod : null
|
||||
};
|
||||
}
|
||||
function withSecondsForStep(step) {
|
||||
if (step === "any") return true;
|
||||
if (!Number.isFinite(step) || step <= 0) return false;
|
||||
return step < 60 || step % 60 !== 0;
|
||||
}
|
||||
function timeSegmentRules(opts) {
|
||||
const now = opts.now ?? (() => /* @__PURE__ */ new Date());
|
||||
return {
|
||||
typeDigit: (group, field, buffer, digit) => {
|
||||
const result = typeTimeDigit(field, buffer, digit, opts.hour12());
|
||||
const segments = opts.getSegments(group);
|
||||
const next = { ...segments, [field]: result.value };
|
||||
opts.setSegments(group, next);
|
||||
return result;
|
||||
},
|
||||
step: (group, field, delta) => {
|
||||
const next = stepTimeSegment(opts.getSegments(group), field, delta, opts.hour12(), now());
|
||||
opts.setSegments(group, next);
|
||||
return { value: next[field] };
|
||||
},
|
||||
bounds: (_g, field) => timeSegmentBounds(field, opts.hour12()),
|
||||
commitBuffer: (group, field, buffer) => {
|
||||
const value = bufferToValue(buffer);
|
||||
const segments = opts.getSegments(group);
|
||||
opts.setSegments(group, { ...segments, [field]: value });
|
||||
return value;
|
||||
},
|
||||
clear: (group, field) => {
|
||||
const segments = opts.getSegments(group);
|
||||
if (segments[field] == null) return false;
|
||||
opts.setSegments(group, { ...segments, [field]: null });
|
||||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export {
|
||||
clearTimeSegmentLayoutCache,
|
||||
buildTimeSegmentLayout,
|
||||
resolveHour12,
|
||||
formatDayPeriod,
|
||||
timeSegmentBounds,
|
||||
stepTimeSegment,
|
||||
typeTimeDigit,
|
||||
bufferToValue,
|
||||
dayPeriodFromKey,
|
||||
formatTimeSegmentText,
|
||||
isTimeComplete,
|
||||
isTimeEmpty,
|
||||
timeSegmentsToWire,
|
||||
wireToTimeSegments,
|
||||
withSecondsForStep,
|
||||
timeSegmentRules
|
||||
};
|
||||
30
chrome/static/wa/chunks/chunk.6ZVWWDQT.js
Normal file
30
chrome/static/wa/chunks/chunk.6ZVWWDQT.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/qr-code/qr-code.styles.ts
|
||||
var qr_code_styles_default = i`
|
||||
:host {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
aspect-ratio: 1;
|
||||
}
|
||||
|
||||
canvas {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
/* We force a near-instant transition so we can listen for transitionend when the color changes */
|
||||
transition: color 1ms;
|
||||
}
|
||||
|
||||
span {
|
||||
/* We force a near-instant transition so we can listen for transitionend when the color changes */
|
||||
transition: color 1ms;
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
qr_code_styles_default
|
||||
};
|
||||
94
chrome/static/wa/chunks/chunk.7HGYKBWW.js
Normal file
94
chrome/static/wa/chunks/chunk.7HGYKBWW.js
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
WaResizeEvent
|
||||
} from "./chunk.DP5YIFD7.js";
|
||||
import {
|
||||
resize_observer_styles_default
|
||||
} from "./chunk.FV2UJLMK.js";
|
||||
import {
|
||||
watch
|
||||
} from "./chunk.PZAN6FPN.js";
|
||||
import {
|
||||
WebAwesomeElement,
|
||||
n,
|
||||
t
|
||||
} from "./chunk.LBLI4KS5.js";
|
||||
import {
|
||||
o
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
import {
|
||||
x
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
import {
|
||||
__decorateClass
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/components/resize-observer/resize-observer.ts
|
||||
var WaResizeObserver = class extends WebAwesomeElement {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.observedElements = [];
|
||||
this.disabled = false;
|
||||
}
|
||||
connectedCallback() {
|
||||
super.connectedCallback();
|
||||
if (!o) {
|
||||
this.resizeObserver = new ResizeObserver((entries) => {
|
||||
this.dispatchEvent(new WaResizeEvent({ entries }));
|
||||
});
|
||||
if (!this.disabled) {
|
||||
this.updateComplete.then(() => {
|
||||
this.startObserver();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
disconnectedCallback() {
|
||||
super.disconnectedCallback();
|
||||
this.stopObserver();
|
||||
}
|
||||
handleSlotChange() {
|
||||
if (!this.disabled) {
|
||||
this.startObserver();
|
||||
}
|
||||
}
|
||||
startObserver() {
|
||||
const slot = this.shadowRoot.querySelector("slot");
|
||||
if (slot !== null) {
|
||||
const elements = slot.assignedElements({ flatten: true });
|
||||
this.observedElements.forEach((el) => this.resizeObserver.unobserve(el));
|
||||
this.observedElements = [];
|
||||
elements.forEach((el) => {
|
||||
this.resizeObserver.observe(el);
|
||||
this.observedElements.push(el);
|
||||
});
|
||||
}
|
||||
}
|
||||
stopObserver() {
|
||||
this.resizeObserver.disconnect();
|
||||
}
|
||||
handleDisabledChange() {
|
||||
if (this.disabled) {
|
||||
this.stopObserver();
|
||||
} else {
|
||||
this.startObserver();
|
||||
}
|
||||
}
|
||||
render() {
|
||||
return x` <slot @slotchange=${this.handleSlotChange}></slot> `;
|
||||
}
|
||||
};
|
||||
WaResizeObserver.css = resize_observer_styles_default;
|
||||
__decorateClass([
|
||||
n({ type: Boolean, reflect: true })
|
||||
], WaResizeObserver.prototype, "disabled", 2);
|
||||
__decorateClass([
|
||||
watch("disabled", { waitUntilFirstUpdate: true })
|
||||
], WaResizeObserver.prototype, "handleDisabledChange", 1);
|
||||
WaResizeObserver = __decorateClass([
|
||||
t("wa-resize-observer")
|
||||
], WaResizeObserver);
|
||||
|
||||
export {
|
||||
WaResizeObserver
|
||||
};
|
||||
29
chrome/static/wa/chunks/chunk.7QISORGK.js
Normal file
29
chrome/static/wa/chunks/chunk.7QISORGK.js
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaTag
|
||||
} from "./chunk.Z6LULOQL.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/tag/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-tag";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaTag,
|
||||
react: React,
|
||||
events: {
|
||||
onWaRemove: "wa-remove"
|
||||
},
|
||||
displayName: "WaTag"
|
||||
});
|
||||
var tag_default = reactWrapper;
|
||||
|
||||
export {
|
||||
tag_default
|
||||
};
|
||||
27
chrome/static/wa/chunks/chunk.7RXXO7LR.js
Normal file
27
chrome/static/wa/chunks/chunk.7RXXO7LR.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaZoomableFrame
|
||||
} from "./chunk.EUQGFY4Z.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/zoomable-frame/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-zoomable-frame";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaZoomableFrame,
|
||||
react: React,
|
||||
events: {},
|
||||
displayName: "WaZoomableFrame"
|
||||
});
|
||||
var zoomable_frame_default = reactWrapper;
|
||||
|
||||
export {
|
||||
zoomable_frame_default
|
||||
};
|
||||
32
chrome/static/wa/chunks/chunk.7ZCFTSGG.js
Normal file
32
chrome/static/wa/chunks/chunk.7ZCFTSGG.js
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaTooltip
|
||||
} from "./chunk.UVIXNJVD.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/tooltip/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-tooltip";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaTooltip,
|
||||
react: React,
|
||||
events: {
|
||||
onWaShow: "wa-show",
|
||||
onWaAfterShow: "wa-after-show",
|
||||
onWaHide: "wa-hide",
|
||||
onWaAfterHide: "wa-after-hide"
|
||||
},
|
||||
displayName: "WaTooltip"
|
||||
});
|
||||
var tooltip_default = reactWrapper;
|
||||
|
||||
export {
|
||||
tooltip_default
|
||||
};
|
||||
209
chrome/static/wa/chunks/chunk.A5622CLY.js
Normal file
209
chrome/static/wa/chunks/chunk.A5622CLY.js
Normal file
|
|
@ -0,0 +1,209 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
step_styles_default
|
||||
} from "./chunk.IYKD6SDL.js";
|
||||
import {
|
||||
visually_hidden_styles_default
|
||||
} from "./chunk.UK2M7WPO.js";
|
||||
import {
|
||||
HasSlotController
|
||||
} from "./chunk.RWNXKUCF.js";
|
||||
import {
|
||||
variants_styles_default
|
||||
} from "./chunk.K5Q2EBKV.js";
|
||||
import {
|
||||
e
|
||||
} from "./chunk.KWDPKKFO.js";
|
||||
import {
|
||||
watch
|
||||
} from "./chunk.PZAN6FPN.js";
|
||||
import {
|
||||
WebAwesomeElement,
|
||||
n,
|
||||
r,
|
||||
t
|
||||
} from "./chunk.LBLI4KS5.js";
|
||||
import {
|
||||
LocalizeController
|
||||
} from "./chunk.DL7HG4WM.js";
|
||||
import {
|
||||
E,
|
||||
x
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
import {
|
||||
__decorateClass
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/components/step/step.ts
|
||||
var WaStep = class extends WebAwesomeElement {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.localize = new LocalizeController(this);
|
||||
this.hasSlotController = new HasSlotController(this, "description");
|
||||
this.name = "";
|
||||
this.completed = false;
|
||||
this.loading = false;
|
||||
this.disabled = false;
|
||||
this.variant = "brand";
|
||||
this.attention = "none";
|
||||
this.withDescription = false;
|
||||
this.position = 0;
|
||||
this.active = false;
|
||||
this.clickable = false;
|
||||
this.locked = false;
|
||||
this.role = "listitem";
|
||||
}
|
||||
handleCompletedChange() {
|
||||
this.customStates.set("completed", this.completed);
|
||||
}
|
||||
handleLoadingChange() {
|
||||
this.customStates.set("loading", this.loading);
|
||||
this.setAttribute("aria-busy", this.loading ? "true" : "false");
|
||||
}
|
||||
handleDisabledChange() {
|
||||
this.customStates.set("disabled", this.disabled);
|
||||
}
|
||||
handleActiveChange() {
|
||||
this.customStates.set("active", this.active);
|
||||
this.syncAriaCurrent();
|
||||
}
|
||||
handleLockedChange() {
|
||||
this.customStates.set("locked", this.locked);
|
||||
}
|
||||
// aria-current belongs on whichever element actually receives focus: the inner <button> when the step is
|
||||
// clickable, the host (a plain listitem) otherwise.
|
||||
syncAriaCurrent() {
|
||||
if (this.active && !this.clickable) {
|
||||
this.setAttribute("aria-current", "step");
|
||||
} else {
|
||||
this.removeAttribute("aria-current");
|
||||
}
|
||||
}
|
||||
getStatusText() {
|
||||
if (this.completed) return this.localize.term("completed");
|
||||
if (this.disabled) return this.localize.term("disabled");
|
||||
if (this.locked) return this.localize.term("locked");
|
||||
if (this.active) return "";
|
||||
return this.localize.term("notCompleted");
|
||||
}
|
||||
handleClickableChange() {
|
||||
this.customStates.set("clickable", this.clickable);
|
||||
this.syncAriaCurrent();
|
||||
}
|
||||
renderIcon() {
|
||||
if (this.loading) {
|
||||
return x`<wa-spinner part="spinner"></wa-spinner>`;
|
||||
}
|
||||
if (this.completed) {
|
||||
return x`<wa-icon name="check" library="system" variant="solid"></wa-icon>`;
|
||||
}
|
||||
return this.position > 0 ? this.localize.number(this.position) : E;
|
||||
}
|
||||
render() {
|
||||
const hasDescription = this.hasSlotController.test("description", "withDescription");
|
||||
const body = x`
|
||||
<span part="marker" class="marker">
|
||||
<slot name="icon">${this.renderIcon()}</slot>
|
||||
</span>
|
||||
<span part="content" class="content">
|
||||
<span part="label" class="label">
|
||||
<slot></slot>
|
||||
</span>
|
||||
<span part="status" class="wa-visually-hidden">${this.getStatusText()}</span>
|
||||
<span part="description" class="description" ?hidden=${!hasDescription}>
|
||||
<slot name="description"></slot>
|
||||
</span>
|
||||
</span>
|
||||
`;
|
||||
return x`
|
||||
<div part="step" class="step">
|
||||
<span
|
||||
part="connector"
|
||||
class=${e({
|
||||
"connector-start": true,
|
||||
[`wa-${this.connectorStartVariant}`]: !!this.connectorStartVariant
|
||||
})}
|
||||
?data-completed=${!!this.connectorStartVariant}
|
||||
></span>
|
||||
<span part="connector" class="connector-end"></span>
|
||||
${this.clickable ? x`
|
||||
<button
|
||||
part="button"
|
||||
class="body"
|
||||
type="button"
|
||||
?disabled=${this.disabled || this.locked}
|
||||
aria-current=${this.active ? "step" : E}
|
||||
>
|
||||
${body}
|
||||
</button>
|
||||
` : x`<div class="body">${body}</div>`}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
};
|
||||
WaStep.css = [variants_styles_default, visually_hidden_styles_default, step_styles_default];
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaStep.prototype, "name", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean, reflect: true })
|
||||
], WaStep.prototype, "completed", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean, reflect: true })
|
||||
], WaStep.prototype, "loading", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean, reflect: true })
|
||||
], WaStep.prototype, "disabled", 2);
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaStep.prototype, "variant", 2);
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaStep.prototype, "attention", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean, attribute: "with-description" })
|
||||
], WaStep.prototype, "withDescription", 2);
|
||||
__decorateClass([
|
||||
r()
|
||||
], WaStep.prototype, "position", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean, reflect: true })
|
||||
], WaStep.prototype, "active", 2);
|
||||
__decorateClass([
|
||||
r()
|
||||
], WaStep.prototype, "clickable", 2);
|
||||
__decorateClass([
|
||||
r()
|
||||
], WaStep.prototype, "locked", 2);
|
||||
__decorateClass([
|
||||
r()
|
||||
], WaStep.prototype, "connectorStartVariant", 2);
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaStep.prototype, "role", 2);
|
||||
__decorateClass([
|
||||
watch("completed")
|
||||
], WaStep.prototype, "handleCompletedChange", 1);
|
||||
__decorateClass([
|
||||
watch("loading")
|
||||
], WaStep.prototype, "handleLoadingChange", 1);
|
||||
__decorateClass([
|
||||
watch("disabled")
|
||||
], WaStep.prototype, "handleDisabledChange", 1);
|
||||
__decorateClass([
|
||||
watch("active")
|
||||
], WaStep.prototype, "handleActiveChange", 1);
|
||||
__decorateClass([
|
||||
watch("locked")
|
||||
], WaStep.prototype, "handleLockedChange", 1);
|
||||
__decorateClass([
|
||||
watch("clickable")
|
||||
], WaStep.prototype, "handleClickableChange", 1);
|
||||
WaStep = __decorateClass([
|
||||
t("wa-step")
|
||||
], WaStep);
|
||||
WaStep.disableWarning?.("change-in-update");
|
||||
|
||||
export {
|
||||
WaStep
|
||||
};
|
||||
27
chrome/static/wa/chunks/chunk.A6PE4UC7.js
Normal file
27
chrome/static/wa/chunks/chunk.A6PE4UC7.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaFormatBytes
|
||||
} from "./chunk.KO4RVYVT.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/format-bytes/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-format-bytes";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaFormatBytes,
|
||||
react: React,
|
||||
events: {},
|
||||
displayName: "WaFormatBytes"
|
||||
});
|
||||
var format_bytes_default = reactWrapper;
|
||||
|
||||
export {
|
||||
format_bytes_default
|
||||
};
|
||||
32
chrome/static/wa/chunks/chunk.AAHO5GAS.js
Normal file
32
chrome/static/wa/chunks/chunk.AAHO5GAS.js
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaAccordion
|
||||
} from "./chunk.AP3JK77D.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/accordion/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-accordion";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaAccordion,
|
||||
react: React,
|
||||
events: {
|
||||
onWaExpand: "wa-expand",
|
||||
onWaAfterExpand: "wa-after-expand",
|
||||
onWaCollapse: "wa-collapse",
|
||||
onWaAfterCollapse: "wa-after-collapse"
|
||||
},
|
||||
displayName: "WaAccordion"
|
||||
});
|
||||
var accordion_default = reactWrapper;
|
||||
|
||||
export {
|
||||
accordion_default
|
||||
};
|
||||
15
chrome/static/wa/chunks/chunk.AB2K5S2N.js
Normal file
15
chrome/static/wa/chunks/chunk.AB2K5S2N.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/markdown/markdown.styles.ts
|
||||
var markdown_styles_default = i`
|
||||
:host {
|
||||
display: contents;
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
markdown_styles_default
|
||||
};
|
||||
12
chrome/static/wa/chunks/chunk.AG44H7MD.js
Normal file
12
chrome/static/wa/chunks/chunk.AG44H7MD.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
|
||||
// src/events/after-collapse.ts
|
||||
var WaAfterCollapseEvent = class extends Event {
|
||||
constructor() {
|
||||
super("wa-after-collapse", { bubbles: true, cancelable: false, composed: true });
|
||||
}
|
||||
};
|
||||
|
||||
export {
|
||||
WaAfterCollapseEvent
|
||||
};
|
||||
29
chrome/static/wa/chunks/chunk.AJQ3S5VI.js
Normal file
29
chrome/static/wa/chunks/chunk.AJQ3S5VI.js
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaRadioGroup
|
||||
} from "./chunk.IX2GQ2J6.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/radio-group/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-radio-group";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaRadioGroup,
|
||||
react: React,
|
||||
events: {
|
||||
onWaInvalid: "wa-invalid"
|
||||
},
|
||||
displayName: "WaRadioGroup"
|
||||
});
|
||||
var radio_group_default = reactWrapper;
|
||||
|
||||
export {
|
||||
radio_group_default
|
||||
};
|
||||
147
chrome/static/wa/chunks/chunk.AOZFN6E7.js
Normal file
147
chrome/static/wa/chunks/chunk.AOZFN6E7.js
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.JJKKSYRO.js";
|
||||
import {
|
||||
t
|
||||
} from "./chunk.H23DVATU.js";
|
||||
import {
|
||||
e,
|
||||
f,
|
||||
i as i2,
|
||||
l
|
||||
} from "./chunk.EFUXUR2V.js";
|
||||
import {
|
||||
B,
|
||||
T
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
|
||||
// node_modules/@lit-labs/ssr-client/lib/hydrate-lit-html.js
|
||||
var { TemplateInstance: l2, isIterable: s, resolveDirective: d, ChildPart: c, ElementPart: p } = i;
|
||||
var f2 = (e2, t2, r = {}) => {
|
||||
if (void 0 !== t2._$litPart$) throw Error("container already contains a live render");
|
||||
let n, o, i3;
|
||||
const a = [], l3 = document.createTreeWalker(t2, NodeFilter.SHOW_COMMENT);
|
||||
let s2;
|
||||
for (; null !== (s2 = l3.nextNode()); ) {
|
||||
const t3 = s2.data;
|
||||
if (t3.startsWith("lit-part")) {
|
||||
if (0 === a.length && void 0 !== n) throw Error(`There must be only one root part per container. Found a part marker (${s2}) when we already have a root part marker (${o})`);
|
||||
i3 = m(e2, s2, a, r), void 0 === n && (n = i3), o ?? (o = s2);
|
||||
} else if (t3.startsWith("lit-node")) h(s2, a, r);
|
||||
else if (t3.startsWith("/lit-part")) {
|
||||
if (1 === a.length && i3 !== n) throw Error("internal error");
|
||||
i3 = u(s2, i3, a);
|
||||
}
|
||||
}
|
||||
if (void 0 === n) {
|
||||
const e3 = t2 instanceof ShadowRoot ? "{container.host.localName}'s shadow root" : t2 instanceof DocumentFragment ? "DocumentFragment" : t2.localName;
|
||||
console.error(`There should be exactly one root part in a render container, but we didn't find any in ${e3}.`);
|
||||
}
|
||||
t2._$litPart$ = n;
|
||||
};
|
||||
var m = (t2, r, a, p2) => {
|
||||
let f3, m2;
|
||||
if (0 === a.length) m2 = new c(r, null, void 0, p2), f3 = t2;
|
||||
else {
|
||||
const e2 = a[a.length - 1];
|
||||
if ("template-instance" === e2.type) m2 = new c(r, null, e2.instance, p2), e2.instance._$AV.push(m2), f3 = e2.result.values[e2.instancePartIndex++], e2.templatePartIndex++;
|
||||
else if ("iterable" === e2.type) {
|
||||
m2 = new c(r, null, e2.part, p2);
|
||||
const t3 = e2.iterator.next();
|
||||
if (t3.done) throw f3 = void 0, e2.done = true, Error("Unhandled shorter than expected iterable");
|
||||
f3 = t3.value, e2.part._$AH.push(m2);
|
||||
} else m2 = new c(r, null, e2.part, p2);
|
||||
}
|
||||
if (f3 = d(m2, f3), f3 === T) a.push({ part: m2, type: "leaf" });
|
||||
else if (i2(f3)) a.push({ part: m2, type: "leaf" }), m2._$AH = f3;
|
||||
else if (e(f3)) {
|
||||
if (l(f3)) throw Error("compiled templates are not supported");
|
||||
const e2 = "lit-part " + v(f3);
|
||||
if (r.data !== e2) throw Error("Hydration value mismatch: Unexpected TemplateResult rendered to part");
|
||||
{
|
||||
const e3 = c.prototype._$AC(f3), t3 = new l2(e3, m2);
|
||||
a.push({ type: "template-instance", instance: t3, part: m2, templatePartIndex: 0, instancePartIndex: 0, result: f3 }), m2._$AH = t3;
|
||||
}
|
||||
} else s(f3) ? (a.push({ part: m2, type: "iterable", value: f3, iterator: f3[Symbol.iterator](), done: false }), m2._$AH = []) : (a.push({ part: m2, type: "leaf" }), m2._$AH = f3 ?? "");
|
||||
return m2;
|
||||
};
|
||||
var u = (e2, t2, r) => {
|
||||
if (void 0 === t2) throw Error("unbalanced part marker");
|
||||
t2._$AB = e2;
|
||||
const n = r.pop();
|
||||
if ("iterable" === n.type && !n.iterator.next().done) throw Error("unexpected longer than expected iterable");
|
||||
if (r.length > 0) return r[r.length - 1].part;
|
||||
};
|
||||
var h = (e2, t2, n) => {
|
||||
const o = /lit-node (\d+)/.exec(e2.data), i3 = parseInt(o[1]), l3 = e2.nextElementSibling;
|
||||
if (null === l3) throw Error("could not find node for attribute parts");
|
||||
l3.removeAttribute("defer-hydration");
|
||||
const s2 = t2[t2.length - 1];
|
||||
if ("template-instance" !== s2.type) throw Error("Hydration value mismatch: Primitive found where TemplateResult expected. This usually occurs due to conditional rendering that resulted in a different value or template being rendered between the server and client.");
|
||||
{
|
||||
const e3 = s2.instance;
|
||||
for (; ; ) {
|
||||
const t3 = e3._$AD.parts[s2.templatePartIndex];
|
||||
if (void 0 === t3 || t3.type !== t.ATTRIBUTE && t3.type !== t.ELEMENT || t3.index !== i3) break;
|
||||
if (t3.type === t.ATTRIBUTE) {
|
||||
const o2 = new t3.ctor(l3, t3.name, t3.strings, s2.instance, n), i4 = f(o2) ? s2.result.values[s2.instancePartIndex] : s2.result.values, d2 = !(o2.type === t.EVENT || o2.type === t.PROPERTY);
|
||||
o2._$AI(i4, o2, s2.instancePartIndex, d2), s2.instancePartIndex += t3.strings.length - 1, e3._$AV.push(o2);
|
||||
} else {
|
||||
const t4 = new p(l3, s2.instance, n);
|
||||
d(t4, s2.result.values[s2.instancePartIndex++]), e3._$AV.push(t4);
|
||||
}
|
||||
s2.templatePartIndex++;
|
||||
}
|
||||
}
|
||||
};
|
||||
var w = /* @__PURE__ */ new WeakMap();
|
||||
var v = (e2) => {
|
||||
let t2 = w.get(e2.strings);
|
||||
if (void 0 !== t2) return t2;
|
||||
const r = new Uint32Array(2).fill(5381);
|
||||
for (const t3 of e2.strings) for (let e3 = 0; e3 < t3.length; e3++) r[e3 % 2] = 33 * r[e3 % 2] ^ t3.charCodeAt(e3);
|
||||
const n = String.fromCharCode(...new Uint8Array(r.buffer));
|
||||
return t2 = btoa(n), w.set(e2.strings, t2), t2;
|
||||
};
|
||||
|
||||
// node_modules/@lit-labs/ssr-client/lit-element-hydrate-support.js
|
||||
globalThis.litElementHydrateSupport = ({ LitElement: s2 }) => {
|
||||
const h2 = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(s2), "observedAttributes").get;
|
||||
Object.defineProperty(s2, "observedAttributes", { get() {
|
||||
return [...h2.call(this), "defer-hydration"];
|
||||
} });
|
||||
const e2 = s2.prototype.attributeChangedCallback;
|
||||
s2.prototype.attributeChangedCallback = function(t2, i3, s3) {
|
||||
"defer-hydration" === t2 && null === s3 && n.call(this), e2.call(this, t2, i3, s3);
|
||||
};
|
||||
const n = s2.prototype.connectedCallback;
|
||||
s2.prototype.connectedCallback = function() {
|
||||
this.hasAttribute("defer-hydration") || n.call(this);
|
||||
};
|
||||
const o = s2.prototype.createRenderRoot;
|
||||
s2.prototype.createRenderRoot = function() {
|
||||
return this.shadowRoot ? (this._$AG = true, this.shadowRoot) : o.call(this);
|
||||
};
|
||||
const r = Object.getPrototypeOf(s2.prototype).update;
|
||||
s2.prototype.update = function(s3) {
|
||||
const h3 = this.render();
|
||||
if (r.call(this, s3), this._$AG) {
|
||||
this._$AG = false;
|
||||
for (const t2 of this.getAttributeNames()) if (t2.startsWith("hydrate-internals-")) {
|
||||
const i3 = t2.slice(18);
|
||||
this.removeAttribute(i3), this.removeAttribute(t2);
|
||||
}
|
||||
f2(h3, this.renderRoot, this.renderOptions);
|
||||
} else B(h3, this.renderRoot, this.renderOptions);
|
||||
};
|
||||
};
|
||||
/*! Bundled license information:
|
||||
|
||||
@lit-labs/ssr-client/lib/hydrate-lit-html.js:
|
||||
(**
|
||||
* @license
|
||||
* Copyright 2019 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*)
|
||||
*/
|
||||
184
chrome/static/wa/chunks/chunk.AP3JK77D.js
Normal file
184
chrome/static/wa/chunks/chunk.AP3JK77D.js
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
WaAccordionAfterCollapseEvent
|
||||
} from "./chunk.VO4OKF3D.js";
|
||||
import {
|
||||
WaAccordionAfterExpandEvent
|
||||
} from "./chunk.MF234WAF.js";
|
||||
import {
|
||||
WaAccordionCollapseEvent
|
||||
} from "./chunk.T6GGTYHD.js";
|
||||
import {
|
||||
WaAccordionExpandEvent
|
||||
} from "./chunk.ZZPJSMJ4.js";
|
||||
import {
|
||||
accordion_styles_default
|
||||
} from "./chunk.BUCKADPY.js";
|
||||
import {
|
||||
watch
|
||||
} from "./chunk.PZAN6FPN.js";
|
||||
import {
|
||||
WebAwesomeElement,
|
||||
e,
|
||||
n,
|
||||
t
|
||||
} from "./chunk.LBLI4KS5.js";
|
||||
import {
|
||||
x
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
import {
|
||||
__decorateClass
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/components/accordion/accordion.ts
|
||||
var WaAccordion = class extends WebAwesomeElement {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.mode = "multiple";
|
||||
this.iconPlacement = "end";
|
||||
this.headingLevel = "3";
|
||||
this.appearance = "outlined";
|
||||
}
|
||||
getAllItems() {
|
||||
return this.defaultSlot.assignedElements({ flatten: true }).filter((el) => el.tagName.toLowerCase() === "wa-accordion-item");
|
||||
}
|
||||
getFocusableItems() {
|
||||
return this.getAllItems().filter((item) => !item.disabled);
|
||||
}
|
||||
ownsItem(item) {
|
||||
return item.closest("wa-accordion") === this;
|
||||
}
|
||||
handleSlotChange() {
|
||||
if (this.didSSR) {
|
||||
const promises = [];
|
||||
this.getAllItems().forEach((item) => {
|
||||
if (item.didSSR && !item.hasUpdated) {
|
||||
promises.push(item.updateComplete);
|
||||
}
|
||||
});
|
||||
if (promises.length > 0) {
|
||||
Promise.allSettled(promises).then(() => {
|
||||
this.handleSlotChange();
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.syncIconPlacement();
|
||||
this.syncHeadingLevel();
|
||||
this.syncAppearance();
|
||||
}
|
||||
handleKeyDown(event) {
|
||||
const items = this.getFocusableItems();
|
||||
if (!items.length) return;
|
||||
const path = event.composedPath();
|
||||
const closestItem = path.find(
|
||||
(el) => el instanceof Element && el.tagName.toLowerCase() === "wa-accordion-item"
|
||||
);
|
||||
if (!closestItem || !this.ownsItem(closestItem)) return;
|
||||
const currentIndex = items.findIndex((item) => item === closestItem);
|
||||
let nextIndex = currentIndex;
|
||||
switch (event.key) {
|
||||
case "ArrowDown":
|
||||
event.preventDefault();
|
||||
nextIndex = (currentIndex + 1) % items.length;
|
||||
break;
|
||||
case "ArrowUp":
|
||||
event.preventDefault();
|
||||
nextIndex = (currentIndex - 1 + items.length) % items.length;
|
||||
break;
|
||||
case "Home":
|
||||
event.preventDefault();
|
||||
nextIndex = 0;
|
||||
break;
|
||||
case "End":
|
||||
event.preventDefault();
|
||||
nextIndex = items.length - 1;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
items[nextIndex].focus();
|
||||
}
|
||||
syncIconPlacement() {
|
||||
this.getAllItems().forEach((item) => item.iconPlacement = this.iconPlacement);
|
||||
}
|
||||
syncHeadingLevel() {
|
||||
this.getAllItems().forEach((item) => item.headingLevel = this.headingLevel);
|
||||
}
|
||||
syncAppearance() {
|
||||
this.getAllItems().forEach((item) => item.appearance = this.appearance);
|
||||
}
|
||||
async handleItemTrigger(event) {
|
||||
const { item } = event.detail;
|
||||
if (!this.ownsItem(item)) return;
|
||||
event.stopPropagation();
|
||||
if (item.disabled) return;
|
||||
if (item.expanded) {
|
||||
if (this.mode === "single") return;
|
||||
const waCollapse = new WaAccordionCollapseEvent({ item });
|
||||
this.dispatchEvent(waCollapse);
|
||||
if (waCollapse.defaultPrevented) return;
|
||||
await item.collapse();
|
||||
this.dispatchEvent(new WaAccordionAfterCollapseEvent({ item }));
|
||||
} else {
|
||||
if (this.mode === "single" || this.mode === "single-collapsible") {
|
||||
this.getAllItems().filter((i) => i !== item && i.expanded).forEach((i) => i.collapse());
|
||||
}
|
||||
const waExpand = new WaAccordionExpandEvent({ item });
|
||||
this.dispatchEvent(waExpand);
|
||||
if (waExpand.defaultPrevented) return;
|
||||
await item.expand();
|
||||
this.dispatchEvent(new WaAccordionAfterExpandEvent({ item }));
|
||||
}
|
||||
}
|
||||
/** Expands all accordion items. No-op when `mode` is `single` or `single-collapsible`. */
|
||||
expandAll() {
|
||||
if (this.mode === "single" || this.mode === "single-collapsible") return;
|
||||
this.getAllItems().filter((item) => !item.disabled && !item.expanded).forEach((item) => item.expand());
|
||||
}
|
||||
/** Collapses all accordion items. */
|
||||
collapseAll() {
|
||||
this.getAllItems().filter((item) => item.expanded).forEach((item) => item.collapse());
|
||||
}
|
||||
render() {
|
||||
return x`
|
||||
<slot
|
||||
@slotchange=${this.handleSlotChange}
|
||||
@wa-accordion-item-trigger=${this.handleItemTrigger}
|
||||
@keydown=${this.handleKeyDown}
|
||||
></slot>
|
||||
`;
|
||||
}
|
||||
};
|
||||
WaAccordion.css = accordion_styles_default;
|
||||
__decorateClass([
|
||||
e("slot")
|
||||
], WaAccordion.prototype, "defaultSlot", 2);
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaAccordion.prototype, "mode", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "icon-placement", reflect: true })
|
||||
], WaAccordion.prototype, "iconPlacement", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "heading-level", reflect: true })
|
||||
], WaAccordion.prototype, "headingLevel", 2);
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaAccordion.prototype, "appearance", 2);
|
||||
__decorateClass([
|
||||
watch("iconPlacement", { waitUntilFirstUpdate: true })
|
||||
], WaAccordion.prototype, "syncIconPlacement", 1);
|
||||
__decorateClass([
|
||||
watch("headingLevel", { waitUntilFirstUpdate: true })
|
||||
], WaAccordion.prototype, "syncHeadingLevel", 1);
|
||||
__decorateClass([
|
||||
watch("appearance", { waitUntilFirstUpdate: true })
|
||||
], WaAccordion.prototype, "syncAppearance", 1);
|
||||
WaAccordion = __decorateClass([
|
||||
t("wa-accordion")
|
||||
], WaAccordion);
|
||||
|
||||
export {
|
||||
WaAccordion
|
||||
};
|
||||
33
chrome/static/wa/chunks/chunk.AQZVKFHG.js
Normal file
33
chrome/static/wa/chunks/chunk.AQZVKFHG.js
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
carousel_item_styles_default
|
||||
} from "./chunk.B6O732C7.js";
|
||||
import {
|
||||
WebAwesomeElement,
|
||||
t
|
||||
} from "./chunk.LBLI4KS5.js";
|
||||
import {
|
||||
x
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
import {
|
||||
__decorateClass
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/components/carousel-item/carousel-item.ts
|
||||
var WaCarouselItem = class extends WebAwesomeElement {
|
||||
connectedCallback() {
|
||||
super.connectedCallback();
|
||||
this.setAttribute("role", "group");
|
||||
}
|
||||
render() {
|
||||
return x` <slot></slot> `;
|
||||
}
|
||||
};
|
||||
WaCarouselItem.css = carousel_item_styles_default;
|
||||
WaCarouselItem = __decorateClass([
|
||||
t("wa-carousel-item")
|
||||
], WaCarouselItem);
|
||||
|
||||
export {
|
||||
WaCarouselItem
|
||||
};
|
||||
235
chrome/static/wa/chunks/chunk.ASU4ZOK4.js
Normal file
235
chrome/static/wa/chunks/chunk.ASU4ZOK4.js
Normal file
|
|
@ -0,0 +1,235 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
option_styles_default
|
||||
} from "./chunk.IHXCBN37.js";
|
||||
import {
|
||||
WebAwesomeElement,
|
||||
e,
|
||||
n,
|
||||
r,
|
||||
t
|
||||
} from "./chunk.LBLI4KS5.js";
|
||||
import {
|
||||
LocalizeController
|
||||
} from "./chunk.DL7HG4WM.js";
|
||||
import {
|
||||
E,
|
||||
x
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
import {
|
||||
__decorateClass
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/internal/get-text.ts
|
||||
function getText(root, depth = 0) {
|
||||
if (!root || !globalThis.Node) {
|
||||
return "";
|
||||
}
|
||||
if (typeof root[Symbol.iterator] === "function") {
|
||||
let nodes = Array.isArray(root) ? root : [...root];
|
||||
return nodes.map((node2) => getText(node2, --depth)).join("");
|
||||
}
|
||||
let node = root;
|
||||
if (node.nodeType === Node.TEXT_NODE) {
|
||||
return node.textContent ?? "";
|
||||
}
|
||||
if (node.nodeType === Node.ELEMENT_NODE) {
|
||||
let element = node;
|
||||
if (element.hasAttribute("slot") || element.matches("style, script")) {
|
||||
return "";
|
||||
}
|
||||
if (element instanceof HTMLSlotElement) {
|
||||
let assignedNodes = element.assignedNodes({ flatten: true });
|
||||
if (assignedNodes.length > 0) {
|
||||
return getText(assignedNodes, --depth);
|
||||
}
|
||||
}
|
||||
return depth > -1 ? getText(element, --depth) : element.textContent ?? "";
|
||||
}
|
||||
return node.hasChildNodes() ? getText(node.childNodes, --depth) : "";
|
||||
}
|
||||
|
||||
// src/components/option/option.ts
|
||||
var WaOption = class extends WebAwesomeElement {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
// @ts-expect-error - Controller is currently unused
|
||||
this.localize = new LocalizeController(this);
|
||||
this.cachedDefaultLabel = "";
|
||||
this.isInitialized = false;
|
||||
this.isDefaultLabelDirty = true;
|
||||
this.current = false;
|
||||
this.value = "";
|
||||
this.disabled = false;
|
||||
this.selected = false;
|
||||
this.defaultSelected = false;
|
||||
this._label = "";
|
||||
this.handleHover = (event) => {
|
||||
if (event.type === "mouseenter") {
|
||||
this.customStates.set("hover", true);
|
||||
} else if (event.type === "mouseleave") {
|
||||
this.customStates.set("hover", false);
|
||||
}
|
||||
};
|
||||
}
|
||||
set label(value) {
|
||||
const oldValue = this._label;
|
||||
this._label = value || "";
|
||||
if (this._label !== oldValue) {
|
||||
this.requestUpdate("label", oldValue);
|
||||
}
|
||||
}
|
||||
get label() {
|
||||
if (this._label) {
|
||||
return this._label;
|
||||
}
|
||||
return this.defaultLabel;
|
||||
}
|
||||
/** The default label, generated from the element contents. Will be equal to `label` in most cases. */
|
||||
get defaultLabel() {
|
||||
if (this.isDefaultLabelDirty || !this.cachedDefaultLabel) {
|
||||
this.updateDefaultLabel();
|
||||
}
|
||||
return this.cachedDefaultLabel;
|
||||
}
|
||||
connectedCallback() {
|
||||
super.connectedCallback();
|
||||
this.setAttribute("role", "option");
|
||||
this.setAttribute("aria-selected", "false");
|
||||
this.addEventListener("mouseenter", this.handleHover);
|
||||
this.addEventListener("mouseleave", this.handleHover);
|
||||
}
|
||||
disconnectedCallback() {
|
||||
super.disconnectedCallback();
|
||||
this.removeEventListener("mouseenter", this.handleHover);
|
||||
this.removeEventListener("mouseleave", this.handleHover);
|
||||
}
|
||||
handleDefaultSlotChange() {
|
||||
this.isDefaultLabelDirty = true;
|
||||
if (!this.isInitialized) {
|
||||
this.isInitialized = true;
|
||||
return;
|
||||
}
|
||||
const controller = this.closest("wa-select, wa-combobox");
|
||||
if (controller) {
|
||||
customElements.whenDefined(controller.localName).then(() => controller.handleDefaultSlotChange?.());
|
||||
}
|
||||
}
|
||||
willUpdate(changedProperties) {
|
||||
if (changedProperties.has("defaultSelected")) {
|
||||
if (this.didSSR && this.hasUpdated || !this.didSSR) {
|
||||
this.syncDefaultSelected();
|
||||
}
|
||||
}
|
||||
super.willUpdate(changedProperties);
|
||||
}
|
||||
syncDefaultSelected() {
|
||||
if ("closest" in this) {
|
||||
if (!this.closest("wa-combobox, wa-select")?.hasInteracted) {
|
||||
if (this.defaultSelected) {
|
||||
const oldVal = this.selected;
|
||||
this.selected = this.defaultSelected;
|
||||
this.requestUpdate("selected", oldVal);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
updated(changedProperties) {
|
||||
if (changedProperties.has("disabled")) {
|
||||
this.setAttribute("aria-disabled", this.disabled ? "true" : "false");
|
||||
this.customStates.set("disabled", this.disabled);
|
||||
}
|
||||
if (changedProperties.has("selected")) {
|
||||
this.setAttribute("aria-selected", this.selected ? "true" : "false");
|
||||
this.customStates.set("selected", this.selected);
|
||||
}
|
||||
if (changedProperties.has("value")) {
|
||||
if (typeof this.value !== "string") {
|
||||
this.value = String(this.value);
|
||||
}
|
||||
this.handleDefaultSlotChange();
|
||||
}
|
||||
if (changedProperties.has("current")) {
|
||||
this.customStates.set("current", this.current);
|
||||
}
|
||||
super.updated(changedProperties);
|
||||
}
|
||||
async firstUpdated(changedProperties) {
|
||||
super.firstUpdated(changedProperties);
|
||||
if (this.didSSR && !this.hasUpdated) {
|
||||
await this.updateComplete;
|
||||
this.syncDefaultSelected();
|
||||
} else {
|
||||
this.syncDefaultSelected();
|
||||
}
|
||||
if (this.selected && !this.defaultSelected) {
|
||||
const parent = this.closest("wa-select, wa-combobox");
|
||||
if (parent && !parent.hasInteracted) {
|
||||
await customElements.whenDefined(parent?.localName);
|
||||
await parent.updateComplete;
|
||||
parent.selectionChanged?.();
|
||||
}
|
||||
}
|
||||
}
|
||||
updateDefaultLabel() {
|
||||
let oldValue = this.cachedDefaultLabel;
|
||||
this.cachedDefaultLabel = getText(this).trim();
|
||||
this.isDefaultLabelDirty = false;
|
||||
let changed = this.cachedDefaultLabel !== oldValue;
|
||||
if (!this._label && changed) {
|
||||
this.requestUpdate("label", oldValue);
|
||||
}
|
||||
return changed;
|
||||
}
|
||||
render() {
|
||||
let selected = this.selected;
|
||||
if (this.didSSR && !this.hasUpdated) {
|
||||
this.updateComplete.then(() => {
|
||||
this.requestUpdate();
|
||||
});
|
||||
return E;
|
||||
}
|
||||
return x`
|
||||
${selected ? x`<wa-icon
|
||||
part="checked-icon"
|
||||
class="check"
|
||||
name="check"
|
||||
library="system"
|
||||
variant="solid"
|
||||
aria-hidden="true"
|
||||
></wa-icon>` : x`<span part="checked-icon" class="check" aria-hidden="true"></span>`}
|
||||
<slot part="start" name="start" class="start"></slot>
|
||||
<slot part="label" class="label" @slotchange=${this.handleDefaultSlotChange}></slot>
|
||||
<slot part="end" name="end" class="end"></slot>
|
||||
`;
|
||||
}
|
||||
};
|
||||
WaOption.css = option_styles_default;
|
||||
__decorateClass([
|
||||
e(".label")
|
||||
], WaOption.prototype, "defaultSlot", 2);
|
||||
__decorateClass([
|
||||
r()
|
||||
], WaOption.prototype, "current", 2);
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaOption.prototype, "value", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean })
|
||||
], WaOption.prototype, "disabled", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean, attribute: false })
|
||||
], WaOption.prototype, "selected", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean, attribute: "selected" })
|
||||
], WaOption.prototype, "defaultSelected", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaOption.prototype, "label", 1);
|
||||
WaOption = __decorateClass([
|
||||
t("wa-option")
|
||||
], WaOption);
|
||||
|
||||
export {
|
||||
WaOption
|
||||
};
|
||||
89
chrome/static/wa/chunks/chunk.B3QSBNFD.js
Normal file
89
chrome/static/wa/chunks/chunk.B3QSBNFD.js
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/divider/divider.styles.ts
|
||||
var divider_styles_default = i`
|
||||
:host {
|
||||
--color: var(--wa-color-surface-border);
|
||||
--width: var(--wa-border-width-s);
|
||||
--spacing: var(--wa-space-m);
|
||||
--label-spacing: var(--wa-space-s);
|
||||
--label-offset: 0;
|
||||
}
|
||||
|
||||
:host(:not([orientation='vertical'])) {
|
||||
display: block;
|
||||
border-top: solid var(--width) var(--color);
|
||||
margin: var(--spacing) 0;
|
||||
}
|
||||
|
||||
:host([orientation='vertical']) {
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
border-inline-start: solid var(--width) var(--color);
|
||||
margin: 0 var(--spacing);
|
||||
min-block-size: 1lh;
|
||||
}
|
||||
|
||||
/* With a label, the host's border gives way to two lines that flank the label */
|
||||
:host([with-label]) {
|
||||
align-items: center;
|
||||
gap: var(--label-spacing);
|
||||
border: none;
|
||||
}
|
||||
|
||||
:host([with-label]:not([orientation='vertical'])) {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
:host([with-label][orientation='vertical']) {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
:host([with-label])::before,
|
||||
:host([with-label])::after {
|
||||
content: '';
|
||||
flex: 1 1 0;
|
||||
}
|
||||
|
||||
:host([with-label]:not([orientation='vertical']))::before,
|
||||
:host([with-label]:not([orientation='vertical']))::after {
|
||||
min-inline-size: 1em;
|
||||
border-top: solid var(--width) var(--color);
|
||||
}
|
||||
|
||||
:host([with-label][orientation='vertical'])::before,
|
||||
:host([with-label][orientation='vertical'])::after {
|
||||
min-block-size: 1lh;
|
||||
border-inline-start: solid var(--width) var(--color);
|
||||
}
|
||||
|
||||
:host([with-label][label-placement='start'])::before,
|
||||
:host([with-label][label-placement='end'])::after {
|
||||
flex: 0 0 var(--label-offset);
|
||||
min-inline-size: 0;
|
||||
min-block-size: 0;
|
||||
}
|
||||
|
||||
:host(:not([with-label])) .label {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:host([with-label]) .label {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--wa-space-2xs);
|
||||
flex: 0 1 auto;
|
||||
color: var(--wa-color-text-quiet);
|
||||
font-size: var(--wa-font-size-s);
|
||||
line-height: var(--wa-line-height-condensed);
|
||||
text-align: center;
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
divider_styles_default
|
||||
};
|
||||
31
chrome/static/wa/chunks/chunk.B6O732C7.js
Normal file
31
chrome/static/wa/chunks/chunk.B6O732C7.js
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/carousel-item/carousel-item.styles.ts
|
||||
var carousel_item_styles_default = i`
|
||||
:host {
|
||||
--aspect-ratio: inherit;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
max-height: 100%;
|
||||
aspect-ratio: var(--aspect-ratio);
|
||||
scroll-snap-align: start;
|
||||
scroll-snap-stop: always;
|
||||
}
|
||||
|
||||
::slotted(img) {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
object-fit: cover;
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
carousel_item_styles_default
|
||||
};
|
||||
27
chrome/static/wa/chunks/chunk.BAKBSVVU.js
Normal file
27
chrome/static/wa/chunks/chunk.BAKBSVVU.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaAccordionItem
|
||||
} from "./chunk.HYVJ2NPG.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/accordion-item/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-accordion-item";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaAccordionItem,
|
||||
react: React,
|
||||
events: {},
|
||||
displayName: "WaAccordionItem"
|
||||
});
|
||||
var accordion_item_default = reactWrapper;
|
||||
|
||||
export {
|
||||
accordion_item_default
|
||||
};
|
||||
30
chrome/static/wa/chunks/chunk.BAY6RJD3.js
Normal file
30
chrome/static/wa/chunks/chunk.BAY6RJD3.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaAnimatedImage
|
||||
} from "./chunk.Z4KHDJB4.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/animated-image/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-animated-image";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaAnimatedImage,
|
||||
react: React,
|
||||
events: {
|
||||
onWaLoad: "wa-load",
|
||||
onWaError: "wa-error"
|
||||
},
|
||||
displayName: "WaAnimatedImage"
|
||||
});
|
||||
var animated_image_default = reactWrapper;
|
||||
|
||||
export {
|
||||
animated_image_default
|
||||
};
|
||||
70
chrome/static/wa/chunks/chunk.BGEID5TE.js
Normal file
70
chrome/static/wa/chunks/chunk.BGEID5TE.js
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
callout_styles_default
|
||||
} from "./chunk.UIKY7WPI.js";
|
||||
import {
|
||||
warnDeprecatedSize
|
||||
} from "./chunk.RPQJAXXR.js";
|
||||
import {
|
||||
size_styles_default
|
||||
} from "./chunk.JB5Y2AN3.js";
|
||||
import {
|
||||
variants_styles_default
|
||||
} from "./chunk.K5Q2EBKV.js";
|
||||
import {
|
||||
watch
|
||||
} from "./chunk.PZAN6FPN.js";
|
||||
import {
|
||||
WebAwesomeElement,
|
||||
n,
|
||||
t
|
||||
} from "./chunk.LBLI4KS5.js";
|
||||
import {
|
||||
x
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
import {
|
||||
__decorateClass
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/components/callout/callout.ts
|
||||
var WaCallout = class extends WebAwesomeElement {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.variant = "brand";
|
||||
this.size = "m";
|
||||
}
|
||||
handleSizeChange() {
|
||||
warnDeprecatedSize(this.localName, this.size);
|
||||
}
|
||||
render() {
|
||||
return x`
|
||||
<div part="icon">
|
||||
<slot name="icon"></slot>
|
||||
</div>
|
||||
|
||||
<div part="message">
|
||||
<slot></slot>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
};
|
||||
WaCallout.css = [callout_styles_default, variants_styles_default, size_styles_default];
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaCallout.prototype, "variant", 2);
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaCallout.prototype, "appearance", 2);
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaCallout.prototype, "size", 2);
|
||||
__decorateClass([
|
||||
watch("size")
|
||||
], WaCallout.prototype, "handleSizeChange", 1);
|
||||
WaCallout = __decorateClass([
|
||||
t("wa-callout")
|
||||
], WaCallout);
|
||||
|
||||
export {
|
||||
WaCallout
|
||||
};
|
||||
274
chrome/static/wa/chunks/chunk.BKE5EYM3.js
Normal file
274
chrome/static/wa/chunks/chunk.BKE5EYM3.js
Normal file
|
|
@ -0,0 +1,274 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
|
||||
// ../../node_modules/lit-html/lit-html.js
|
||||
var t = globalThis;
|
||||
var i = t.trustedTypes;
|
||||
var s = i ? i.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0;
|
||||
var e = "$lit$";
|
||||
var h = `lit$${Math.random().toFixed(9).slice(2)}$`;
|
||||
var o = "?" + h;
|
||||
var n = `<${o}>`;
|
||||
var r = document;
|
||||
var l = () => r.createComment("");
|
||||
var c = (t2) => null === t2 || "object" != typeof t2 && "function" != typeof t2;
|
||||
var a = Array.isArray;
|
||||
var u = (t2) => a(t2) || "function" == typeof t2?.[Symbol.iterator];
|
||||
var d = "[ \n\f\r]";
|
||||
var f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g;
|
||||
var v = /-->/g;
|
||||
var _ = />/g;
|
||||
var m = RegExp(`>|${d}(?:([^\\s"'>=/]+)(${d}*=${d}*(?:[^
|
||||
\f\r"'\`<>=]|("|')|))|$)`, "g");
|
||||
var p = /'/g;
|
||||
var g = /"/g;
|
||||
var $ = /^(?:script|style|textarea|title)$/i;
|
||||
var y = (t2) => (i2, ...s2) => ({ _$litType$: t2, strings: i2, values: s2 });
|
||||
var x = y(1);
|
||||
var b = y(2);
|
||||
var w = y(3);
|
||||
var T = Symbol.for("lit-noChange");
|
||||
var E = Symbol.for("lit-nothing");
|
||||
var A = /* @__PURE__ */ new WeakMap();
|
||||
var C = r.createTreeWalker(r, 129);
|
||||
function P(t2, i2) {
|
||||
if (!a(t2) || !t2.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
||||
return void 0 !== s ? s.createHTML(i2) : i2;
|
||||
}
|
||||
var V = (t2, i2) => {
|
||||
const s2 = t2.length - 1, o2 = [];
|
||||
let r2, l2 = 2 === i2 ? "<svg>" : 3 === i2 ? "<math>" : "", c2 = f;
|
||||
for (let i3 = 0; i3 < s2; i3++) {
|
||||
const s3 = t2[i3];
|
||||
let a2, u2, d2 = -1, y2 = 0;
|
||||
for (; y2 < s3.length && (c2.lastIndex = y2, u2 = c2.exec(s3), null !== u2); ) y2 = c2.lastIndex, c2 === f ? "!--" === u2[1] ? c2 = v : void 0 !== u2[1] ? c2 = _ : void 0 !== u2[2] ? ($.test(u2[2]) && (r2 = RegExp("</" + u2[2], "g")), c2 = m) : void 0 !== u2[3] && (c2 = m) : c2 === m ? ">" === u2[0] ? (c2 = r2 ?? f, d2 = -1) : void 0 === u2[1] ? d2 = -2 : (d2 = c2.lastIndex - u2[2].length, a2 = u2[1], c2 = void 0 === u2[3] ? m : '"' === u2[3] ? g : p) : c2 === g || c2 === p ? c2 = m : c2 === v || c2 === _ ? c2 = f : (c2 = m, r2 = void 0);
|
||||
const x2 = c2 === m && t2[i3 + 1].startsWith("/>") ? " " : "";
|
||||
l2 += c2 === f ? s3 + n : d2 >= 0 ? (o2.push(a2), s3.slice(0, d2) + e + s3.slice(d2) + h + x2) : s3 + h + (-2 === d2 ? i3 : x2);
|
||||
}
|
||||
return [P(t2, l2 + (t2[s2] || "<?>") + (2 === i2 ? "</svg>" : 3 === i2 ? "</math>" : "")), o2];
|
||||
};
|
||||
var N = class _N {
|
||||
constructor({ strings: t2, _$litType$: s2 }, n2) {
|
||||
let r2;
|
||||
this.parts = [];
|
||||
let c2 = 0, a2 = 0;
|
||||
const u2 = t2.length - 1, d2 = this.parts, [f2, v2] = V(t2, s2);
|
||||
if (this.el = _N.createElement(f2, n2), C.currentNode = this.el.content, 2 === s2 || 3 === s2) {
|
||||
const t3 = this.el.content.firstChild;
|
||||
t3.replaceWith(...t3.childNodes);
|
||||
}
|
||||
for (; null !== (r2 = C.nextNode()) && d2.length < u2; ) {
|
||||
if (1 === r2.nodeType) {
|
||||
if (r2.hasAttributes()) for (const t3 of r2.getAttributeNames()) if (t3.endsWith(e)) {
|
||||
const i2 = v2[a2++], s3 = r2.getAttribute(t3).split(h), e2 = /([.?@])?(.*)/.exec(i2);
|
||||
d2.push({ type: 1, index: c2, name: e2[2], strings: s3, ctor: "." === e2[1] ? H : "?" === e2[1] ? I : "@" === e2[1] ? L : k }), r2.removeAttribute(t3);
|
||||
} else t3.startsWith(h) && (d2.push({ type: 6, index: c2 }), r2.removeAttribute(t3));
|
||||
if ($.test(r2.tagName)) {
|
||||
const t3 = r2.textContent.split(h), s3 = t3.length - 1;
|
||||
if (s3 > 0) {
|
||||
r2.textContent = i ? i.emptyScript : "";
|
||||
for (let i2 = 0; i2 < s3; i2++) r2.append(t3[i2], l()), C.nextNode(), d2.push({ type: 2, index: ++c2 });
|
||||
r2.append(t3[s3], l());
|
||||
}
|
||||
}
|
||||
} else if (8 === r2.nodeType) if (r2.data === o) d2.push({ type: 2, index: c2 });
|
||||
else {
|
||||
let t3 = -1;
|
||||
for (; -1 !== (t3 = r2.data.indexOf(h, t3 + 1)); ) d2.push({ type: 7, index: c2 }), t3 += h.length - 1;
|
||||
}
|
||||
c2++;
|
||||
}
|
||||
}
|
||||
static createElement(t2, i2) {
|
||||
const s2 = r.createElement("template");
|
||||
return s2.innerHTML = t2, s2;
|
||||
}
|
||||
};
|
||||
function S(t2, i2, s2 = t2, e2) {
|
||||
if (i2 === T) return i2;
|
||||
let h2 = void 0 !== e2 ? s2._$Co?.[e2] : s2._$Cl;
|
||||
const o2 = c(i2) ? void 0 : i2._$litDirective$;
|
||||
return h2?.constructor !== o2 && (h2?._$AO?.(false), void 0 === o2 ? h2 = void 0 : (h2 = new o2(t2), h2._$AT(t2, s2, e2)), void 0 !== e2 ? (s2._$Co ?? (s2._$Co = []))[e2] = h2 : s2._$Cl = h2), void 0 !== h2 && (i2 = S(t2, h2._$AS(t2, i2.values), h2, e2)), i2;
|
||||
}
|
||||
var M = class {
|
||||
constructor(t2, i2) {
|
||||
this._$AV = [], this._$AN = void 0, this._$AD = t2, this._$AM = i2;
|
||||
}
|
||||
get parentNode() {
|
||||
return this._$AM.parentNode;
|
||||
}
|
||||
get _$AU() {
|
||||
return this._$AM._$AU;
|
||||
}
|
||||
u(t2) {
|
||||
const { el: { content: i2 }, parts: s2 } = this._$AD, e2 = (t2?.creationScope ?? r).importNode(i2, true);
|
||||
C.currentNode = e2;
|
||||
let h2 = C.nextNode(), o2 = 0, n2 = 0, l2 = s2[0];
|
||||
for (; void 0 !== l2; ) {
|
||||
if (o2 === l2.index) {
|
||||
let i3;
|
||||
2 === l2.type ? i3 = new R(h2, h2.nextSibling, this, t2) : 1 === l2.type ? i3 = new l2.ctor(h2, l2.name, l2.strings, this, t2) : 6 === l2.type && (i3 = new z(h2, this, t2)), this._$AV.push(i3), l2 = s2[++n2];
|
||||
}
|
||||
o2 !== l2?.index && (h2 = C.nextNode(), o2++);
|
||||
}
|
||||
return C.currentNode = r, e2;
|
||||
}
|
||||
p(t2) {
|
||||
let i2 = 0;
|
||||
for (const s2 of this._$AV) void 0 !== s2 && (void 0 !== s2.strings ? (s2._$AI(t2, s2, i2), i2 += s2.strings.length - 2) : s2._$AI(t2[i2])), i2++;
|
||||
}
|
||||
};
|
||||
var R = class _R {
|
||||
get _$AU() {
|
||||
return this._$AM?._$AU ?? this._$Cv;
|
||||
}
|
||||
constructor(t2, i2, s2, e2) {
|
||||
this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t2, this._$AB = i2, this._$AM = s2, this.options = e2, this._$Cv = e2?.isConnected ?? true;
|
||||
}
|
||||
get parentNode() {
|
||||
let t2 = this._$AA.parentNode;
|
||||
const i2 = this._$AM;
|
||||
return void 0 !== i2 && 11 === t2?.nodeType && (t2 = i2.parentNode), t2;
|
||||
}
|
||||
get startNode() {
|
||||
return this._$AA;
|
||||
}
|
||||
get endNode() {
|
||||
return this._$AB;
|
||||
}
|
||||
_$AI(t2, i2 = this) {
|
||||
t2 = S(this, t2, i2), c(t2) ? t2 === E || null == t2 || "" === t2 ? (this._$AH !== E && this._$AR(), this._$AH = E) : t2 !== this._$AH && t2 !== T && this._(t2) : void 0 !== t2._$litType$ ? this.$(t2) : void 0 !== t2.nodeType ? this.T(t2) : u(t2) ? this.k(t2) : this._(t2);
|
||||
}
|
||||
O(t2) {
|
||||
return this._$AA.parentNode.insertBefore(t2, this._$AB);
|
||||
}
|
||||
T(t2) {
|
||||
this._$AH !== t2 && (this._$AR(), this._$AH = this.O(t2));
|
||||
}
|
||||
_(t2) {
|
||||
this._$AH !== E && c(this._$AH) ? this._$AA.nextSibling.data = t2 : this.T(r.createTextNode(t2)), this._$AH = t2;
|
||||
}
|
||||
$(t2) {
|
||||
const { values: i2, _$litType$: s2 } = t2, e2 = "number" == typeof s2 ? this._$AC(t2) : (void 0 === s2.el && (s2.el = N.createElement(P(s2.h, s2.h[0]), this.options)), s2);
|
||||
if (this._$AH?._$AD === e2) this._$AH.p(i2);
|
||||
else {
|
||||
const t3 = new M(e2, this), s3 = t3.u(this.options);
|
||||
t3.p(i2), this.T(s3), this._$AH = t3;
|
||||
}
|
||||
}
|
||||
_$AC(t2) {
|
||||
let i2 = A.get(t2.strings);
|
||||
return void 0 === i2 && A.set(t2.strings, i2 = new N(t2)), i2;
|
||||
}
|
||||
k(t2) {
|
||||
a(this._$AH) || (this._$AH = [], this._$AR());
|
||||
const i2 = this._$AH;
|
||||
let s2, e2 = 0;
|
||||
for (const h2 of t2) e2 === i2.length ? i2.push(s2 = new _R(this.O(l()), this.O(l()), this, this.options)) : s2 = i2[e2], s2._$AI(h2), e2++;
|
||||
e2 < i2.length && (this._$AR(s2 && s2._$AB.nextSibling, e2), i2.length = e2);
|
||||
}
|
||||
_$AR(t2 = this._$AA.nextSibling, i2) {
|
||||
for (this._$AP?.(false, true, i2); t2 && t2 !== this._$AB; ) {
|
||||
const i3 = t2.nextSibling;
|
||||
t2.remove(), t2 = i3;
|
||||
}
|
||||
}
|
||||
setConnected(t2) {
|
||||
void 0 === this._$AM && (this._$Cv = t2, this._$AP?.(t2));
|
||||
}
|
||||
};
|
||||
var k = class {
|
||||
get tagName() {
|
||||
return this.element.tagName;
|
||||
}
|
||||
get _$AU() {
|
||||
return this._$AM._$AU;
|
||||
}
|
||||
constructor(t2, i2, s2, e2, h2) {
|
||||
this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t2, this.name = i2, this._$AM = e2, this.options = h2, s2.length > 2 || "" !== s2[0] || "" !== s2[1] ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = E;
|
||||
}
|
||||
_$AI(t2, i2 = this, s2, e2) {
|
||||
const h2 = this.strings;
|
||||
let o2 = false;
|
||||
if (void 0 === h2) t2 = S(this, t2, i2, 0), o2 = !c(t2) || t2 !== this._$AH && t2 !== T, o2 && (this._$AH = t2);
|
||||
else {
|
||||
const e3 = t2;
|
||||
let n2, r2;
|
||||
for (t2 = h2[0], n2 = 0; n2 < h2.length - 1; n2++) r2 = S(this, e3[s2 + n2], i2, n2), r2 === T && (r2 = this._$AH[n2]), o2 || (o2 = !c(r2) || r2 !== this._$AH[n2]), r2 === E ? t2 = E : t2 !== E && (t2 += (r2 ?? "") + h2[n2 + 1]), this._$AH[n2] = r2;
|
||||
}
|
||||
o2 && !e2 && this.j(t2);
|
||||
}
|
||||
j(t2) {
|
||||
t2 === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t2 ?? "");
|
||||
}
|
||||
};
|
||||
var H = class extends k {
|
||||
constructor() {
|
||||
super(...arguments), this.type = 3;
|
||||
}
|
||||
j(t2) {
|
||||
this.element[this.name] = t2 === E ? void 0 : t2;
|
||||
}
|
||||
};
|
||||
var I = class extends k {
|
||||
constructor() {
|
||||
super(...arguments), this.type = 4;
|
||||
}
|
||||
j(t2) {
|
||||
this.element.toggleAttribute(this.name, !!t2 && t2 !== E);
|
||||
}
|
||||
};
|
||||
var L = class extends k {
|
||||
constructor(t2, i2, s2, e2, h2) {
|
||||
super(t2, i2, s2, e2, h2), this.type = 5;
|
||||
}
|
||||
_$AI(t2, i2 = this) {
|
||||
if ((t2 = S(this, t2, i2, 0) ?? E) === T) return;
|
||||
const s2 = this._$AH, e2 = t2 === E && s2 !== E || t2.capture !== s2.capture || t2.once !== s2.once || t2.passive !== s2.passive, h2 = t2 !== E && (s2 === E || e2);
|
||||
e2 && this.element.removeEventListener(this.name, this, s2), h2 && this.element.addEventListener(this.name, this, t2), this._$AH = t2;
|
||||
}
|
||||
handleEvent(t2) {
|
||||
"function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t2) : this._$AH.handleEvent(t2);
|
||||
}
|
||||
};
|
||||
var z = class {
|
||||
constructor(t2, i2, s2) {
|
||||
this.element = t2, this.type = 6, this._$AN = void 0, this._$AM = i2, this.options = s2;
|
||||
}
|
||||
get _$AU() {
|
||||
return this._$AM._$AU;
|
||||
}
|
||||
_$AI(t2) {
|
||||
S(this, t2);
|
||||
}
|
||||
};
|
||||
var Z = { M: e, P: h, A: o, C: 1, L: V, R: M, D: u, V: S, I: R, H: k, N: I, U: L, B: H, F: z };
|
||||
var j = t.litHtmlPolyfillSupport;
|
||||
j?.(N, R), (t.litHtmlVersions ?? (t.litHtmlVersions = [])).push("3.3.0");
|
||||
var B = (t2, i2, s2) => {
|
||||
const e2 = s2?.renderBefore ?? i2;
|
||||
let h2 = e2._$litPart$;
|
||||
if (void 0 === h2) {
|
||||
const t3 = s2?.renderBefore ?? null;
|
||||
e2._$litPart$ = h2 = new R(i2.insertBefore(l(), t3), t3, void 0, s2 ?? {});
|
||||
}
|
||||
return h2._$AI(t2), h2;
|
||||
};
|
||||
|
||||
export {
|
||||
x,
|
||||
b,
|
||||
w,
|
||||
T,
|
||||
E,
|
||||
Z,
|
||||
B
|
||||
};
|
||||
/*! Bundled license information:
|
||||
|
||||
lit-html/lit-html.js:
|
||||
(**
|
||||
* @license
|
||||
* Copyright 2017 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*)
|
||||
*/
|
||||
27
chrome/static/wa/chunks/chunk.BLGT2UQZ.js
Normal file
27
chrome/static/wa/chunks/chunk.BLGT2UQZ.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaCarouselItem
|
||||
} from "./chunk.AQZVKFHG.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/carousel-item/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-carousel-item";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaCarouselItem,
|
||||
react: React,
|
||||
events: {},
|
||||
displayName: "WaCarouselItem"
|
||||
});
|
||||
var carousel_item_default = reactWrapper;
|
||||
|
||||
export {
|
||||
carousel_item_default
|
||||
};
|
||||
12
chrome/static/wa/chunks/chunk.BMO76VKZ.js
Normal file
12
chrome/static/wa/chunks/chunk.BMO76VKZ.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
|
||||
// src/events/start.ts
|
||||
var WaStartEvent = class extends Event {
|
||||
constructor() {
|
||||
super("wa-start", { bubbles: true, cancelable: false, composed: true });
|
||||
}
|
||||
};
|
||||
|
||||
export {
|
||||
WaStartEvent
|
||||
};
|
||||
256
chrome/static/wa/chunks/chunk.BOYYUMGV.js
Normal file
256
chrome/static/wa/chunks/chunk.BOYYUMGV.js
Normal file
|
|
@ -0,0 +1,256 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
toast_styles_default
|
||||
} from "./chunk.PP5RFEZX.js";
|
||||
import {
|
||||
uniqueId
|
||||
} from "./chunk.O6IZ4I7T.js";
|
||||
import {
|
||||
animate,
|
||||
prefersReducedMotion
|
||||
} from "./chunk.L6CIKOFQ.js";
|
||||
import {
|
||||
WebAwesomeElement,
|
||||
e,
|
||||
n,
|
||||
t
|
||||
} from "./chunk.LBLI4KS5.js";
|
||||
import {
|
||||
o
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
import {
|
||||
x
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
import {
|
||||
__decorateClass
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/components/toast/toast.ts
|
||||
var sharedLiveRegionContainer = null;
|
||||
var sharedLiveRegionRefCount = 0;
|
||||
function mountSharedLiveRegions() {
|
||||
sharedLiveRegionRefCount += 1;
|
||||
if (sharedLiveRegionContainer || typeof document === "undefined") return;
|
||||
const container = document.createElement("div");
|
||||
container.id = uniqueId("wa-toast-live-region-");
|
||||
container.setAttribute("data-wa-toast-live-region", "");
|
||||
container.style.cssText = `
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
clip-path: inset(50%);
|
||||
pointer-events: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
`;
|
||||
document.body.append(container);
|
||||
sharedLiveRegionContainer = container;
|
||||
}
|
||||
function unmountSharedLiveRegions() {
|
||||
sharedLiveRegionRefCount = Math.max(0, sharedLiveRegionRefCount - 1);
|
||||
if (sharedLiveRegionRefCount > 0) return;
|
||||
sharedLiveRegionContainer?.remove();
|
||||
sharedLiveRegionContainer = null;
|
||||
}
|
||||
function announceViaSharedLiveRegion(text, variant) {
|
||||
if (typeof document === "undefined") return;
|
||||
const container = sharedLiveRegionContainer;
|
||||
if (!container) return;
|
||||
const trimmed = text.trim();
|
||||
if (!trimmed) return;
|
||||
const announcer = document.createElement("div");
|
||||
announcer.setAttribute("role", variant === "danger" ? "alert" : "status");
|
||||
announcer.setAttribute("aria-live", variant === "danger" ? "assertive" : "polite");
|
||||
announcer.setAttribute("aria-atomic", "true");
|
||||
container.append(announcer);
|
||||
requestAnimationFrame(() => {
|
||||
requestAnimationFrame(() => {
|
||||
announcer.textContent = trimmed;
|
||||
});
|
||||
});
|
||||
setTimeout(() => announcer.remove(), 1e3);
|
||||
}
|
||||
var WaToast = class extends WebAwesomeElement {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.activatedToastItems = /* @__PURE__ */ new WeakSet();
|
||||
this.positionCache = /* @__PURE__ */ new Map();
|
||||
this.placement = "top-end";
|
||||
this.handleDocumentKeyDown = async (event) => {
|
||||
await new Promise((resolve) => setTimeout(resolve));
|
||||
if (event.key === "Escape" && !event.defaultPrevented) {
|
||||
const toastItems = this.getToastItems();
|
||||
if (toastItems.length > 0) {
|
||||
event.preventDefault();
|
||||
const mostRecent = toastItems[toastItems.length - 1];
|
||||
mostRecent?.hide();
|
||||
}
|
||||
}
|
||||
};
|
||||
this.handleAfterHide = async (event) => {
|
||||
const toastItem = event.target;
|
||||
if (toastItem.parentElement === this) {
|
||||
this.capturePositions();
|
||||
toastItem.remove();
|
||||
await this.animatePositions();
|
||||
}
|
||||
if (this.getToastItems().length === 0) {
|
||||
this.hideStack();
|
||||
}
|
||||
};
|
||||
}
|
||||
connectedCallback() {
|
||||
super.connectedCallback();
|
||||
if (!o) {
|
||||
this.popover = "manual";
|
||||
mountSharedLiveRegions();
|
||||
document.addEventListener("keydown", this.handleDocumentKeyDown);
|
||||
}
|
||||
}
|
||||
disconnectedCallback() {
|
||||
super.disconnectedCallback();
|
||||
document.removeEventListener?.("keydown", this.handleDocumentKeyDown);
|
||||
unmountSharedLiveRegions();
|
||||
}
|
||||
handleSlotChange() {
|
||||
const toastItems = this.getToastItems();
|
||||
const newItems = [];
|
||||
toastItems.forEach((toastItem) => {
|
||||
if (!this.activatedToastItems.has(toastItem)) {
|
||||
newItems.push(toastItem);
|
||||
}
|
||||
});
|
||||
if (newItems.length > 0) {
|
||||
this.capturePositions();
|
||||
newItems.forEach((toastItem) => {
|
||||
this.activatedToastItems.add(toastItem);
|
||||
this.showStack();
|
||||
toastItem.startTimer();
|
||||
this.announceToastItem(toastItem);
|
||||
});
|
||||
requestAnimationFrame(() => this.animatePositions());
|
||||
}
|
||||
}
|
||||
announceToastItem(toastItem) {
|
||||
announceViaSharedLiveRegion(toastItem.textContent ?? "", toastItem.variant);
|
||||
}
|
||||
getToastItems() {
|
||||
return [...this.querySelectorAll(":scope > wa-toast-item")];
|
||||
}
|
||||
/** Captures the current position of all toast items for FLIP animation. */
|
||||
capturePositions() {
|
||||
this.positionCache.clear();
|
||||
for (const item of this.getToastItems()) {
|
||||
this.positionCache.set(item, item.getBoundingClientRect());
|
||||
}
|
||||
}
|
||||
/** Animates toast items from their cached positions to their new positions using FLIP. */
|
||||
async animatePositions() {
|
||||
if (prefersReducedMotion()) {
|
||||
this.positionCache.clear();
|
||||
return;
|
||||
}
|
||||
const animations = [];
|
||||
for (const item of this.getToastItems()) {
|
||||
const oldRect = this.positionCache.get(item);
|
||||
if (!oldRect) continue;
|
||||
const newRect = item.getBoundingClientRect();
|
||||
const deltaY = oldRect.top - newRect.top;
|
||||
if (Math.abs(deltaY) > 1) {
|
||||
const animation = animate(item, [{ transform: `translateY(${deltaY}px)` }, { transform: "translateY(0)" }], {
|
||||
duration: 200,
|
||||
easing: "cubic-bezier(0.2, 0, 0, 1)"
|
||||
// Material Design standard easing
|
||||
});
|
||||
animations.push(animation);
|
||||
}
|
||||
}
|
||||
this.positionCache.clear();
|
||||
await Promise.all(animations);
|
||||
}
|
||||
showStack() {
|
||||
if (!this.matches(":popover-open")) {
|
||||
this.showPopover();
|
||||
this.customStates.set("visible", true);
|
||||
}
|
||||
}
|
||||
hideStack() {
|
||||
if (this.matches(":popover-open")) {
|
||||
this.hidePopover();
|
||||
this.customStates.set("visible", false);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Creates a toast notification programmatically and adds it to the stack. Returns a reference to the created toast
|
||||
* item element.
|
||||
*/
|
||||
async create(message, options) {
|
||||
const opts = {
|
||||
allowHtml: false,
|
||||
duration: 5e3,
|
||||
variant: "neutral",
|
||||
size: "m",
|
||||
...options
|
||||
};
|
||||
const toastItem = document.createElement("wa-toast-item");
|
||||
toastItem.variant = opts.variant;
|
||||
toastItem.size = opts.size;
|
||||
toastItem.duration = opts.duration;
|
||||
if (opts.allowHtml) {
|
||||
toastItem.innerHTML = message;
|
||||
} else {
|
||||
toastItem.textContent = message;
|
||||
}
|
||||
if (opts.icon) {
|
||||
const icon = document.createElement("wa-icon");
|
||||
icon.setAttribute("slot", "icon");
|
||||
if (typeof opts.icon === "string") {
|
||||
icon.setAttribute("name", opts.icon);
|
||||
} else {
|
||||
icon.setAttribute("name", opts.icon.name);
|
||||
if (opts.icon.library) {
|
||||
icon.setAttribute("library", opts.icon.library);
|
||||
}
|
||||
if (opts.icon.family) {
|
||||
icon.setAttribute("family", opts.icon.family);
|
||||
}
|
||||
if (opts.icon.variant) {
|
||||
icon.setAttribute("variant", opts.icon.variant);
|
||||
}
|
||||
}
|
||||
toastItem.prepend(icon);
|
||||
}
|
||||
this.activatedToastItems.add(toastItem);
|
||||
this.capturePositions();
|
||||
this.showStack();
|
||||
this.prepend(toastItem);
|
||||
await toastItem.updateComplete;
|
||||
this.animatePositions();
|
||||
toastItem.startTimer();
|
||||
this.announceToastItem(toastItem);
|
||||
return toastItem;
|
||||
}
|
||||
render() {
|
||||
return x`
|
||||
<div part="stack" class="stack" @wa-after-hide=${this.handleAfterHide}>
|
||||
<slot @slotchange=${this.handleSlotChange}></slot>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
};
|
||||
WaToast.css = toast_styles_default;
|
||||
__decorateClass([
|
||||
e(".stack")
|
||||
], WaToast.prototype, "stack", 2);
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaToast.prototype, "placement", 2);
|
||||
WaToast = __decorateClass([
|
||||
t("wa-toast")
|
||||
], WaToast);
|
||||
|
||||
export {
|
||||
WaToast
|
||||
};
|
||||
51
chrome/static/wa/chunks/chunk.BQNDCXAL.js
Normal file
51
chrome/static/wa/chunks/chunk.BQNDCXAL.js
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
e,
|
||||
i,
|
||||
t
|
||||
} from "./chunk.H23DVATU.js";
|
||||
import {
|
||||
T
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
|
||||
// ../../node_modules/lit-html/directives/style-map.js
|
||||
var n = "important";
|
||||
var i2 = " !" + n;
|
||||
var o = e(class extends i {
|
||||
constructor(t2) {
|
||||
if (super(t2), t2.type !== t.ATTRIBUTE || "style" !== t2.name || t2.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
||||
}
|
||||
render(t2) {
|
||||
return Object.keys(t2).reduce(((e2, r) => {
|
||||
const s = t2[r];
|
||||
return null == s ? e2 : e2 + `${r = r.includes("-") ? r : r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${s};`;
|
||||
}), "");
|
||||
}
|
||||
update(e2, [r]) {
|
||||
const { style: s } = e2.element;
|
||||
if (void 0 === this.ft) return this.ft = new Set(Object.keys(r)), this.render(r);
|
||||
for (const t2 of this.ft) null == r[t2] && (this.ft.delete(t2), t2.includes("-") ? s.removeProperty(t2) : s[t2] = null);
|
||||
for (const t2 in r) {
|
||||
const e3 = r[t2];
|
||||
if (null != e3) {
|
||||
this.ft.add(t2);
|
||||
const r2 = "string" == typeof e3 && e3.endsWith(i2);
|
||||
t2.includes("-") || r2 ? s.setProperty(t2, r2 ? e3.slice(0, -11) : e3, r2 ? n : "") : s[t2] = e3;
|
||||
}
|
||||
}
|
||||
return T;
|
||||
}
|
||||
});
|
||||
|
||||
export {
|
||||
o
|
||||
};
|
||||
/*! Bundled license information:
|
||||
|
||||
lit-html/directives/style-map.js:
|
||||
(**
|
||||
* @license
|
||||
* Copyright 2018 Google LLC
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*)
|
||||
*/
|
||||
247
chrome/static/wa/chunks/chunk.BSKW43C6.js
Normal file
247
chrome/static/wa/chunks/chunk.BSKW43C6.js
Normal file
|
|
@ -0,0 +1,247 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/dropdown-item/dropdown-item.styles.ts
|
||||
var dropdown_item_styles_default = i`
|
||||
:host {
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
padding: 0.5em 1em;
|
||||
border-radius: var(--wa-border-radius-s);
|
||||
isolation: isolate;
|
||||
color: var(--wa-color-text-normal);
|
||||
line-height: var(--wa-line-height-condensed);
|
||||
cursor: pointer;
|
||||
transition:
|
||||
var(--wa-transition-fast) background-color var(--wa-transition-easing),
|
||||
var(--wa-transition-fast) color var(--wa-transition-easing);
|
||||
}
|
||||
|
||||
@media (hover: hover) {
|
||||
:host(:hover:not(:state(disabled))) {
|
||||
background-color: var(--wa-color-neutral-fill-normal);
|
||||
}
|
||||
}
|
||||
|
||||
:host(:state(submenu-open)) {
|
||||
background-color: var(--wa-color-neutral-fill-normal);
|
||||
}
|
||||
|
||||
:host(:focus-visible) {
|
||||
z-index: 1;
|
||||
outline: var(--wa-focus-ring);
|
||||
background-color: var(--wa-color-neutral-fill-normal);
|
||||
}
|
||||
|
||||
:host(:state(disabled)),
|
||||
:host([disabled]) {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* Danger variant */
|
||||
:host([variant='danger']),
|
||||
:host([variant='danger']) #details {
|
||||
color: var(--wa-color-danger-on-quiet);
|
||||
}
|
||||
|
||||
@media (hover: hover) {
|
||||
:host([variant='danger']:hover) {
|
||||
background-color: var(--wa-color-danger-fill-normal);
|
||||
color: var(--wa-color-danger-on-normal);
|
||||
}
|
||||
}
|
||||
|
||||
:host([variant='danger']:state(submenu-open)),
|
||||
:host([variant='danger']:focus-visible) {
|
||||
background-color: var(--wa-color-danger-fill-normal);
|
||||
color: var(--wa-color-danger-on-normal);
|
||||
}
|
||||
|
||||
:host([checkbox-adjacent]) {
|
||||
padding-inline-start: 2em;
|
||||
}
|
||||
|
||||
/* Only add padding when item actually has a submenu */
|
||||
:host([submenu-adjacent]:not(:state(has-submenu))) #details {
|
||||
padding-inline-end: 0;
|
||||
}
|
||||
|
||||
:host(:state(has-submenu)[submenu-adjacent]) #details {
|
||||
padding-inline-end: 1.75em;
|
||||
}
|
||||
|
||||
/* The link only exists to be clicked programmatically. */
|
||||
#link {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#check {
|
||||
visibility: hidden;
|
||||
margin-inline-start: -1.5em;
|
||||
margin-inline-end: 0.5em;
|
||||
font-size: var(--wa-font-size-smaller);
|
||||
}
|
||||
|
||||
:host(:state(checked)) #check {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
#icon ::slotted(*) {
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
align-items: center;
|
||||
margin-inline-end: 0.75em !important;
|
||||
font-size: var(--wa-font-size-smaller);
|
||||
}
|
||||
|
||||
#label {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
#details {
|
||||
display: flex;
|
||||
flex: 0 0 auto;
|
||||
align-items: center;
|
||||
justify-content: end;
|
||||
color: var(--wa-color-text-quiet);
|
||||
font-size: var(--wa-font-size-smaller) !important;
|
||||
}
|
||||
|
||||
#details ::slotted(*) {
|
||||
margin-inline-start: 2em !important;
|
||||
}
|
||||
|
||||
/* Submenu indicator icon */
|
||||
#submenu-indicator {
|
||||
position: absolute;
|
||||
inset-inline-end: 1em;
|
||||
color: var(--wa-color-neutral-on-quiet);
|
||||
font-size: var(--wa-font-size-smaller);
|
||||
}
|
||||
|
||||
/* Flip chevron icon when RTL */
|
||||
:host(:dir(rtl)) #submenu-indicator {
|
||||
transform: scaleX(-1);
|
||||
}
|
||||
|
||||
/* Submenu styles */
|
||||
#submenu {
|
||||
display: flex;
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
flex-direction: column;
|
||||
width: max-content;
|
||||
margin: 0;
|
||||
padding: 0.25em;
|
||||
border: var(--wa-border-style) var(--wa-border-width-s) var(--wa-color-surface-border);
|
||||
border-radius: var(--wa-border-radius-m);
|
||||
background-color: var(--wa-color-surface-raised);
|
||||
box-shadow: var(--wa-shadow-m);
|
||||
color: var(--wa-color-text-normal);
|
||||
text-align: start;
|
||||
user-select: none;
|
||||
|
||||
/* Override default popover styles */
|
||||
&[popover] {
|
||||
margin: 0;
|
||||
inset: auto;
|
||||
padding: 0.25em;
|
||||
overflow: visible;
|
||||
border-radius: var(--wa-border-radius-m);
|
||||
}
|
||||
|
||||
&.show {
|
||||
animation: submenu-show var(--show-duration, var(--wa-transition-fast)) ease;
|
||||
}
|
||||
|
||||
&.hide {
|
||||
animation: submenu-show var(--show-duration, var(--wa-transition-fast)) ease reverse;
|
||||
}
|
||||
|
||||
/* Submenu placement transform origins */
|
||||
&[data-placement^='top'] {
|
||||
transform-origin: bottom;
|
||||
}
|
||||
|
||||
&[data-placement^='bottom'] {
|
||||
transform-origin: top;
|
||||
}
|
||||
|
||||
&[data-placement^='left'] {
|
||||
transform-origin: right;
|
||||
}
|
||||
|
||||
&[data-placement^='right'] {
|
||||
transform-origin: left;
|
||||
}
|
||||
|
||||
&[data-placement='left-start'] {
|
||||
transform-origin: right top;
|
||||
}
|
||||
|
||||
&[data-placement='left-end'] {
|
||||
transform-origin: right bottom;
|
||||
}
|
||||
|
||||
&[data-placement='right-start'] {
|
||||
transform-origin: left top;
|
||||
}
|
||||
|
||||
&[data-placement='right-end'] {
|
||||
transform-origin: left bottom;
|
||||
}
|
||||
|
||||
/* Safe triangle styling */
|
||||
&::before {
|
||||
display: none;
|
||||
z-index: 9;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: transparent;
|
||||
content: '';
|
||||
clip-path: polygon(
|
||||
var(--safe-triangle-cursor-x, 0) var(--safe-triangle-cursor-y, 0),
|
||||
var(--safe-triangle-submenu-start-x, 0) var(--safe-triangle-submenu-start-y, 0),
|
||||
var(--safe-triangle-submenu-end-x, 0) var(--safe-triangle-submenu-end-y, 0)
|
||||
);
|
||||
pointer-events: auto; /* Enable mouse events on the triangle */
|
||||
}
|
||||
|
||||
&[data-visible]::before {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
::slotted(wa-dropdown-item) {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
::slotted(wa-divider) {
|
||||
--spacing: 0.25em;
|
||||
}
|
||||
|
||||
@keyframes submenu-show {
|
||||
from {
|
||||
scale: 0.9;
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
scale: 1;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
dropdown_item_styles_default
|
||||
};
|
||||
41
chrome/static/wa/chunks/chunk.BUCKADPY.js
Normal file
41
chrome/static/wa/chunks/chunk.BUCKADPY.js
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/accordion/accordion.styles.ts
|
||||
var accordion_styles_default = i`
|
||||
@layer wa-component {
|
||||
:host {
|
||||
display: block;
|
||||
border: var(--wa-panel-border-width) var(--wa-panel-border-style) var(--wa-color-surface-border);
|
||||
border-radius: var(--wa-panel-border-radius);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Appearance modifiers */
|
||||
:host([appearance='outlined']) {
|
||||
background-color: var(--wa-color-surface-default);
|
||||
border-color: var(--wa-color-surface-border);
|
||||
}
|
||||
|
||||
:host([appearance='filled']) {
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
:host([appearance='filled-outlined']) {
|
||||
background-color: var(--wa-color-neutral-fill-quiet);
|
||||
border-color: var(--wa-color-neutral-border-quiet);
|
||||
}
|
||||
|
||||
:host([appearance='plain']) {
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
accordion_styles_default
|
||||
};
|
||||
13
chrome/static/wa/chunks/chunk.BZMNT3VX.js
Normal file
13
chrome/static/wa/chunks/chunk.BZMNT3VX.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
|
||||
// src/events/random-content-change.ts
|
||||
var WaContentChangeEvent = class extends Event {
|
||||
constructor(detail) {
|
||||
super("wa-content-change", { bubbles: true, cancelable: false, composed: true });
|
||||
this.detail = detail;
|
||||
}
|
||||
};
|
||||
|
||||
export {
|
||||
WaContentChangeEvent
|
||||
};
|
||||
118
chrome/static/wa/chunks/chunk.C435GZCM.js
Normal file
118
chrome/static/wa/chunks/chunk.C435GZCM.js
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
WaMutationEvent
|
||||
} from "./chunk.SUZGY3IK.js";
|
||||
import {
|
||||
mutation_observer_styles_default
|
||||
} from "./chunk.NS4E73TC.js";
|
||||
import {
|
||||
watch
|
||||
} from "./chunk.PZAN6FPN.js";
|
||||
import {
|
||||
WebAwesomeElement,
|
||||
n,
|
||||
t
|
||||
} from "./chunk.LBLI4KS5.js";
|
||||
import {
|
||||
x
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
import {
|
||||
__decorateClass
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/components/mutation-observer/mutation-observer.ts
|
||||
var WaMutationObserver = class extends WebAwesomeElement {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.attrOldValue = false;
|
||||
this.charData = false;
|
||||
this.charDataOldValue = false;
|
||||
this.childList = false;
|
||||
this.disabled = false;
|
||||
this.handleMutation = (mutationList) => {
|
||||
this.dispatchEvent(new WaMutationEvent({ mutationList }));
|
||||
};
|
||||
}
|
||||
connectedCallback() {
|
||||
super.connectedCallback();
|
||||
if (typeof MutationObserver !== "undefined") {
|
||||
this.mutationObserver = new MutationObserver(this.handleMutation);
|
||||
if (!this.disabled) {
|
||||
this.startObserver();
|
||||
}
|
||||
}
|
||||
}
|
||||
disconnectedCallback() {
|
||||
super.disconnectedCallback();
|
||||
this.stopObserver();
|
||||
}
|
||||
startObserver() {
|
||||
const observeAttributes = typeof this.attr === "string" && this.attr.length > 0;
|
||||
const attributeFilter = observeAttributes && this.attr !== "*" ? this.attr.split(" ") : void 0;
|
||||
try {
|
||||
this.mutationObserver.observe(this, {
|
||||
subtree: true,
|
||||
childList: this.childList,
|
||||
attributes: observeAttributes,
|
||||
attributeFilter,
|
||||
attributeOldValue: this.attrOldValue,
|
||||
characterData: this.charData,
|
||||
characterDataOldValue: this.charDataOldValue
|
||||
});
|
||||
} catch {
|
||||
}
|
||||
}
|
||||
stopObserver() {
|
||||
this.mutationObserver.disconnect();
|
||||
}
|
||||
handleDisabledChange() {
|
||||
if (this.disabled) {
|
||||
this.stopObserver();
|
||||
} else {
|
||||
this.startObserver();
|
||||
}
|
||||
}
|
||||
handleChange() {
|
||||
this.stopObserver();
|
||||
this.startObserver();
|
||||
}
|
||||
render() {
|
||||
return x` <slot></slot> `;
|
||||
}
|
||||
};
|
||||
WaMutationObserver.css = mutation_observer_styles_default;
|
||||
__decorateClass([
|
||||
n({ reflect: true })
|
||||
], WaMutationObserver.prototype, "attr", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "attr-old-value", type: Boolean, reflect: true })
|
||||
], WaMutationObserver.prototype, "attrOldValue", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "char-data", type: Boolean, reflect: true })
|
||||
], WaMutationObserver.prototype, "charData", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "char-data-old-value", type: Boolean, reflect: true })
|
||||
], WaMutationObserver.prototype, "charDataOldValue", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "child-list", type: Boolean, reflect: true })
|
||||
], WaMutationObserver.prototype, "childList", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean, reflect: true })
|
||||
], WaMutationObserver.prototype, "disabled", 2);
|
||||
__decorateClass([
|
||||
watch("disabled")
|
||||
], WaMutationObserver.prototype, "handleDisabledChange", 1);
|
||||
__decorateClass([
|
||||
watch("attr", { waitUntilFirstUpdate: true }),
|
||||
watch("attr-old-value", { waitUntilFirstUpdate: true }),
|
||||
watch("char-data", { waitUntilFirstUpdate: true }),
|
||||
watch("char-data-old-value", { waitUntilFirstUpdate: true }),
|
||||
watch("childList", { waitUntilFirstUpdate: true })
|
||||
], WaMutationObserver.prototype, "handleChange", 1);
|
||||
WaMutationObserver = __decorateClass([
|
||||
t("wa-mutation-observer")
|
||||
], WaMutationObserver);
|
||||
|
||||
export {
|
||||
WaMutationObserver
|
||||
};
|
||||
92
chrome/static/wa/chunks/chunk.CCRRQN4H.js
Normal file
92
chrome/static/wa/chunks/chunk.CCRRQN4H.js
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
WebAwesomeElement,
|
||||
n,
|
||||
t
|
||||
} from "./chunk.LBLI4KS5.js";
|
||||
import {
|
||||
LocalizeController
|
||||
} from "./chunk.DL7HG4WM.js";
|
||||
import {
|
||||
x
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
import {
|
||||
__decorateClass
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/components/format-date/format-date.ts
|
||||
var WaFormatDate = class extends WebAwesomeElement {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.localize = new LocalizeController(this);
|
||||
this.date = /* @__PURE__ */ new Date();
|
||||
this.hourFormat = "auto";
|
||||
}
|
||||
static get styles() {
|
||||
return [];
|
||||
}
|
||||
render() {
|
||||
const date = new Date(this.date);
|
||||
const hour12 = this.hourFormat === "auto" ? void 0 : this.hourFormat === "12";
|
||||
if (isNaN(date.getMilliseconds())) {
|
||||
return void 0;
|
||||
}
|
||||
const displayDate = this.localize.date(date, {
|
||||
weekday: this.weekday,
|
||||
era: this.era,
|
||||
year: this.year,
|
||||
month: this.month,
|
||||
day: this.day,
|
||||
hour: this.hour,
|
||||
minute: this.minute,
|
||||
second: this.second,
|
||||
timeZoneName: this.timeZoneName,
|
||||
timeZone: this.timeZone,
|
||||
hour12
|
||||
});
|
||||
return x`<time datetime=${date.toISOString()}>${displayDate}</time>`;
|
||||
}
|
||||
};
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaFormatDate.prototype, "date", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaFormatDate.prototype, "weekday", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaFormatDate.prototype, "era", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaFormatDate.prototype, "year", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaFormatDate.prototype, "month", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaFormatDate.prototype, "day", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaFormatDate.prototype, "hour", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaFormatDate.prototype, "minute", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaFormatDate.prototype, "second", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "time-zone-name" })
|
||||
], WaFormatDate.prototype, "timeZoneName", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "time-zone" })
|
||||
], WaFormatDate.prototype, "timeZone", 2);
|
||||
__decorateClass([
|
||||
n({ attribute: "hour-format" })
|
||||
], WaFormatDate.prototype, "hourFormat", 2);
|
||||
WaFormatDate = __decorateClass([
|
||||
t("wa-format-date")
|
||||
], WaFormatDate);
|
||||
|
||||
export {
|
||||
WaFormatDate
|
||||
};
|
||||
30
chrome/static/wa/chunks/chunk.CEY3XO3U.js
Normal file
30
chrome/static/wa/chunks/chunk.CEY3XO3U.js
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaInclude
|
||||
} from "./chunk.NWZSEH5M.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/include/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-include";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaInclude,
|
||||
react: React,
|
||||
events: {
|
||||
onWaLoad: "wa-load",
|
||||
onWaIncludeError: "wa-include-error"
|
||||
},
|
||||
displayName: "WaInclude"
|
||||
});
|
||||
var include_default = reactWrapper;
|
||||
|
||||
export {
|
||||
include_default
|
||||
};
|
||||
305
chrome/static/wa/chunks/chunk.CV35G2DF.js
Normal file
305
chrome/static/wa/chunks/chunk.CV35G2DF.js
Normal file
|
|
@ -0,0 +1,305 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/drawer/drawer.styles.ts
|
||||
var drawer_styles_default = i`
|
||||
:host {
|
||||
--size: 25rem;
|
||||
--spacing: var(--wa-space-l);
|
||||
--backdrop-filter: none;
|
||||
--show-duration: var(--wa-transition-normal);
|
||||
--hide-duration: var(--wa-transition-normal);
|
||||
|
||||
display: none;
|
||||
}
|
||||
|
||||
:host([open]) {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.drawer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
top: 0;
|
||||
inset-inline-start: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
overflow: hidden;
|
||||
color: inherit;
|
||||
background-color: var(--wa-color-surface-raised);
|
||||
border: none;
|
||||
box-shadow: var(--wa-shadow-l);
|
||||
overflow: auto;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
animation-duration: var(--show-duration);
|
||||
animation-timing-function: ease;
|
||||
|
||||
&.show::backdrop {
|
||||
animation: show-backdrop var(--show-duration, 200ms) ease;
|
||||
}
|
||||
|
||||
&.hide::backdrop {
|
||||
animation: show-backdrop var(--hide-duration, 200ms) ease reverse;
|
||||
}
|
||||
|
||||
&.show.top {
|
||||
animation: show-drawer-from-top var(--show-duration) ease;
|
||||
}
|
||||
|
||||
&.hide.top {
|
||||
animation: show-drawer-from-top var(--hide-duration) ease reverse;
|
||||
}
|
||||
|
||||
&.show.end {
|
||||
animation: show-drawer-from-end var(--show-duration) ease;
|
||||
|
||||
&:dir(rtl) {
|
||||
animation-name: show-drawer-from-start;
|
||||
}
|
||||
}
|
||||
|
||||
&.hide.end {
|
||||
animation: show-drawer-from-end var(--hide-duration) ease reverse;
|
||||
|
||||
&:dir(rtl) {
|
||||
animation-name: show-drawer-from-start;
|
||||
}
|
||||
}
|
||||
|
||||
&.show.bottom {
|
||||
animation: show-drawer-from-bottom var(--show-duration) ease;
|
||||
}
|
||||
|
||||
&.hide.bottom {
|
||||
animation: show-drawer-from-bottom var(--hide-duration) ease reverse;
|
||||
}
|
||||
|
||||
&.show.start {
|
||||
animation: show-drawer-from-start var(--show-duration) ease;
|
||||
|
||||
&:dir(rtl) {
|
||||
animation-name: show-drawer-from-end;
|
||||
}
|
||||
}
|
||||
|
||||
&.hide.start {
|
||||
animation: show-drawer-from-start var(--hide-duration) ease reverse;
|
||||
|
||||
&:dir(rtl) {
|
||||
animation-name: show-drawer-from-end;
|
||||
}
|
||||
}
|
||||
|
||||
&.pulse {
|
||||
animation: pulse 250ms ease;
|
||||
}
|
||||
}
|
||||
|
||||
.drawer:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.top {
|
||||
top: 0;
|
||||
inset-inline-end: auto;
|
||||
bottom: auto;
|
||||
inset-inline-start: 0;
|
||||
width: 100%;
|
||||
height: var(--size);
|
||||
}
|
||||
|
||||
.end {
|
||||
top: 0;
|
||||
inset-inline-end: 0;
|
||||
bottom: auto;
|
||||
inset-inline-start: auto;
|
||||
width: var(--size);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
top: auto;
|
||||
inset-inline-end: auto;
|
||||
bottom: 0;
|
||||
inset-inline-start: 0;
|
||||
width: 100%;
|
||||
height: var(--size);
|
||||
}
|
||||
|
||||
.start {
|
||||
top: 0;
|
||||
inset-inline-end: auto;
|
||||
bottom: auto;
|
||||
inset-inline-start: 0;
|
||||
width: var(--size);
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
padding-inline-start: var(--spacing);
|
||||
padding-block-end: 0;
|
||||
|
||||
/* Subtract the close button's padding so that the X is visually aligned with the edges of the dialog content */
|
||||
padding-inline-end: calc(var(--spacing) - var(--wa-form-control-padding-block));
|
||||
padding-block-start: calc(var(--spacing) - var(--wa-form-control-padding-block));
|
||||
}
|
||||
|
||||
.title {
|
||||
align-self: center;
|
||||
flex: 1 1 auto;
|
||||
font: inherit;
|
||||
font-size: var(--wa-font-size-l);
|
||||
font-weight: var(--wa-font-weight-heading);
|
||||
line-height: var(--wa-line-height-condensed);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.header-actions {
|
||||
align-self: start;
|
||||
display: flex;
|
||||
flex-shrink: 0;
|
||||
flex-wrap: wrap;
|
||||
justify-content: end;
|
||||
gap: var(--wa-space-2xs);
|
||||
padding-inline-start: var(--spacing);
|
||||
}
|
||||
|
||||
.header-actions wa-button,
|
||||
.header-actions ::slotted(wa-button) {
|
||||
flex: 0 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.body {
|
||||
flex: 1 1 auto;
|
||||
display: block;
|
||||
padding: var(--spacing);
|
||||
overflow: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: var(--wa-focus-ring);
|
||||
outline-offset: var(--wa-focus-ring-offset);
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--wa-space-xs);
|
||||
justify-content: end;
|
||||
padding: var(--spacing);
|
||||
padding-block-start: 0;
|
||||
}
|
||||
|
||||
.footer ::slotted(wa-button:not(:last-of-type)) {
|
||||
margin-inline-end: var(--wa-spacing-xs);
|
||||
}
|
||||
|
||||
.drawer::backdrop {
|
||||
/*
|
||||
NOTE: the ::backdrop element doesn't inherit properly in Safari yet, but it will in 17.4! At that time, we can
|
||||
remove the fallback values here.
|
||||
*/
|
||||
background-color: var(--wa-color-overlay-modal, rgb(0 0 0 / 0.25));
|
||||
backdrop-filter: var(--backdrop-filter);
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
scale: 1;
|
||||
}
|
||||
50% {
|
||||
scale: 1.01;
|
||||
}
|
||||
100% {
|
||||
scale: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes show-drawer {
|
||||
from {
|
||||
opacity: 0;
|
||||
scale: 0.8;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
scale: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes show-drawer-from-top {
|
||||
from {
|
||||
opacity: 0;
|
||||
translate: 0 -100%;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
translate: 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes show-drawer-from-end {
|
||||
from {
|
||||
opacity: 0;
|
||||
translate: 100%;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
translate: 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes show-drawer-from-bottom {
|
||||
from {
|
||||
opacity: 0;
|
||||
translate: 0 100%;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
translate: 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes show-drawer-from-start {
|
||||
from {
|
||||
opacity: 0;
|
||||
translate: -100% 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
translate: 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes show-backdrop {
|
||||
from {
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
.drawer {
|
||||
border: solid 1px white;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
drawer_styles_default
|
||||
};
|
||||
117
chrome/static/wa/chunks/chunk.CXF4H6Y3.js
Normal file
117
chrome/static/wa/chunks/chunk.CXF4H6Y3.js
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
WebAwesomeElement,
|
||||
n,
|
||||
r,
|
||||
t
|
||||
} from "./chunk.LBLI4KS5.js";
|
||||
import {
|
||||
LocalizeController
|
||||
} from "./chunk.DL7HG4WM.js";
|
||||
import {
|
||||
x
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
import {
|
||||
__decorateClass
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/components/relative-time/relative-time.ts
|
||||
var availableUnits = [
|
||||
{ max: 276e4, value: 6e4, unit: "minute" },
|
||||
// max 46 minutes
|
||||
{ max: 72e6, value: 36e5, unit: "hour" },
|
||||
// max 20 hours
|
||||
{ max: 5184e5, value: 864e5, unit: "day" },
|
||||
// max 6 days
|
||||
{ max: 24192e5, value: 6048e5, unit: "week" },
|
||||
// max 28 days
|
||||
{ max: 28512e6, value: 2592e6, unit: "month" },
|
||||
// max 11 months
|
||||
{ max: Infinity, value: 31536e6, unit: "year" }
|
||||
];
|
||||
var WaRelativeTime = class extends WebAwesomeElement {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.localize = new LocalizeController(this);
|
||||
this.isoTime = "";
|
||||
this.relativeTime = "";
|
||||
this.date = /* @__PURE__ */ new Date();
|
||||
this.format = "long";
|
||||
this.numeric = "auto";
|
||||
this.sync = false;
|
||||
this.referenceDate = null;
|
||||
}
|
||||
disconnectedCallback() {
|
||||
super.disconnectedCallback();
|
||||
clearTimeout(this.updateTimeout);
|
||||
}
|
||||
willUpdate(changedProperties) {
|
||||
const now = this.referenceDate || /* @__PURE__ */ new Date();
|
||||
const then = new Date(this.date);
|
||||
if (isNaN(then.getMilliseconds())) {
|
||||
this.relativeTime = "";
|
||||
this.isoTime = "";
|
||||
return super.willUpdate(changedProperties);
|
||||
}
|
||||
const diff = then.getTime() - now.getTime();
|
||||
const { unit, value } = availableUnits.find((singleUnit) => Math.abs(diff) < singleUnit.max);
|
||||
this.isoTime = then.toISOString();
|
||||
this.relativeTime = this.localize.relativeTime(Math.round(diff / value), unit, {
|
||||
numeric: this.numeric,
|
||||
style: this.format
|
||||
});
|
||||
clearTimeout(this.updateTimeout);
|
||||
if (this.sync) {
|
||||
let nextInterval;
|
||||
if (unit === "minute") {
|
||||
nextInterval = getTimeUntilNextUnit("second");
|
||||
} else if (unit === "hour") {
|
||||
nextInterval = getTimeUntilNextUnit("minute");
|
||||
} else if (unit === "day") {
|
||||
nextInterval = getTimeUntilNextUnit("hour");
|
||||
} else {
|
||||
nextInterval = getTimeUntilNextUnit("day");
|
||||
}
|
||||
this.updateTimeout = setTimeout(() => this.requestUpdate(), nextInterval);
|
||||
}
|
||||
}
|
||||
render() {
|
||||
if (this.relativeTime === "" && this.isoTime === "") {
|
||||
return "";
|
||||
}
|
||||
return x`<time datetime=${this.isoTime}>${this.relativeTime}</time>`;
|
||||
}
|
||||
};
|
||||
__decorateClass([
|
||||
r()
|
||||
], WaRelativeTime.prototype, "isoTime", 2);
|
||||
__decorateClass([
|
||||
r()
|
||||
], WaRelativeTime.prototype, "relativeTime", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaRelativeTime.prototype, "date", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaRelativeTime.prototype, "format", 2);
|
||||
__decorateClass([
|
||||
n()
|
||||
], WaRelativeTime.prototype, "numeric", 2);
|
||||
__decorateClass([
|
||||
n({ type: Boolean })
|
||||
], WaRelativeTime.prototype, "sync", 2);
|
||||
__decorateClass([
|
||||
r()
|
||||
], WaRelativeTime.prototype, "referenceDate", 2);
|
||||
WaRelativeTime = __decorateClass([
|
||||
t("wa-relative-time")
|
||||
], WaRelativeTime);
|
||||
function getTimeUntilNextUnit(unit) {
|
||||
const units = { second: 1e3, minute: 6e4, hour: 36e5, day: 864e5 };
|
||||
const value = units[unit];
|
||||
return value - Date.now() % value;
|
||||
}
|
||||
|
||||
export {
|
||||
WaRelativeTime
|
||||
};
|
||||
145
chrome/static/wa/chunks/chunk.CYF6RIMN.js
Normal file
145
chrome/static/wa/chunks/chunk.CYF6RIMN.js
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
comparison_styles_default
|
||||
} from "./chunk.SUZTEJNL.js";
|
||||
import {
|
||||
drag
|
||||
} from "./chunk.WYNTFJHW.js";
|
||||
import {
|
||||
clamp
|
||||
} from "./chunk.O6IZ4I7T.js";
|
||||
import {
|
||||
o
|
||||
} from "./chunk.BQNDCXAL.js";
|
||||
import {
|
||||
watch
|
||||
} from "./chunk.PZAN6FPN.js";
|
||||
import {
|
||||
WebAwesomeElement,
|
||||
e,
|
||||
n,
|
||||
t
|
||||
} from "./chunk.LBLI4KS5.js";
|
||||
import {
|
||||
LocalizeController
|
||||
} from "./chunk.DL7HG4WM.js";
|
||||
import {
|
||||
x
|
||||
} from "./chunk.BKE5EYM3.js";
|
||||
import {
|
||||
__decorateClass
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/components/comparison/comparison.ts
|
||||
var WaComparison = class extends WebAwesomeElement {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.localize = new LocalizeController(this);
|
||||
this.position = 50;
|
||||
}
|
||||
handleDrag(event) {
|
||||
const { width } = this.getBoundingClientRect();
|
||||
const isRtl = this.localize.dir() === "rtl";
|
||||
event.preventDefault();
|
||||
drag(this, {
|
||||
onMove: (x2) => {
|
||||
this.customStates.set("dragging", true);
|
||||
this.position = parseFloat(clamp(x2 / width * 100, 0, 100).toFixed(2));
|
||||
if (isRtl) this.position = 100 - this.position;
|
||||
},
|
||||
onStop: () => {
|
||||
this.customStates.set("dragging", false);
|
||||
},
|
||||
initialEvent: event
|
||||
});
|
||||
}
|
||||
handleKeyDown(event) {
|
||||
const isLtr = this.matches(":dir(ltr)");
|
||||
const isRtl = this.localize.dir() === "rtl";
|
||||
if (["ArrowLeft", "ArrowRight", "Home", "End"].includes(event.key)) {
|
||||
const incr = event.shiftKey ? 10 : 1;
|
||||
let newPosition = this.position;
|
||||
event.preventDefault();
|
||||
if (isLtr && event.key === "ArrowLeft" || isRtl && event.key === "ArrowRight") {
|
||||
newPosition -= incr;
|
||||
}
|
||||
if (isLtr && event.key === "ArrowRight" || isRtl && event.key === "ArrowLeft") {
|
||||
newPosition += incr;
|
||||
}
|
||||
if (event.key === "Home") {
|
||||
newPosition = 0;
|
||||
}
|
||||
if (event.key === "End") {
|
||||
newPosition = 100;
|
||||
}
|
||||
newPosition = clamp(newPosition, 0, 100);
|
||||
this.position = newPosition;
|
||||
}
|
||||
}
|
||||
handlePositionChange() {
|
||||
this.dispatchEvent(new Event("change", { bubbles: true, composed: true }));
|
||||
}
|
||||
render() {
|
||||
const isRtl = this.hasUpdated ? this.localize.dir() === "rtl" : this.dir === "rtl";
|
||||
return x`
|
||||
<div id="comparison" class="image" part="base comparison">
|
||||
<div part="before" class="before">
|
||||
<slot name="before"></slot>
|
||||
</div>
|
||||
|
||||
<div
|
||||
part="after"
|
||||
class="after"
|
||||
style=${o({
|
||||
clipPath: isRtl ? `inset(0 0 0 ${100 - this.position}%)` : `inset(0 ${100 - this.position}% 0 0)`
|
||||
})}
|
||||
>
|
||||
<slot name="after"></slot>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
part="divider"
|
||||
class="divider"
|
||||
style=${o({
|
||||
left: isRtl ? `${100 - this.position}%` : `${this.position}%`
|
||||
})}
|
||||
@keydown=${this.handleKeyDown}
|
||||
@mousedown=${this.handleDrag}
|
||||
@touchstart=${this.handleDrag}
|
||||
>
|
||||
<div
|
||||
part="handle"
|
||||
class="handle"
|
||||
role="scrollbar"
|
||||
aria-valuenow=${this.position}
|
||||
aria-valuemin="0"
|
||||
aria-valuemax="100"
|
||||
aria-controls="comparison"
|
||||
tabindex="0"
|
||||
>
|
||||
<slot name="handle">
|
||||
<wa-icon library="system" name="grip-vertical" variant="solid"></wa-icon>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
};
|
||||
WaComparison.css = comparison_styles_default;
|
||||
__decorateClass([
|
||||
e(".handle")
|
||||
], WaComparison.prototype, "handle", 2);
|
||||
__decorateClass([
|
||||
n({ type: Number, reflect: true })
|
||||
], WaComparison.prototype, "position", 2);
|
||||
__decorateClass([
|
||||
watch("position", { waitUntilFirstUpdate: true })
|
||||
], WaComparison.prototype, "handlePositionChange", 1);
|
||||
WaComparison = __decorateClass([
|
||||
t("wa-comparison")
|
||||
], WaComparison);
|
||||
|
||||
export {
|
||||
WaComparison
|
||||
};
|
||||
27
chrome/static/wa/chunks/chunk.D2XOEELP.js
Normal file
27
chrome/static/wa/chunks/chunk.D2XOEELP.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
o,
|
||||
require_react
|
||||
} from "./chunk.XJOHOSCS.js";
|
||||
import {
|
||||
WaCheckboxGroup
|
||||
} from "./chunk.J2WRH4YL.js";
|
||||
import {
|
||||
__toESM
|
||||
} from "./chunk.JHZRD2LV.js";
|
||||
|
||||
// src/react/checkbox-group/index.ts
|
||||
var React = __toESM(require_react(), 1);
|
||||
var tagName = "wa-checkbox-group";
|
||||
var reactWrapper = o({
|
||||
tagName,
|
||||
elementClass: WaCheckboxGroup,
|
||||
react: React,
|
||||
events: {},
|
||||
displayName: "WaCheckboxGroup"
|
||||
});
|
||||
var checkbox_group_default = reactWrapper;
|
||||
|
||||
export {
|
||||
checkbox_group_default
|
||||
};
|
||||
42
chrome/static/wa/chunks/chunk.D5FEZLQU.js
Normal file
42
chrome/static/wa/chunks/chunk.D5FEZLQU.js
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
i
|
||||
} from "./chunk.TLFIX76K.js";
|
||||
|
||||
// src/components/stepper/stepper.styles.ts
|
||||
var stepper_styles_default = i`
|
||||
@layer wa-component {
|
||||
:host {
|
||||
--gap: var(--wa-space-l);
|
||||
--marker-size: 2em;
|
||||
--connector-color: var(--wa-color-neutral-fill-normal);
|
||||
--connector-width: var(--wa-border-width-m);
|
||||
--connector-gap: 0.35em;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.stepper {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.steps {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
gap: var(--gap);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
:host([orientation='vertical']) .steps,
|
||||
:host(:state(stacked)) .steps {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export {
|
||||
stepper_styles_default
|
||||
};
|
||||
189
chrome/static/wa/chunks/chunk.D5HA4OFX.js
Normal file
189
chrome/static/wa/chunks/chunk.D5HA4OFX.js
Normal file
|
|
@ -0,0 +1,189 @@
|
|||
/*! Copyright 2026 Fonticons, Inc. - https://webawesome.com/license */
|
||||
import {
|
||||
registerTranslation
|
||||
} from "./chunk.HOKYDFUG.js";
|
||||
|
||||
// src/translations/en.ts
|
||||
var translation = {
|
||||
$code: "en",
|
||||
$name: "English",
|
||||
$dir: "ltr",
|
||||
allTagsRemoved: "All tags removed",
|
||||
am: "AM",
|
||||
autosizeColumn: "Autosize column",
|
||||
captions: "Captions",
|
||||
carousel: "Carousel",
|
||||
chooseDate: "Choose date",
|
||||
chooseDecade: "Choose decade",
|
||||
chooseMonth: "Choose month",
|
||||
chooseTime: "Choose time",
|
||||
chooseYear: "Choose year",
|
||||
clearEntry: "Clear entry",
|
||||
clearFilter: "Clear filter",
|
||||
clearSort: "Clear sort",
|
||||
close: "Close",
|
||||
closeCalendar: "Close calendar",
|
||||
closeTimeInput: "Close time picker",
|
||||
collapseRow: "Collapse row",
|
||||
columnMenu: "Column options",
|
||||
columnMovedToPosition: (label, position, total) => `${label} moved to position ${position} of ${total}`,
|
||||
columns: "Columns",
|
||||
compactPageXOfY: (page, total) => `${page} of ${total}`,
|
||||
completed: "Completed",
|
||||
copied: "Copied",
|
||||
copy: "Copy",
|
||||
createOption: (value) => `Create "${value}"`,
|
||||
currentlyPlaying: "currently playing",
|
||||
currentValue: "Current value",
|
||||
date: "Date",
|
||||
datePickerKeyboardHelp: "Use arrow keys to change values; press Alt+Down Arrow to open the calendar.",
|
||||
day: "Day",
|
||||
dayPeriod: "AM/PM",
|
||||
decrement: "Decrement",
|
||||
deselectAllRows: "Deselect all rows",
|
||||
disabled: "Disabled",
|
||||
dropFileHere: "Drop file here or click to browse",
|
||||
dropFilesHere: "Drop files here or click to browse",
|
||||
empty: "Empty",
|
||||
endDate: "End date",
|
||||
enterFullscreen: "Enter fullscreen",
|
||||
error: "Error",
|
||||
exitFullscreen: "Exit fullscreen",
|
||||
expandRow: "Expand row",
|
||||
filterByColumn: (label) => `Filter by ${label}`,
|
||||
filterFrom: "From",
|
||||
filterMax: "Max",
|
||||
filterMin: "Min",
|
||||
filterTo: "To",
|
||||
firstPage: "First page",
|
||||
goToSlide: (slide, count) => `Go to slide ${slide} of ${count}`,
|
||||
hideColumn: "Hide column",
|
||||
hidePassword: "Hide password",
|
||||
hour: "Hour",
|
||||
incompleteDate: "Enter a valid date.",
|
||||
increment: "Increment",
|
||||
jumpBackwardX: (count) => `Jump back ${count} pages`,
|
||||
jumpForwardX: (count) => `Jump forward ${count} pages`,
|
||||
lastPage: "Last page",
|
||||
loading: "Loading",
|
||||
locked: "Locked",
|
||||
minute: "Minute",
|
||||
month: "Month",
|
||||
moreOptions: "More Options",
|
||||
mute: "Mute",
|
||||
nextDecade: "Next decade",
|
||||
nextMonth: "Next month",
|
||||
nextPage: "Next page",
|
||||
nextSlide: "Next slide",
|
||||
nextVideo: "Next Video",
|
||||
nextYear: "Next year",
|
||||
noData: "No data",
|
||||
noOptions: "No options",
|
||||
noResults: "No matching results",
|
||||
notCompleted: "Not completed",
|
||||
now: "Now",
|
||||
numCharacters: (num) => {
|
||||
if (num === 1) return "1 character";
|
||||
return `${num} characters`;
|
||||
},
|
||||
numCharactersRemaining: (num) => {
|
||||
if (num === 1) return "1 character remaining";
|
||||
return `${num} characters remaining`;
|
||||
},
|
||||
numOptionsAvailable: (num) => {
|
||||
if (num === 0) return "No options available";
|
||||
if (num === 1) return "1 option available";
|
||||
return `${num} options available`;
|
||||
},
|
||||
numOptionsSelected: (num) => {
|
||||
if (num === 0) return "No options selected";
|
||||
if (num === 1) return "1 option selected";
|
||||
return `${num} options selected`;
|
||||
},
|
||||
numRowsCopied: (num) => num === 1 ? "1 row copied" : `${num} rows copied`,
|
||||
numRowsSelected: (num) => num === 1 ? "1 row selected" : `${num} rows selected`,
|
||||
optionPosition: (label, position, total) => `${label}, ${position} of ${total}`,
|
||||
optionsLoadError: "Options could not be loaded",
|
||||
pageXOfY: (page, total) => `Page ${page} of ${total}`,
|
||||
pagination: "Pagination",
|
||||
pause: "Pause",
|
||||
pauseAnimation: "Pause animation",
|
||||
pictureInPicture: "Picture in picture",
|
||||
pinLeft: "Pin left",
|
||||
pinRight: "Pin right",
|
||||
play: "Play",
|
||||
playAnimation: "Play animation",
|
||||
playbackSpeed: "Playback speed",
|
||||
playlist: "Playlist",
|
||||
pm: "PM",
|
||||
previousDecade: "Previous decade",
|
||||
previousMonth: "Previous month",
|
||||
previousPage: "Previous page",
|
||||
previousSlide: "Previous slide",
|
||||
previousVideo: "Previous video",
|
||||
previousYear: "Previous year",
|
||||
progress: "Progress",
|
||||
rangeTooLong: (max) => {
|
||||
if (max === 1) return "Select a range no longer than 1 day";
|
||||
return `Select a range no longer than ${max} days`;
|
||||
},
|
||||
rangeTooShort: (min) => {
|
||||
if (min === 1) return "Select a range at least 1 day long";
|
||||
return `Select a range at least ${min} days long`;
|
||||
},
|
||||
readonly: "Read-only",
|
||||
remove: "Remove",
|
||||
resetColumns: "Reset columns",
|
||||
resize: "Resize",
|
||||
resizeColumn: "Resize column",
|
||||
rowsPerPage: "Rows per page",
|
||||
scrollableRegion: "Scrollable region",
|
||||
scrollToEnd: "Scroll to end",
|
||||
scrollToStart: "Scroll to start",
|
||||
search: "Search",
|
||||
second: "Second",
|
||||
seek: "Seek",
|
||||
seekProgress: (current, duration) => `${current} of ${duration}`,
|
||||
selectAColorFromTheScreen: "Select a color from the screen",
|
||||
selectAllRows: "Select all rows",
|
||||
selected: "Selected",
|
||||
selectedDateLabel: (date) => `Selected: ${date}`,
|
||||
selectedRangeLabel: (range) => `Selected range: ${range}`,
|
||||
selectGroup: "Select group",
|
||||
selectionCleared: "Selection cleared",
|
||||
selectRow: "Select row",
|
||||
showingNofMRows: (shown, total) => `Showing ${shown} of ${total} rows`,
|
||||
showingXtoYofZ: (start, end, total) => `${start}\u2013${end} of ${total}`,
|
||||
showPassword: "Show password",
|
||||
slideNum: (slide) => `Slide ${slide}`,
|
||||
sortAscending: "Sort ascending",
|
||||
sortColumn: "Sort column",
|
||||
sortDescending: "Sort descending",
|
||||
startDate: "Start date",
|
||||
steps: "Steps",
|
||||
stepXOfY: (step, total) => `Step ${step} of ${total}`,
|
||||
tagAdded: (tag) => `${tag} added`,
|
||||
tagAlreadyAdded: (tag) => `${tag} is already added`,
|
||||
tagInputKeyboardHelp: "Press Backspace or Delete to remove this tag.",
|
||||
tagRemoved: (tag) => `${tag} removed`,
|
||||
time: "Time",
|
||||
timeInputKeyboardHelp: "Use arrow keys to change values; press Alt+Down Arrow to open the time picker.",
|
||||
today: "Today",
|
||||
toggleColorFormat: "Toggle color format",
|
||||
tooFewTags: (min) => min === 1 ? "Add at least 1 tag" : `Add at least ${min} tags`,
|
||||
tooManyTags: (max) => max === 1 ? "Add no more than 1 tag" : `Add no more than ${max} tags`,
|
||||
unmute: "Unmute",
|
||||
unpin: "Unpin",
|
||||
unpinColumn: "Unpin column",
|
||||
videoPlayer: "Video player",
|
||||
volume: "Volume",
|
||||
year: "Year",
|
||||
zoomIn: "Zoom in",
|
||||
zoomOut: "Zoom out"
|
||||
};
|
||||
registerTranslation(translation);
|
||||
var en_default = translation;
|
||||
|
||||
export {
|
||||
en_default
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue