@sypnia/ui 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +95 -2
- package/astro/ActionCard.astro +17 -0
- package/astro/ActionCardSkeleton.astro +10 -0
- package/astro/Actions.astro +6 -0
- package/astro/AgentInstall.astro +13 -0
- package/astro/Alert.astro +20 -0
- package/astro/Announcement.astro +7 -0
- package/astro/ApiReference.astro +29 -0
- package/astro/ArticleHead.astro +24 -0
- package/astro/Aside.astro +17 -0
- package/astro/AspectRatio.astro +7 -0
- package/astro/AuthLayout.astro +31 -0
- package/astro/AuthLayoutSkeleton.astro +19 -0
- package/astro/Avatar.astro +7 -0
- package/astro/AvatarGroup.astro +16 -0
- package/astro/AvatarGroupSkeleton.astro +7 -0
- package/astro/AvatarSkeleton.astro +6 -0
- package/astro/Badge.astro +8 -0
- package/astro/BadgeSkeleton.astro +6 -0
- package/astro/Banner.astro +6 -0
- package/astro/Button.astro +26 -0
- package/astro/ButtonGroup.astro +6 -0
- package/astro/CallToAction.astro +10 -0
- package/astro/Callout.astro +13 -0
- package/astro/CalloutSkeleton.astro +10 -0
- package/astro/Card.astro +11 -0
- package/astro/CardGrid.astro +9 -0
- package/astro/CardGridSkeleton.astro +7 -0
- package/astro/CardSkeleton.astro +11 -0
- package/astro/Cards.astro +16 -0
- package/astro/CardsSkeleton.astro +5 -0
- package/astro/CaseMap.astro +72 -0
- package/astro/Center.astro +7 -0
- package/astro/Changelog.astro +23 -0
- package/astro/Character.astro +7 -0
- package/astro/Checklist.astro +27 -0
- package/astro/ChecklistSkeleton.astro +10 -0
- package/astro/Chip.astro +10 -0
- package/astro/ChipSkeleton.astro +4 -0
- package/astro/Cli.astro +10 -0
- package/astro/CodeBlock.astro +20 -0
- package/astro/CodeBlockSkeleton.astro +9 -0
- package/astro/CodeTabs.astro +31 -0
- package/astro/Columns.astro +7 -0
- package/astro/Compare.astro +16 -0
- package/astro/CompareTable.astro +29 -0
- package/astro/CompareTableSkeleton.astro +12 -0
- package/astro/Container.astro +6 -0
- package/astro/CopyButton.astro +15 -0
- package/astro/Count.astro +9 -0
- package/astro/CountSkeleton.astro +4 -0
- package/astro/Delta.astro +20 -0
- package/astro/DeltaSkeleton.astro +4 -0
- package/astro/DescriptionList.astro +8 -0
- package/astro/DescriptionListSkeleton.astro +7 -0
- package/astro/Divider.astro +6 -0
- package/astro/DocsArticleSkeleton.astro +25 -0
- package/astro/DocsHead.astro +33 -0
- package/astro/DocsHeader.astro +44 -0
- package/astro/DocsHero.astro +13 -0
- package/astro/DocsShell.astro +79 -0
- package/astro/EditLink.astro +9 -0
- package/astro/EmptyState.astro +14 -0
- package/astro/Endpoint.astro +21 -0
- package/astro/ErrorItem.astro +5 -0
- package/astro/ErrorList.astro +8 -0
- package/astro/Expected.astro +8 -0
- package/astro/Faq.astro +11 -0
- package/astro/FeatureGrid.astro +11 -0
- package/astro/FeatureGridSkeleton.astro +8 -0
- package/astro/FeatureList.astro +18 -0
- package/astro/FeatureListSkeleton.astro +7 -0
- package/astro/Figure.astro +17 -0
- package/astro/FigureSkeleton.astro +9 -0
- package/astro/Fireflies.astro +8 -0
- package/astro/Glossary.astro +8 -0
- package/astro/Grid.astro +7 -0
- package/astro/Heading.astro +7 -0
- package/astro/Hero.astro +21 -0
- package/astro/Icon.astro +17 -0
- package/astro/IconButton.astro +21 -0
- package/astro/Identity.astro +7 -0
- package/astro/IdentitySkeleton.astro +10 -0
- package/astro/Install.astro +7 -0
- package/astro/Kbd.astro +4 -0
- package/astro/KeyValue.astro +6 -0
- package/astro/KeyValueSkeleton.astro +7 -0
- package/astro/Ledger.astro +6 -0
- package/astro/Logo.astro +9 -0
- package/astro/Mark.astro +1 -0
- package/astro/McpTool.astro +13 -0
- package/astro/NewCard.astro +7 -0
- package/astro/Option.astro +6 -0
- package/astro/Options.astro +6 -0
- package/astro/PackageTabs.astro +12 -0
- package/astro/Page.astro +5 -0
- package/astro/PageFeedback.astro +20 -0
- package/astro/PageHeader.astro +14 -0
- package/astro/PageHeaderSkeleton.astro +12 -0
- package/astro/PageSkeleton.astro +19 -0
- package/astro/PaginationSkeleton.astro +17 -0
- package/astro/Panel.astro +11 -0
- package/astro/PanelSkeleton.astro +10 -0
- package/astro/Param.astro +15 -0
- package/astro/Params.astro +12 -0
- package/astro/ParamsSkeleton.astro +5 -0
- package/astro/Phone.astro +6 -0
- package/astro/PlanCard.astro +27 -0
- package/astro/PlanCardSkeleton.astro +13 -0
- package/astro/PrevNext.astro +15 -0
- package/astro/PricingTable.astro +41 -0
- package/astro/PricingTableSkeleton.astro +9 -0
- package/astro/ProductGrid.astro +10 -0
- package/astro/ProductMark.astro +10 -0
- package/astro/Progress.astro +12 -0
- package/astro/ProgressSkeleton.astro +9 -0
- package/astro/Prose.astro +7 -0
- package/astro/Quote.astro +10 -0
- package/astro/QuoteSkeleton.astro +10 -0
- package/astro/Releases.astro +6 -0
- package/astro/RequestExample.astro +8 -0
- package/astro/ResponseExample.astro +9 -0
- package/astro/Row.astro +7 -0
- package/astro/Says.astro +6 -0
- package/astro/ScrollArea.astro +7 -0
- package/astro/Search.astro +36 -0
- package/astro/SearchResult.astro +8 -0
- package/astro/SearchResultSkeleton.astro +5 -0
- package/astro/Section.astro +17 -0
- package/astro/SectionSkeleton.astro +9 -0
- package/astro/Setting.astro +19 -0
- package/astro/Show.astro +6 -0
- package/astro/SideNav.astro +40 -0
- package/astro/SideNavSkeleton.astro +13 -0
- package/astro/SiteFooter.astro +14 -0
- package/astro/SiteHeader.astro +28 -0
- package/astro/Skeleton.astro +8 -0
- package/astro/SkeletonText.astro +6 -0
- package/astro/Spacer.astro +7 -0
- package/astro/Split.astro +17 -0
- package/astro/Stack.astro +7 -0
- package/astro/Stage.astro +12 -0
- package/astro/Stat.astro +10 -0
- package/astro/StatGroup.astro +1 -0
- package/astro/StatGroupSkeleton.astro +7 -0
- package/astro/StatSkeleton.astro +10 -0
- package/astro/Status.astro +6 -0
- package/astro/StatusSkeleton.astro +4 -0
- package/astro/Step.astro +5 -0
- package/astro/Steps.astro +4 -0
- package/astro/Sticky.astro +7 -0
- package/astro/TableOfContents.astro +16 -0
- package/astro/TableOfContentsSkeleton.astro +5 -0
- package/astro/TableSkeleton.astro +16 -0
- package/astro/Tabs.astro +31 -0
- package/astro/TabsSkeleton.astro +6 -0
- package/astro/Term.astro +8 -0
- package/astro/Terms.astro +4 -0
- package/astro/Text.astro +6 -0
- package/astro/TextSkeleton.astro +9 -0
- package/astro/Toolbar.astro +7 -0
- package/astro/ToolbarGroup.astro +5 -0
- package/astro/ToolbarSeparator.astro +1 -0
- package/astro/ToolbarSkeleton.astro +6 -0
- package/astro/VersionBadge.astro +8 -0
- package/astro/_gap.ts +5 -0
- package/astro/_id.ts +3 -0
- package/astro/_locale.ts +9 -0
- package/css/base.css +92 -0
- package/css/components/actions.css +36 -0
- package/css/components/brand.css +28 -0
- package/css/components/button.css +84 -0
- package/css/components/charts-more.css +89 -0
- package/css/components/charts.css +83 -0
- package/css/components/code.css +86 -0
- package/css/components/data-display.css +105 -0
- package/css/components/data-more.css +323 -0
- package/css/components/data-table.css +146 -0
- package/css/components/docs.css +451 -0
- package/css/components/feedback.css +103 -0
- package/css/components/field.css +92 -0
- package/css/components/fields-advanced.css +158 -0
- package/css/components/fields-more.css +93 -0
- package/css/components/floating.css +55 -0
- package/css/components/forms.css +109 -0
- package/css/components/layout.css +97 -0
- package/css/components/nav.css +105 -0
- package/css/components/navigation.css +133 -0
- package/css/components/overlay.css +112 -0
- package/css/components/primitives.css +15 -0
- package/css/components/screens.css +42 -0
- package/css/components/shell.css +118 -0
- package/css/components/site.css +114 -0
- package/css/components/status.css +81 -0
- package/css/components/surface.css +69 -0
- package/css/components/table.css +49 -0
- package/css/components/viz.css +117 -0
- package/css/fonts.css +8 -0
- package/css/index.css +34 -0
- package/css/tokens.css +409 -0
- package/dist/chunk-6X3IJPUY.js +699 -0
- package/dist/chunk-AXIJDECU.js +97 -0
- package/dist/chunk-O5ZNXHSV.js +86 -0
- package/dist/dom/elements.d.ts +2 -0
- package/dist/dom/elements.js +539 -0
- package/dist/dom/index.d.ts +51 -0
- package/dist/dom/index.js +2 -0
- package/dist/i18n/index.d.ts +659 -0
- package/dist/i18n/index.js +1 -0
- package/dist/react/index.d.ts +4455 -0
- package/dist/react/index.js +8208 -0
- package/dist/tokens/index.d.ts +64 -0
- package/dist/tokens/index.js +49 -0
- package/fonts/LICENSE-instrument-sans.txt +93 -0
- package/fonts/LICENSE-literata.txt +93 -0
- package/fonts/LICENSE-martian-mono.txt +93 -0
- package/fonts/instrument-sans.woff2 +0 -0
- package/fonts/literata-italic.woff2 +0 -0
- package/fonts/literata-roman.woff2 +0 -0
- package/fonts/martian-mono.woff2 +0 -0
- package/icons/sprite.svg +1 -0
- package/icons/svg/accessibility.svg +1 -0
- package/icons/svg/agent.svg +1 -0
- package/icons/svg/alert.svg +1 -0
- package/icons/svg/align-center.svg +1 -0
- package/icons/svg/align-left.svg +1 -0
- package/icons/svg/align-right.svg +1 -0
- package/icons/svg/api.svg +1 -0
- package/icons/svg/archive.svg +1 -0
- package/icons/svg/arrow-down-left.svg +1 -0
- package/icons/svg/arrow-down-right.svg +1 -0
- package/icons/svg/arrow-down.svg +1 -0
- package/icons/svg/arrow-left.svg +1 -0
- package/icons/svg/arrow-right.svg +1 -0
- package/icons/svg/arrow-up-left.svg +1 -0
- package/icons/svg/arrow-up-right.svg +1 -0
- package/icons/svg/arrow-up.svg +1 -0
- package/icons/svg/at.svg +1 -0
- package/icons/svg/audit.svg +1 -0
- package/icons/svg/award.svg +1 -0
- package/icons/svg/backend.svg +1 -0
- package/icons/svg/backup.svg +1 -0
- package/icons/svg/bag.svg +1 -0
- package/icons/svg/ban.svg +1 -0
- package/icons/svg/bank.svg +1 -0
- package/icons/svg/bell-off.svg +1 -0
- package/icons/svg/bell.svg +1 -0
- package/icons/svg/bold.svg +1 -0
- package/icons/svg/bolt.svg +1 -0
- package/icons/svg/book-open.svg +1 -0
- package/icons/svg/book.svg +1 -0
- package/icons/svg/bookmark.svg +1 -0
- package/icons/svg/box.svg +1 -0
- package/icons/svg/braces.svg +1 -0
- package/icons/svg/brackets.svg +1 -0
- package/icons/svg/browser.svg +1 -0
- package/icons/svg/brush.svg +1 -0
- package/icons/svg/bug.svg +1 -0
- package/icons/svg/calendar-check.svg +1 -0
- package/icons/svg/calendar-plus.svg +1 -0
- package/icons/svg/calendar.svg +1 -0
- package/icons/svg/camera.svg +1 -0
- package/icons/svg/cards.svg +1 -0
- package/icons/svg/cart.svg +1 -0
- package/icons/svg/certificate.svg +1 -0
- package/icons/svg/chart-area.svg +1 -0
- package/icons/svg/chart-bar.svg +1 -0
- package/icons/svg/chart-line.svg +1 -0
- package/icons/svg/chart-parts.svg +1 -0
- package/icons/svg/chart-scatter.svg +1 -0
- package/icons/svg/chat.svg +1 -0
- package/icons/svg/chats.svg +1 -0
- package/icons/svg/check-small.svg +1 -0
- package/icons/svg/check.svg +1 -0
- package/icons/svg/chevron-down.svg +1 -0
- package/icons/svg/chevron-left.svg +1 -0
- package/icons/svg/chevron-right.svg +1 -0
- package/icons/svg/chevron-up.svg +1 -0
- package/icons/svg/chevrons-down.svg +1 -0
- package/icons/svg/chevrons-left.svg +1 -0
- package/icons/svg/chevrons-right.svg +1 -0
- package/icons/svg/chevrons-up-down.svg +1 -0
- package/icons/svg/chevrons-up.svg +1 -0
- package/icons/svg/clipboard-check.svg +1 -0
- package/icons/svg/clipboard.svg +1 -0
- package/icons/svg/clock.svg +1 -0
- package/icons/svg/close-small.svg +1 -0
- package/icons/svg/close.svg +1 -0
- package/icons/svg/cloud-download.svg +1 -0
- package/icons/svg/cloud-off.svg +1 -0
- package/icons/svg/cloud-upload.svg +1 -0
- package/icons/svg/cloud.svg +1 -0
- package/icons/svg/code.svg +1 -0
- package/icons/svg/coins.svg +1 -0
- package/icons/svg/collapse.svg +1 -0
- package/icons/svg/columns.svg +1 -0
- package/icons/svg/comment.svg +1 -0
- package/icons/svg/commit.svg +1 -0
- package/icons/svg/compass.svg +1 -0
- package/icons/svg/contact.svg +1 -0
- package/icons/svg/container.svg +1 -0
- package/icons/svg/copy.svg +1 -0
- package/icons/svg/cpu.svg +1 -0
- package/icons/svg/credit-card.svg +1 -0
- package/icons/svg/cron.svg +1 -0
- package/icons/svg/crop.svg +1 -0
- package/icons/svg/crown.svg +1 -0
- package/icons/svg/csv.svg +1 -0
- package/icons/svg/cursor.svg +1 -0
- package/icons/svg/dark-mode.svg +1 -0
- package/icons/svg/dashboard.svg +1 -0
- package/icons/svg/data.svg +1 -0
- package/icons/svg/dead-click.svg +1 -0
- package/icons/svg/density.svg +1 -0
- package/icons/svg/deploy.svg +1 -0
- package/icons/svg/desktop.svg +1 -0
- package/icons/svg/disk.svg +1 -0
- package/icons/svg/dns.svg +1 -0
- package/icons/svg/dollar.svg +1 -0
- package/icons/svg/domain.svg +1 -0
- package/icons/svg/dot-off.svg +1 -0
- package/icons/svg/dot.svg +1 -0
- package/icons/svg/download.svg +1 -0
- package/icons/svg/duplicate.svg +1 -0
- package/icons/svg/edit.svg +1 -0
- package/icons/svg/engine.svg +1 -0
- package/icons/svg/enter.svg +1 -0
- package/icons/svg/environment.svg +1 -0
- package/icons/svg/equal.svg +1 -0
- package/icons/svg/eraser.svg +1 -0
- package/icons/svg/error.svg +1 -0
- package/icons/svg/expand.svg +1 -0
- package/icons/svg/export.svg +1 -0
- package/icons/svg/external.svg +1 -0
- package/icons/svg/eye-off.svg +1 -0
- package/icons/svg/failure.svg +1 -0
- package/icons/svg/fast-forward.svg +1 -0
- package/icons/svg/file-check.svg +1 -0
- package/icons/svg/file-code.svg +1 -0
- package/icons/svg/file-lock.svg +1 -0
- package/icons/svg/file-plus.svg +1 -0
- package/icons/svg/file-table.svg +1 -0
- package/icons/svg/file-text.svg +1 -0
- package/icons/svg/file.svg +1 -0
- package/icons/svg/files.svg +1 -0
- package/icons/svg/filter.svg +1 -0
- package/icons/svg/fingerprint.svg +1 -0
- package/icons/svg/fire.svg +1 -0
- package/icons/svg/firewall.svg +1 -0
- package/icons/svg/fix.svg +1 -0
- package/icons/svg/flag.svg +1 -0
- package/icons/svg/folder-open.svg +1 -0
- package/icons/svg/folder-plus.svg +1 -0
- package/icons/svg/folder.svg +1 -0
- package/icons/svg/fork.svg +1 -0
- package/icons/svg/fullscreen-exit.svg +1 -0
- package/icons/svg/fullscreen.svg +1 -0
- package/icons/svg/function.svg +1 -0
- package/icons/svg/funnel.svg +1 -0
- package/icons/svg/gauge.svg +1 -0
- package/icons/svg/gift.svg +1 -0
- package/icons/svg/git-branch.svg +1 -0
- package/icons/svg/globe.svg +1 -0
- package/icons/svg/grid.svg +1 -0
- package/icons/svg/grip.svg +1 -0
- package/icons/svg/hand.svg +1 -0
- package/icons/svg/handshake.svg +1 -0
- package/icons/svg/hash.svg +1 -0
- package/icons/svg/heading.svg +1 -0
- package/icons/svg/heart.svg +1 -0
- package/icons/svg/heatmap.svg +1 -0
- package/icons/svg/help.svg +1 -0
- package/icons/svg/highlight.svg +1 -0
- package/icons/svg/history.svg +1 -0
- package/icons/svg/home.svg +1 -0
- package/icons/svg/hourglass.svg +1 -0
- package/icons/svg/id-card.svg +1 -0
- package/icons/svg/idea.svg +1 -0
- package/icons/svg/image.svg +1 -0
- package/icons/svg/import.svg +1 -0
- package/icons/svg/inbox.svg +1 -0
- package/icons/svg/incognito.svg +1 -0
- package/icons/svg/indent.svg +1 -0
- package/icons/svg/index.svg +1 -0
- package/icons/svg/info.svg +1 -0
- package/icons/svg/invoice.svg +1 -0
- package/icons/svg/italic.svg +1 -0
- package/icons/svg/json.svg +1 -0
- package/icons/svg/kanban.svg +1 -0
- package/icons/svg/key.svg +1 -0
- package/icons/svg/keyboard.svg +1 -0
- package/icons/svg/laptop.svg +1 -0
- package/icons/svg/layers.svg +1 -0
- package/icons/svg/layout.svg +1 -0
- package/icons/svg/leaf.svg +1 -0
- package/icons/svg/light.svg +1 -0
- package/icons/svg/link.svg +1 -0
- package/icons/svg/list-checks.svg +1 -0
- package/icons/svg/list-ordered.svg +1 -0
- package/icons/svg/list.svg +1 -0
- package/icons/svg/load-balancer.svg +1 -0
- package/icons/svg/lock.svg +1 -0
- package/icons/svg/log-in.svg +1 -0
- package/icons/svg/logs.svg +1 -0
- package/icons/svg/mail-open.svg +1 -0
- package/icons/svg/mail.svg +1 -0
- package/icons/svg/map.svg +1 -0
- package/icons/svg/mcp.svg +1 -0
- package/icons/svg/megaphone.svg +1 -0
- package/icons/svg/memory.svg +1 -0
- package/icons/svg/menu.svg +1 -0
- package/icons/svg/merge.svg +1 -0
- package/icons/svg/mic-off.svg +1 -0
- package/icons/svg/mic.svg +1 -0
- package/icons/svg/migrate.svg +1 -0
- package/icons/svg/minus-circle.svg +1 -0
- package/icons/svg/minus.svg +1 -0
- package/icons/svg/mobile.svg +1 -0
- package/icons/svg/moon.svg +1 -0
- package/icons/svg/more-vertical.svg +1 -0
- package/icons/svg/more.svg +1 -0
- package/icons/svg/mouse.svg +1 -0
- package/icons/svg/move.svg +1 -0
- package/icons/svg/mute.svg +1 -0
- package/icons/svg/network.svg +1 -0
- package/icons/svg/notebook.svg +1 -0
- package/icons/svg/null.svg +1 -0
- package/icons/svg/open-source.svg +1 -0
- package/icons/svg/organization.svg +1 -0
- package/icons/svg/outdent.svg +1 -0
- package/icons/svg/p-agent.svg +1 -0
- package/icons/svg/p-ai.svg +1 -0
- package/icons/svg/p-app.svg +1 -0
- package/icons/svg/p-cases.svg +1 -0
- package/icons/svg/p-data.svg +1 -0
- package/icons/svg/p-design.svg +1 -0
- package/icons/svg/p-domains.svg +1 -0
- package/icons/svg/p-files.svg +1 -0
- package/icons/svg/p-git.svg +1 -0
- package/icons/svg/p-learn.svg +1 -0
- package/icons/svg/p-mail.svg +1 -0
- package/icons/svg/p-run.svg +1 -0
- package/icons/svg/p-skills.svg +1 -0
- package/icons/svg/p-telemetry.svg +1 -0
- package/icons/svg/p-ui.svg +1 -0
- package/icons/svg/palette.svg +1 -0
- package/icons/svg/panel-bottom.svg +1 -0
- package/icons/svg/paperclip.svg +1 -0
- package/icons/svg/paragraph.svg +1 -0
- package/icons/svg/password.svg +1 -0
- package/icons/svg/paste.svg +1 -0
- package/icons/svg/pause.svg +1 -0
- package/icons/svg/pending.svg +1 -0
- package/icons/svg/percent.svg +1 -0
- package/icons/svg/performance.svg +1 -0
- package/icons/svg/phone.svg +1 -0
- package/icons/svg/picture-in-picture.svg +1 -0
- package/icons/svg/pin.svg +1 -0
- package/icons/svg/pipeline.svg +1 -0
- package/icons/svg/plan.svg +1 -0
- package/icons/svg/play.svg +1 -0
- package/icons/svg/plug.svg +1 -0
- package/icons/svg/plus-circle.svg +1 -0
- package/icons/svg/plus.svg +1 -0
- package/icons/svg/pointer.svg +1 -0
- package/icons/svg/policy.svg +1 -0
- package/icons/svg/power.svg +1 -0
- package/icons/svg/primary-key.svg +1 -0
- package/icons/svg/print.svg +1 -0
- package/icons/svg/prompt.svg +1 -0
- package/icons/svg/pull-request.svg +1 -0
- package/icons/svg/puzzle.svg +1 -0
- package/icons/svg/qr-code.svg +1 -0
- package/icons/svg/query.svg +1 -0
- package/icons/svg/queue.svg +1 -0
- package/icons/svg/quote.svg +1 -0
- package/icons/svg/rage-click.svg +1 -0
- package/icons/svg/receipt.svg +1 -0
- package/icons/svg/record.svg +1 -0
- package/icons/svg/redo.svg +1 -0
- package/icons/svg/refresh.svg +1 -0
- package/icons/svg/region.svg +1 -0
- package/icons/svg/relation.svg +1 -0
- package/icons/svg/release.svg +1 -0
- package/icons/svg/replay.svg +1 -0
- package/icons/svg/rewind.svg +1 -0
- package/icons/svg/robot.svg +1 -0
- package/icons/svg/rocket.svg +1 -0
- package/icons/svg/role.svg +1 -0
- package/icons/svg/rollback.svg +1 -0
- package/icons/svg/route.svg +1 -0
- package/icons/svg/rows.svg +1 -0
- package/icons/svg/rss.svg +1 -0
- package/icons/svg/ruler.svg +1 -0
- package/icons/svg/save.svg +1 -0
- package/icons/svg/scan.svg +1 -0
- package/icons/svg/scissors.svg +1 -0
- package/icons/svg/sdk.svg +1 -0
- package/icons/svg/search.svg +1 -0
- package/icons/svg/secret.svg +1 -0
- package/icons/svg/seed.svg +1 -0
- package/icons/svg/select.svg +1 -0
- package/icons/svg/self-host.svg +1 -0
- package/icons/svg/send.svg +1 -0
- package/icons/svg/server.svg +1 -0
- package/icons/svg/settings.svg +1 -0
- package/icons/svg/share.svg +1 -0
- package/icons/svg/shield-alert.svg +1 -0
- package/icons/svg/shield-off.svg +1 -0
- package/icons/svg/shield-user.svg +1 -0
- package/icons/svg/shield.svg +1 -0
- package/icons/svg/sidebar-left.svg +1 -0
- package/icons/svg/sidebar-right.svg +1 -0
- package/icons/svg/sign-out.svg +1 -0
- package/icons/svg/signals-in.svg +1 -0
- package/icons/svg/skip-back.svg +1 -0
- package/icons/svg/skip-forward.svg +1 -0
- package/icons/svg/slash.svg +1 -0
- package/icons/svg/sleep.svg +1 -0
- package/icons/svg/sliders.svg +1 -0
- package/icons/svg/sort.svg +1 -0
- package/icons/svg/sparkle.svg +1 -0
- package/icons/svg/sparkline.svg +1 -0
- package/icons/svg/split.svg +1 -0
- package/icons/svg/star.svg +1 -0
- package/icons/svg/stop.svg +1 -0
- package/icons/svg/strikethrough.svg +1 -0
- package/icons/svg/success.svg +1 -0
- package/icons/svg/suggestion.svg +1 -0
- package/icons/svg/sum.svg +1 -0
- package/icons/svg/summary.svg +1 -0
- package/icons/svg/sun.svg +1 -0
- package/icons/svg/support.svg +1 -0
- package/icons/svg/swap-vertical.svg +1 -0
- package/icons/svg/swap.svg +1 -0
- package/icons/svg/table.svg +1 -0
- package/icons/svg/tablet.svg +1 -0
- package/icons/svg/tag.svg +1 -0
- package/icons/svg/target.svg +1 -0
- package/icons/svg/team.svg +1 -0
- package/icons/svg/terminal.svg +1 -0
- package/icons/svg/test.svg +1 -0
- package/icons/svg/text.svg +1 -0
- package/icons/svg/theme.svg +1 -0
- package/icons/svg/thumbs-down.svg +1 -0
- package/icons/svg/thumbs-up.svg +1 -0
- package/icons/svg/timer.svg +1 -0
- package/icons/svg/toggle.svg +1 -0
- package/icons/svg/traces.svg +1 -0
- package/icons/svg/translate.svg +1 -0
- package/icons/svg/trash.svg +1 -0
- package/icons/svg/trend-down.svg +1 -0
- package/icons/svg/trend-up.svg +1 -0
- package/icons/svg/two-factor.svg +1 -0
- package/icons/svg/underline.svg +1 -0
- package/icons/svg/undo.svg +1 -0
- package/icons/svg/unlink.svg +1 -0
- package/icons/svg/unlock.svg +1 -0
- package/icons/svg/upgrade.svg +1 -0
- package/icons/svg/upload.svg +1 -0
- package/icons/svg/uptime.svg +1 -0
- package/icons/svg/usage.svg +1 -0
- package/icons/svg/user-check.svg +1 -0
- package/icons/svg/user-circle.svg +1 -0
- package/icons/svg/user-minus.svg +1 -0
- package/icons/svg/user-plus.svg +1 -0
- package/icons/svg/user-x.svg +1 -0
- package/icons/svg/user.svg +1 -0
- package/icons/svg/users.svg +1 -0
- package/icons/svg/variable.svg +1 -0
- package/icons/svg/verified.svg +1 -0
- package/icons/svg/video.svg +1 -0
- package/icons/svg/volume.svg +1 -0
- package/icons/svg/wallet.svg +1 -0
- package/icons/svg/wand.svg +1 -0
- package/icons/svg/warning.svg +1 -0
- package/icons/svg/watch.svg +1 -0
- package/icons/svg/wave.svg +1 -0
- package/icons/svg/web.svg +1 -0
- package/icons/svg/webhook.svg +1 -0
- package/icons/svg/wifi-off.svg +1 -0
- package/icons/svg/wifi.svg +1 -0
- package/icons/svg/window.svg +1 -0
- package/icons/svg/zoom-in.svg +1 -0
- package/icons/svg/zoom-out.svg +1 -0
- package/package.json +108 -4
- package/src/characters/data.ts +13 -0
- package/src/characters/index.ts +23 -0
- package/src/dom/search.ts +59 -0
- package/src/i18n/index.ts +140 -0
- package/src/icons/data.ts +760 -0
- package/tokens/tokens.json +625 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The use-case map of a product, drawn as a constellation, with no JavaScript: every point of light is something a
|
|
3
|
+
// person can do, every line a flow. A pulse follows one journey; a request outside the map shows dim with a dashed
|
|
4
|
+
// ring. The same markup and classes as the React CaseMap, and the same words for whoever cannot see it.
|
|
5
|
+
// Points can be buttons for a page script: `interactive` adds role="button", tabindex and data-case to each.
|
|
6
|
+
import { formatters } from '../src/i18n/index';
|
|
7
|
+
import { wordsOf } from './_locale';
|
|
8
|
+
interface UseCase { id: string; name: string; x: number; y: number; focal?: boolean; out?: boolean; note?: string }
|
|
9
|
+
interface Props {
|
|
10
|
+
cases: UseCase[];
|
|
11
|
+
edges: { from: string; to: string; bend?: number }[];
|
|
12
|
+
journey?: string[];
|
|
13
|
+
actors?: { start?: string; end?: string };
|
|
14
|
+
label: string;
|
|
15
|
+
interactive?: boolean;
|
|
16
|
+
width?: number;
|
|
17
|
+
height?: number;
|
|
18
|
+
idPrefix?: string;
|
|
19
|
+
locale?: string;
|
|
20
|
+
}
|
|
21
|
+
const { cases, edges, journey = [], actors, label, interactive, width = 640, height = 470, idPrefix = 'cm' } = Astro.props;
|
|
22
|
+
const { t, locale } = wordsOf(Astro);
|
|
23
|
+
const list = formatters(locale).list;
|
|
24
|
+
const by = new Map(cases.map((c) => [c.id, c]));
|
|
25
|
+
const curve = (a: UseCase, b: UseCase, bend: number) => {
|
|
26
|
+
const mx = (a.x + b.x) / 2, my = (a.y + b.y) / 2, dx = b.x - a.x, dy = b.y - a.y;
|
|
27
|
+
const c = [mx - dy * bend, my + dx * bend];
|
|
28
|
+
return { d: `M${a.x},${a.y} Q${c[0].toFixed(1)},${c[1].toFixed(1)} ${b.x},${b.y}`, c };
|
|
29
|
+
};
|
|
30
|
+
const flow = journey.slice(1).map((b, i) => {
|
|
31
|
+
const a = journey[i], A = by.get(a), B = by.get(b);
|
|
32
|
+
if (!A || !B) return '';
|
|
33
|
+
const e = edges.find((x) => (x.from === a && x.to === b) || (x.from === b && x.to === a));
|
|
34
|
+
const bend = e ? (e.from === a ? e.bend ?? 0 : -(e.bend ?? 0)) : 0;
|
|
35
|
+
const { c } = curve(A, B, bend);
|
|
36
|
+
return `${i === 0 ? `M${A.x},${A.y} ` : ''}Q${c[0].toFixed(1)},${c[1].toFixed(1)} ${B.x},${B.y}`;
|
|
37
|
+
}).join(' ');
|
|
38
|
+
const name = (c?: UseCase) => (c ? c.name.replace(/\n/g, ' ') : '');
|
|
39
|
+
---
|
|
40
|
+
<figure class="sy-casemap" aria-label={label}>
|
|
41
|
+
<svg class:list={['sy-casemap__svg', interactive && 'sy-casemap__svg--live']} viewBox={`0 0 ${width} ${height}`} role={interactive ? 'group' : 'img'} aria-label={label}>
|
|
42
|
+
<defs><radialGradient id={`${idPrefix}-halo`}><stop offset="0" class="sy-casemap__glow" stop-opacity=".5" /><stop offset="1" class="sy-casemap__glow" stop-opacity="0" /></radialGradient></defs>
|
|
43
|
+
{actors?.start && <text class="sy-casemap__actor" x="24" y={height - 18}>{actors.start}</text>}
|
|
44
|
+
{actors?.end && <text class="sy-casemap__actor" x={width - 24} y="28" text-anchor="end">{actors.end}</text>}
|
|
45
|
+
{edges.map((e) => { const A = by.get(e.from), B = by.get(e.to); return A && B && <path class="sy-casemap__edge" d={curve(A, B, e.bend ?? 0).d} />; })}
|
|
46
|
+
{flow && <path class="sy-casemap__flow" d={flow} />}
|
|
47
|
+
{flow && <circle class="sy-casemap__pulse" r="4"><animateMotion dur="7.5s" repeatCount="indefinite" path={flow} /></circle>}
|
|
48
|
+
{cases.map((c) => {
|
|
49
|
+
const lines = c.name.split('\n');
|
|
50
|
+
return (
|
|
51
|
+
<g class:list={['sy-casemap__case', c.focal && 'is-focal', c.out && 'is-out']} data-case={interactive ? c.id : undefined} role={interactive ? 'button' : undefined}
|
|
52
|
+
tabindex={interactive ? 0 : undefined} aria-label={interactive ? `${lines.join(' ')}${c.out ? `, ${c.note ?? t('outOfMap')}` : ''}` : undefined}>
|
|
53
|
+
<circle class="sy-casemap__hit" cx={c.x} cy={c.y} r="30" />
|
|
54
|
+
{c.out
|
|
55
|
+
? <><circle class="sy-casemap__ring" cx={c.x} cy={c.y} r="13" /><circle class="sy-casemap__node sy-casemap__node--out" cx={c.x} cy={c.y} r="4" /></>
|
|
56
|
+
: <><circle class="sy-casemap__halo" cx={c.x} cy={c.y} r={c.focal ? 34 : 22} fill={`url(#${idPrefix}-halo)`} /><circle class="sy-casemap__node" cx={c.x} cy={c.y} r={c.focal ? 8 : 5.5} /></>}
|
|
57
|
+
<text class="sy-casemap__label" x={c.x} y={c.y + (c.focal ? 34 : 28)} text-anchor="middle">
|
|
58
|
+
{lines.map((l, i) => <tspan x={c.x} dy={i === 0 ? 0 : "1.15em"}>{l}</tspan>)}
|
|
59
|
+
{c.out && <tspan class="sy-casemap__why" x={c.x} dy="1.3em">{c.note ?? t('outOfMap')}</tspan>}
|
|
60
|
+
</text>
|
|
61
|
+
</g>
|
|
62
|
+
);
|
|
63
|
+
})}
|
|
64
|
+
</svg>
|
|
65
|
+
<details class="sy-figure__alt">
|
|
66
|
+
<summary>{t('casesMap')}</summary>
|
|
67
|
+
<div>
|
|
68
|
+
<ul>{cases.filter((c) => !c.out).map((c) => { const to = edges.filter((e) => e.from === c.id).map((e) => name(by.get(e.to))); return <li>{name(c)}{to.length > 0 && ` → ${list(to)}`}</li>; })}</ul>
|
|
69
|
+
{cases.some((c) => c.out) && <p>{cases.filter((c) => c.out).map((c) => `${name(c)}: ${c.note ?? t('outOfMap')}`).join('. ')}</p>}
|
|
70
|
+
</div>
|
|
71
|
+
</details>
|
|
72
|
+
</figure>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Puts its content in the middle, both ways. `minHeight` gives it room to be in the middle of.
|
|
3
|
+
import { styleOf } from './_gap';
|
|
4
|
+
interface Props { minHeight?: string; class?: string }
|
|
5
|
+
const { minHeight, class: className } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<div class:list={['sy-center', className]} style={styleOf({ '--min-h': minHeight })}><slot /></div>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
// What changed, version by version: the newest first, each change marked added, changed, fixed or removed.
|
|
3
|
+
import { formatters } from '../src/i18n/index';
|
|
4
|
+
import { wordsOf } from './_locale';
|
|
5
|
+
interface Change { kind: 'added' | 'changed' | 'fixed' | 'removed'; text: string }
|
|
6
|
+
interface Release { version: string; date?: string; title?: string; changes: Change[] }
|
|
7
|
+
interface Props { releases: Release[]; locale?: string }
|
|
8
|
+
const { releases } = Astro.props;
|
|
9
|
+
const { t, locale } = wordsOf(Astro);
|
|
10
|
+
const f = formatters(locale);
|
|
11
|
+
const tone = { added: 'sy-badge--ok', changed: 'sy-badge--info', fixed: 'sy-badge--outline', removed: 'sy-badge--warn' } as const;
|
|
12
|
+
---
|
|
13
|
+
<ol class="sy-changes" role="list" aria-label={t('changelog')}>
|
|
14
|
+
{releases.map((r) => (
|
|
15
|
+
<li class="sy-change" id={`v${r.version.replace(/[^0-9a-z.-]/gi, '')}`}>
|
|
16
|
+
<div class="sy-change__when"><span class="sy-change__version">{r.version}</span>{r.date && <time datetime={r.date}>{f.date(r.date)}</time>}</div>
|
|
17
|
+
<div class="sy-change__body">
|
|
18
|
+
{r.title && <p class="sy-change__title">{r.title}</p>}
|
|
19
|
+
<ul class="sy-change__list" role="list">{r.changes.map((c) => <li><span><span class:list={['sy-badge', tone[c.kind]]}>{t(c.kind)}</span></span><span set:html={c.text} /></li>)}</ul>
|
|
20
|
+
</div>
|
|
21
|
+
</li>
|
|
22
|
+
))}
|
|
23
|
+
</ol>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Nia or Nio: the two characters that keep the light. For empty states, waits and moments worth celebrating.
|
|
3
|
+
import { characterSvg, type CharacterName } from '../src/characters/index';
|
|
4
|
+
interface Props { name: CharacterName; label?: string; size?: string; class?: string }
|
|
5
|
+
const { name, label, size, class: className } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<span class:list={['sy-character', className]} style={size ? `--size:${size}` : undefined} role={label ? undefined : 'presentation'} set:html={characterSvg(name, label)} />
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The steps to get something ready, and how many are done. Each step can link to where it is done (`href`, `action`).
|
|
3
|
+
import Icon from './Icon.astro';
|
|
4
|
+
import { formatters } from '../src/i18n/index';
|
|
5
|
+
import { wordsOf } from './_locale';
|
|
6
|
+
interface Props { title: string; items: { id: string; title: string; description?: string; done?: boolean; href?: string; action?: string }[]; locale?: string }
|
|
7
|
+
const { title, items } = Astro.props;
|
|
8
|
+
const { t, locale } = wordsOf(Astro);
|
|
9
|
+
const n = formatters(locale).number;
|
|
10
|
+
const done = items.filter((i) => i.done).length;
|
|
11
|
+
---
|
|
12
|
+
<section class="sy-checklist" aria-label={title}>
|
|
13
|
+
<header class="sy-checklist__head">
|
|
14
|
+
<h3 class="sy-checklist__title">{title}</h3>
|
|
15
|
+
<span class="sy-checklist__count sy-num">{t('checklistOf', { done: n(done), total: n(items.length) })}</span>
|
|
16
|
+
<span class="sy-checklist__bar" aria-hidden="true"><i style={`inline-size: ${items.length ? (done / items.length) * 100 : 0}%`} /></span>
|
|
17
|
+
</header>
|
|
18
|
+
<ol class="sy-checklist__list">
|
|
19
|
+
{items.map((it) => (
|
|
20
|
+
<li class:list={['sy-checklist__item', it.done && 'sy-checklist__item--done']}>
|
|
21
|
+
<span class="sy-checklist__mark" role="img" aria-label={t(it.done ? 'stepDone' : 'stepTodo')}>{it.done && <Icon name="check-small" />}</span>
|
|
22
|
+
<div class="sy-checklist__text"><span class="sy-checklist__name">{it.title}</span>{it.description && !it.done && <span class="sy-checklist__desc">{it.description}</span>}</div>
|
|
23
|
+
{it.href && it.action && !it.done && <div class="sy-checklist__action"><a class="sy-btn sy-btn--secondary sy-btn--sm" href={it.href}>{it.action}</a></div>}
|
|
24
|
+
</li>
|
|
25
|
+
))}
|
|
26
|
+
</ol>
|
|
27
|
+
</section>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A Checklist before its steps are known: the title, the count, the bar and each step.
|
|
3
|
+
interface Props { items?: number }
|
|
4
|
+
const { items = 4 } = Astro.props;
|
|
5
|
+
const W = ['62%', '48%', '71%', '55%', '66%', '40%'];
|
|
6
|
+
---
|
|
7
|
+
<section class="sy-checklist" data-skeleton aria-hidden="true">
|
|
8
|
+
<div class="sy-checklist__head"><span class="sy-checklist__title"><span class="sy-skeleton sy-skeleton--text" style="width:10rem"></span></span><span class="sy-checklist__count"><span class="sy-skeleton sy-skeleton--text" style="width:5rem"></span></span><span class="sy-checklist__bar"></span></div>
|
|
9
|
+
<ol class="sy-checklist__list">{Array.from({ length: items }, (_, i) => <li class="sy-checklist__item"><span class="sy-checklist__mark"></span><div class="sy-checklist__text"><span class="sy-checklist__name"><span class="sy-skeleton sy-skeleton--text" style={`width:${W[i % 6]}`}></span></span></div></li>)}</ol>
|
|
10
|
+
</section>
|
package/astro/Chip.astro
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A thing itself: a tag, a choice that is on. Static here: with `href` it is a link, otherwise a label.
|
|
3
|
+
// To toggle or remove chips, use the React Chip in an island.
|
|
4
|
+
import Icon from './Icon.astro';
|
|
5
|
+
import type { IconName } from '../src/icons/data';
|
|
6
|
+
interface Props { icon?: IconName; selected?: boolean; href?: string; class?: string }
|
|
7
|
+
const { icon, selected, href, class: className } = Astro.props;
|
|
8
|
+
const Tag = href ? 'a' : 'span';
|
|
9
|
+
---
|
|
10
|
+
<Tag class:list={['sy-chip', className]} href={href} data-selected={selected ? '' : undefined} aria-current={href && selected ? 'true' : undefined}>{icon && <Icon name={icon} />}<slot /></Tag>
|
package/astro/Cli.astro
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
// One command to type, with its copy button and, optionally, what it prints (slot `output`).
|
|
3
|
+
import CodeBlock from './CodeBlock.astro';
|
|
4
|
+
interface Props { command: string; locale?: string }
|
|
5
|
+
const { command, locale } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<div class="sy-stack" style="--gap:var(--s-2)">
|
|
8
|
+
<CodeBlock code={command} lang="sh" bare locale={locale} />
|
|
9
|
+
{Astro.slots.has('output') && <div class="sy-code" data-lang="text"><pre><slot name="output" /></pre></div>}
|
|
10
|
+
</div>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Code to read and copy, highlighted at build time (Shiki, through astro:components) in the colours of the surface.
|
|
3
|
+
// `title` names the file; `mark` lights lines (1-based); `bare` drops the bar (a one-liner with its copy button).
|
|
4
|
+
import { Code } from 'astro:components';
|
|
5
|
+
import CopyButton from './CopyButton.astro';
|
|
6
|
+
import { wordsOf } from './_locale';
|
|
7
|
+
interface Props { code: string; lang?: string; title?: string; mark?: number[]; bare?: boolean; wrap?: boolean; locale?: string; class?: string }
|
|
8
|
+
const { code, lang = 'text', title, mark = [], bare = false, wrap = false, class: className } = Astro.props;
|
|
9
|
+
const { locale } = wordsOf(Astro);
|
|
10
|
+
const clean = code.replace(/^\n+|\s+$/g, '');
|
|
11
|
+
const transformers = mark.length ? [{ line(node: any, line: number) { if (mark.includes(line)) (this as any).addClassToHast(node, 'is-mark'); } }] : [];
|
|
12
|
+
const langName = ({ ts: 'TypeScript', tsx: 'TSX', js: 'JavaScript', jsx: 'JSX', sh: 'Shell', bash: 'Shell', json: 'JSON', astro: 'Astro', css: 'CSS', html: 'HTML', py: 'Python', python: 'Python', go: 'Go', yaml: 'YAML', sql: 'SQL', text: '' } as Record<string, string>)[lang] ?? lang;
|
|
13
|
+
---
|
|
14
|
+
<div class:list={['sy-code', bare && 'sy-code--bare', wrap && 'sy-code--wrap', className]} data-lang={lang}>
|
|
15
|
+
{!bare && (
|
|
16
|
+
<div class="sy-code__bar">{title ? <span class="sy-code__title">{title}</span> : <span class="sy-code__lang">{langName}</span>}<CopyButton value={clean} iconOnly locale={locale} /></div>
|
|
17
|
+
)}
|
|
18
|
+
<Code code={clean} lang={lang as any} theme="css-variables" transformers={transformers as any} />
|
|
19
|
+
{bare && <span class="sy-code__copy"><CopyButton value={clean} iconOnly locale={locale} /></span>}
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A code block while it loads: the bar and its lines.
|
|
3
|
+
interface Props { lines?: number; bare?: boolean }
|
|
4
|
+
const { lines = 4, bare } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<div class:list={['sy-code', bare && 'sy-code--bare']} data-skeleton aria-hidden="true">
|
|
7
|
+
{!bare && <div class="sy-code__bar"><span class="sy-skeleton sy-skeleton--text" style="--w:5rem"></span></div>}
|
|
8
|
+
<pre>{Array.from({ length: lines }, (_, i) => <span class="sy-skeleton sy-skeleton--text" style={`--w:${30 + ((i * 29) % 55)}%;margin-block:0.5em`}></span>)}</pre>
|
|
9
|
+
</div>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The same code in several languages or tools, one at a time, with the choice remembered across the site (`sync`):
|
|
3
|
+
// <CodeTabs sync="lang" items={[{ label: 'TypeScript', lang: 'ts', code: '…' }, { label: 'Python', lang: 'python', code: '…' }]} />
|
|
4
|
+
import { Code } from 'astro:components';
|
|
5
|
+
import CopyButton from './CopyButton.astro';
|
|
6
|
+
import { nextId } from './_id';
|
|
7
|
+
import { wordsOf } from './_locale';
|
|
8
|
+
interface Item { label: string; code: string; lang?: string; id?: string }
|
|
9
|
+
interface Props { items: Item[]; sync?: string; label?: string; title?: string; locale?: string }
|
|
10
|
+
const { items, sync, title } = Astro.props;
|
|
11
|
+
const { t, locale } = wordsOf(Astro);
|
|
12
|
+
const label = Astro.props.label ?? t('type');
|
|
13
|
+
const uid = nextId('code');
|
|
14
|
+
const id = (i: Item) => i.id ?? i.label.toLowerCase().replace(/[^a-z0-9]+/g, '-');
|
|
15
|
+
---
|
|
16
|
+
<div class="sy-code">
|
|
17
|
+
<sy-tabs sync={sync}>
|
|
18
|
+
<div class="sy-code__bar">
|
|
19
|
+
<div role="tablist" class="sy-tabs" aria-label={title ?? label}>
|
|
20
|
+
{items.map((i, n) => <button type="button" role="tab" class="sy-tab" id={`${uid}-t${n}`} aria-controls={`${uid}-p${n}`} aria-selected={n === 0 ? 'true' : 'false'} tabindex={n === 0 ? 0 : -1} data-value={id(i)}>{i.label}</button>)}
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
{items.map((i, n) => (
|
|
24
|
+
<div role="tabpanel" class="sy-tabpanel" id={`${uid}-p${n}`} aria-labelledby={`${uid}-t${n}`} hidden={n !== 0}>
|
|
25
|
+
<p class="sy-tabpanel__label">{i.label}</p>
|
|
26
|
+
<span class="sy-code__copy"><CopyButton value={i.code.trim()} iconOnly locale={locale} /></span>
|
|
27
|
+
<Code code={i.code.trim()} lang={(i.lang ?? 'text') as any} theme="css-variables" />
|
|
28
|
+
</div>
|
|
29
|
+
))}
|
|
30
|
+
</sy-tabs>
|
|
31
|
+
</div>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A fixed number of equal columns; two at most on phones, or one with `stack`.
|
|
3
|
+
import { gapVar, styleOf, type Gap } from './_gap';
|
|
4
|
+
interface Props { as?: string; gap?: Gap; cols?: number; stack?: boolean; class?: string; id?: string }
|
|
5
|
+
const { as: Tag = 'div', gap, cols = 2, stack, class: className, id } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<Tag id={id} class:list={['sy-cols', stack && 'sy-cols--stack', className]} style={styleOf({ '--gap': gapVar(gap), '--cols': cols })}><slot /></Tag>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Two sides of one thing, row by row: the open-source engine and the Cloud, a plan and another. On phones each row
|
|
3
|
+
// stacks, with the name of each side above its cell.
|
|
4
|
+
import Icon from './Icon.astro';
|
|
5
|
+
import type { IconName } from '../src/icons/data';
|
|
6
|
+
interface Side { name: string; kind?: string; icon?: IconName }
|
|
7
|
+
interface Row { label: string; values: [string, string] }
|
|
8
|
+
interface Props { sides: [Side, Side]; rows: Row[]; caption: string }
|
|
9
|
+
const { sides, rows, caption } = Astro.props;
|
|
10
|
+
---
|
|
11
|
+
<table class="sy-compare">
|
|
12
|
+
<caption class="sy-sr-only">{caption}</caption>
|
|
13
|
+
<colgroup><col class="sy-compare__label" /><col /><col /></colgroup>
|
|
14
|
+
<thead><tr><td></td>{sides.map((s) => <th scope="col"><span class="sy-compare__side">{s.icon && <Icon name={s.icon} />}<b>{s.name}</b>{s.kind && <span>{s.kind}</span>}</span></th>)}</tr></thead>
|
|
15
|
+
<tbody>{rows.map((r) => <tr><th scope="row">{r.label}</th>{r.values.map((v, i) => <td data-side={sides[i]!.name} set:html={v} />)}</tr>)}</tbody>
|
|
16
|
+
</table>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Options compared on the same points: columns are the options, rows the points. true and false are a check and a
|
|
3
|
+
// dash, said in words. On phones each point is a card that lists every option.
|
|
4
|
+
import Icon from './Icon.astro';
|
|
5
|
+
import { wordsOf } from './_locale';
|
|
6
|
+
type Value = string | boolean | null;
|
|
7
|
+
interface Props { columns: { id: string; label: string; lit?: boolean }[]; rows: { id: string; label: string; hint?: string; values: Record<string, Value> }[]; caption: string; rowHeader?: string; locale?: string }
|
|
8
|
+
const { columns, rows, caption, rowHeader = '' } = Astro.props;
|
|
9
|
+
const { t } = wordsOf(Astro);
|
|
10
|
+
---
|
|
11
|
+
<div class="sy-table-wrap sy-comparetable">
|
|
12
|
+
<table class="sy-table sy-table--cards sy-comparetable__table">
|
|
13
|
+
<caption class="sy-sr-only">{caption}</caption>
|
|
14
|
+
<thead><tr><th scope="col">{rowHeader || <span class="sy-sr-only">{caption}</span>}</th>{columns.map((c) => <th scope="col" class:list={[c.lit && 'is-lit']}>{c.label}</th>)}</tr></thead>
|
|
15
|
+
<tbody>
|
|
16
|
+
{rows.map((r) => (
|
|
17
|
+
<tr>
|
|
18
|
+
<th scope="row" data-title="">{r.label}{r.hint && <small class="sy-comparetable__hint">{r.hint}</small>}</th>
|
|
19
|
+
{columns.map((c) => {
|
|
20
|
+
const v = r.values[c.id];
|
|
21
|
+
return <td class:list={[c.lit && 'is-lit']} data-label={c.label}>{v === true
|
|
22
|
+
? <span class="sy-comparetable__yes"><Icon name="check-small" /><span class="sy-sr-only">{t('included')}</span></span>
|
|
23
|
+
: v === false || v === null || v === undefined ? <span class="sy-comparetable__no"><Icon name="minus" /><span class="sy-sr-only">{t('notIncluded')}</span></span> : v}</td>;
|
|
24
|
+
})}
|
|
25
|
+
</tr>
|
|
26
|
+
))}
|
|
27
|
+
</tbody>
|
|
28
|
+
</table>
|
|
29
|
+
</div>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A CompareTable before its options are known: the header row and a row per feature.
|
|
3
|
+
interface Props { columns?: number; rows?: number }
|
|
4
|
+
const { columns = 3, rows = 5 } = Astro.props;
|
|
5
|
+
const W = ['62%', '48%', '71%', '55%', '66%', '40%'];
|
|
6
|
+
---
|
|
7
|
+
<div class="sy-table-wrap sy-comparetable" data-skeleton aria-hidden="true">
|
|
8
|
+
<table class="sy-table sy-table--cards sy-comparetable__table">
|
|
9
|
+
<thead><tr><th><span class="sy-skeleton sy-skeleton--text" style="width:6rem"></span></th>{Array.from({ length: columns }, () => <th><span class="sy-skeleton sy-skeleton--text" style="width:5rem"></span></th>)}</tr></thead>
|
|
10
|
+
<tbody>{Array.from({ length: rows }, (_, r) => <tr><th data-title=""><span class="sy-skeleton sy-skeleton--text" style={`width:${W[r % 6]}`}></span></th>{Array.from({ length: columns }, () => <td><span class="sy-skeleton sy-skeleton--text" style="width:2rem"></span></td>)}</tr>)}</tbody>
|
|
11
|
+
</table>
|
|
12
|
+
</div>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The page's width, centred, with the gutter on both sides. `narrow` for reading, `wide` for dashboards.
|
|
3
|
+
interface Props { as?: string; size?: 'narrow' | 'page' | 'wide'; class?: string; id?: string }
|
|
4
|
+
const { as: Tag = 'div', size = 'page', class: className, id } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<Tag id={id} class:list={['sy-wrap', size !== 'page' && `sy-wrap--${size}`, className]}><slot /></Tag>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Copies a text, or the text of an element (`for` = its id). Works through the <sy-copy> custom element:
|
|
3
|
+
// import '@sypnia/ui/dom/elements' once on the page.
|
|
4
|
+
import Icon from './Icon.astro';
|
|
5
|
+
import { wordsOf } from './_locale';
|
|
6
|
+
interface Props { value?: string; for?: string; label?: string; size?: 'sm' | 'md'; variant?: 'quiet' | 'secondary'; iconOnly?: boolean; locale?: string; class?: string }
|
|
7
|
+
const { value, for: target, label, size = 'sm', variant = 'quiet', iconOnly, class: className } = Astro.props;
|
|
8
|
+
const { t } = wordsOf(Astro);
|
|
9
|
+
const name = label ?? t('copy');
|
|
10
|
+
---
|
|
11
|
+
<sy-copy value={value} for={target} done={t('copied')} class={className}>
|
|
12
|
+
<button type="button" class:list={['sy-btn', `sy-btn--${variant}`, size === 'sm' && 'sy-btn--sm', iconOnly && 'sy-btn--icon']} aria-label={iconOnly ? name : undefined} title={iconOnly ? name : undefined}>
|
|
13
|
+
<Icon name="copy" />{!iconOnly && <span data-label>{name}</span>}
|
|
14
|
+
</button>
|
|
15
|
+
</sy-copy>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A number on its own: unread, waiting, failed. Above 999 it shortens (1.2K).
|
|
3
|
+
import { formatters } from '../src/i18n/index';
|
|
4
|
+
import { localeOf } from './_locale';
|
|
5
|
+
interface Props { value: number; tone?: 'info' | 'ok' | 'warn' | 'fail' | 'neutral' | 'light'; label?: string; locale?: string }
|
|
6
|
+
const { value, tone = 'neutral', label } = Astro.props;
|
|
7
|
+
const shown = value > 999 ? formatters(localeOf(Astro)).compact(value) : value;
|
|
8
|
+
---
|
|
9
|
+
<span class:list={['sy-badge sy-badge--count', tone !== 'neutral' && `sy-badge--${tone}`]} role={label ? 'img' : undefined} aria-label={label}>{shown}</span>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
// How much a number moved: an arrow, the change, and whether that is good, in colour and in words.
|
|
3
|
+
import Icon from './Icon.astro';
|
|
4
|
+
import { formatters } from '../src/i18n/index';
|
|
5
|
+
import { wordsOf } from './_locale';
|
|
6
|
+
interface Props { value: number; as?: 'percent' | 'number'; goodWhen?: 'up' | 'down' | 'none'; flatWithin?: number; digits?: number; suffix?: string; locale?: string }
|
|
7
|
+
const { value, as = 'percent', goodWhen = 'up', flatWithin = 0, digits, suffix } = Astro.props;
|
|
8
|
+
const { t, locale } = wordsOf(Astro);
|
|
9
|
+
const format = formatters(locale);
|
|
10
|
+
const dir = Math.abs(value) <= flatWithin ? 'flat' : value > 0 ? 'up' : 'down';
|
|
11
|
+
const abs = Math.abs(value);
|
|
12
|
+
const text = as === 'percent' ? format.percent(abs, digits ?? (abs < 0.1 ? 1 : 0)) : format.number(abs, { maximumFractionDigits: digits ?? 2 });
|
|
13
|
+
const tone = dir === 'flat' || goodWhen === 'none' ? 'flat' : dir === goodWhen ? 'good' : 'bad';
|
|
14
|
+
const said = dir === 'flat' ? t('deltaFlat') : t(dir === 'up' ? 'deltaUp' : 'deltaDown', { value: text });
|
|
15
|
+
---
|
|
16
|
+
<span class:list={['sy-delta', `sy-delta--${tone}`]}>
|
|
17
|
+
<Icon name={dir === 'flat' ? 'minus' : dir === 'up' ? 'arrow-up-right' : 'arrow-down-right'} />
|
|
18
|
+
<span aria-hidden="true">{dir === 'flat' ? t('deltaFlat') : text}</span><span class="sy-sr-only">{said}</span>
|
|
19
|
+
{suffix && <span class="sy-delta__suffix">{suffix}</span>}
|
|
20
|
+
</span>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The facts of one thing, by name, in columns: terms above their values; one column on phones.
|
|
3
|
+
interface Props { items: { term: string; description: string; hint?: string }[]; columns?: 1 | 2 | 3 }
|
|
4
|
+
const { items, columns = 2 } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<dl class:list={['sy-dlist', `sy-dlist--${columns}`]}>
|
|
7
|
+
{items.map((it) => <div class="sy-dlist__item"><dt>{it.term}</dt><dd>{it.description}{it.hint && <span class="sy-dlist__hint">{it.hint}</span>}</dd></div>)}
|
|
8
|
+
</dl>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A DescriptionList before its facts are known: each name and its value, in the same columns.
|
|
3
|
+
interface Props { items?: number; columns?: 1 | 2 | 3 }
|
|
4
|
+
const { items = 4, columns = 2 } = Astro.props;
|
|
5
|
+
const W = ['62%', '48%', '71%', '55%', '66%', '40%'];
|
|
6
|
+
---
|
|
7
|
+
<dl class:list={['sy-dlist', `sy-dlist--${columns}`]} data-skeleton aria-hidden="true">{Array.from({ length: items }, (_, i) => <div class="sy-dlist__item"><dt><span class="sy-skeleton sy-skeleton--text" style={`width:${['5rem', '7rem', '4rem', '6rem'][i % 4]}`}></span></dt><dd><span class="sy-skeleton sy-skeleton--text" style={`width:${W[(i + 2) % 6]}`}></span></dd></div>)}</dl>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A line between things. With `label` it carries a word in the middle («or»); `vertical` between items of a row.
|
|
3
|
+
interface Props { vertical?: boolean; label?: string; class?: string }
|
|
4
|
+
const { vertical, label, class: className } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
{label ? <div role="separator" class:list={['sy-divider sy-divider--label', className]}>{label}</div> : <hr class:list={['sy-divider', vertical && 'sy-divider--v', className]} aria-orientation={vertical ? 'vertical' : undefined} />}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The article while it loads: breadcrumb, title, lead, and paragraphs with a code block between them. DocsShell
|
|
3
|
+
// shows it in place of the article the moment a link to another page is pressed.
|
|
4
|
+
interface Props { paragraphs?: number; code?: boolean; toc?: boolean }
|
|
5
|
+
const { paragraphs = 3, code = true, toc = true } = Astro.props;
|
|
6
|
+
const line = (w: number) => `--w:${w}%`;
|
|
7
|
+
---
|
|
8
|
+
<div class:list={['sy-dskel', toc && 'sy-dskel--toc']} data-skeleton aria-hidden="true">
|
|
9
|
+
<div class="sy-darticle">
|
|
10
|
+
<div class="sy-ahead">
|
|
11
|
+
<span class="sy-skeleton sy-skeleton--text" style="--w:9rem;margin-bottom:1.2rem"></span>
|
|
12
|
+
<span class="sy-skeleton" style="--w:min(26rem,80%);--h:clamp(2.125rem,1.55rem + 1.7vw,3.125rem);--r:var(--r-2)"></span>
|
|
13
|
+
<span class="sy-skeleton sy-skeleton--text" style="--w:min(34rem,95%);margin-top:1.1rem;--h:1.1em"></span>
|
|
14
|
+
<span class="sy-skeleton sy-skeleton--text" style="--w:min(22rem,70%);--h:1.1em"></span>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="sy-prose" style="margin-top:1.9rem">
|
|
17
|
+
{Array.from({ length: paragraphs }, (_, p) => (
|
|
18
|
+
<>
|
|
19
|
+
<div>{[96, 92, 98, 64].map((w, i) => <span class="sy-skeleton sy-skeleton--text" style={line(w - ((p * 7 + i * 3) % 12))}></span>)}</div>
|
|
20
|
+
{code && p === 0 && <span class="sy-skeleton" style="--h:7.5rem;--r:var(--r-3)"></span>}
|
|
21
|
+
</>
|
|
22
|
+
))}
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Goes in <head> of every page that uses DocsShell. Before the first paint it applies what the person chose last time
|
|
3
|
+
// (surface, density, folded navigation), so nothing flashes.
|
|
4
|
+
// `router` (default true): moving between pages happens in place (Astro's ClientRouter): the header, the navigation
|
|
5
|
+
// and its scroll stay, the next page is fetched when the pointer rests on its link, and back and forward restore the
|
|
6
|
+
// scroll. Without JavaScript every link is a plain link. With `router={false}`, Chromium prepares the page under the
|
|
7
|
+
// pointer instead (speculation rules) and the browser loads it as usual.
|
|
8
|
+
import { ClientRouter } from 'astro:transitions';
|
|
9
|
+
interface Props { router?: boolean }
|
|
10
|
+
const { router = true } = Astro.props;
|
|
11
|
+
const rules = JSON.stringify({
|
|
12
|
+
prerender: [{ where: { and: [{ href_matches: '/*' }, { not: { selector_matches: '[data-no-prerender], [download], [target=_blank]' } }] }, eagerness: 'moderate' }],
|
|
13
|
+
});
|
|
14
|
+
---
|
|
15
|
+
<script is:inline>
|
|
16
|
+
(() => {
|
|
17
|
+
// The person's choices live on <html>. A page change in place replaces <html>'s attributes with the new page's,
|
|
18
|
+
// so they are applied again after every swap, before it is painted.
|
|
19
|
+
const apply = (d) => { try {
|
|
20
|
+
const s = localStorage.getItem('sy-surface'), n = localStorage.getItem('sy-density'), f = localStorage.getItem('sy-nav');
|
|
21
|
+
if (s) d.dataset.surface = s; if (n) d.dataset.density = n; else delete d.dataset.density;
|
|
22
|
+
if (f === 'hidden') d.dataset.nav = 'hidden'; else delete d.dataset.nav;
|
|
23
|
+
d.classList.add('sy-js');
|
|
24
|
+
} catch {} };
|
|
25
|
+
apply(document.documentElement);
|
|
26
|
+
// Pages change with no animation, so the browser's View Transitions add nothing but their overlay, which takes the
|
|
27
|
+
// pointer until it ends: a click right after a page change landed nowhere. Hidden here, before the router loads,
|
|
28
|
+
// the router swaps the page directly.
|
|
29
|
+
try { if (!window.__syKeepViewTransitions) Object.defineProperty(document, 'startViewTransition', { value: undefined, configurable: true }); } catch {}
|
|
30
|
+
if (!window.__syPrefs) { window.__syPrefs = true; document.addEventListener('astro:before-swap', (e) => apply(e.newDocument.documentElement)); }
|
|
31
|
+
})();
|
|
32
|
+
</script>
|
|
33
|
+
{router ? <ClientRouter fallback="none" /> : <script type="speculationrules" set:html={rules} />}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The top of a docs site: the navigation button on phones, the fold button on wide screens, the brand, search,
|
|
3
|
+
// the site's main links, the language, the product switcher, night or paper, and one call to action.
|
|
4
|
+
// Slots: `brand` (instead of the Sypnia logo), `tools` (more buttons before the surface switch).
|
|
5
|
+
import Icon from './Icon.astro';
|
|
6
|
+
import Kbd from './Kbd.astro';
|
|
7
|
+
import Logo from './Logo.astro';
|
|
8
|
+
import { wordsOf } from './_locale';
|
|
9
|
+
export interface DocsLink { label: string; href: string; current?: boolean }
|
|
10
|
+
export interface DocsLanguage { code: string; label: string; href: string }
|
|
11
|
+
export interface DocsProduct { label: string; href: string; note?: string; current?: boolean }
|
|
12
|
+
interface Props {
|
|
13
|
+
homeHref?: string; product?: string; section?: string;
|
|
14
|
+
links?: DocsLink[]; languages?: DocsLanguage[]; products?: DocsProduct[];
|
|
15
|
+
cta?: { label: string; href: string }; search?: boolean; locale?: string;
|
|
16
|
+
}
|
|
17
|
+
const { homeHref = '/', product, section, links = [], languages = [], products = [], cta, search = true } = Astro.props;
|
|
18
|
+
const { t, locale } = wordsOf(Astro);
|
|
19
|
+
const other = languages.filter((l) => l.code !== locale);
|
|
20
|
+
---
|
|
21
|
+
<header class="sy-dhead">
|
|
22
|
+
<div class="sy-dhead__in">
|
|
23
|
+
<button type="button" class="sy-btn sy-btn--quiet sy-btn--icon sy-dhead__menu" data-nav-open aria-expanded="false" aria-controls="sy-dside" aria-label={t('openNav')}><Icon name="menu" /></button>
|
|
24
|
+
<button type="button" class="sy-btn sy-btn--quiet sy-btn--icon sy-btn--sm sy-dhead__fold" data-nav-fold aria-expanded="true" aria-controls="sy-dside" aria-label={t('hideNav')} title={t('hideNav')}><Icon name="sidebar-left" /></button>
|
|
25
|
+
<a class="sy-dhead__brand" href={homeHref}>{Astro.slots.has('brand') ? <slot name="brand" /> : <Logo product={product} />}{section && <span class="sy-dhead__section">{section}</span>}</a>
|
|
26
|
+
<div class="sy-dhead__mid">
|
|
27
|
+
{search && <button type="button" class="sy-search-btn" data-search-open aria-haspopup="dialog"><Icon name="search" /><span>{t('searchDocs')}</span><Kbd>Ctrl K</Kbd></button>}
|
|
28
|
+
{links.length > 0 && <nav class="sy-dhead__nav" aria-label={t('mainNav')}>{links.map((l) => <a class="sy-dhead__link" href={l.href} aria-current={l.current ? 'page' : undefined}>{l.label}</a>)}</nav>}
|
|
29
|
+
</div>
|
|
30
|
+
<div class="sy-dhead__end">
|
|
31
|
+
{search && <button type="button" class="sy-btn sy-btn--quiet sy-btn--icon sy-dhead__find" data-search-open aria-haspopup="dialog" aria-label={t('searchDocs')}><Icon name="search" /></button>}
|
|
32
|
+
{other.map((l) => <a class="sy-btn sy-btn--quiet sy-btn--sm sy-dhead__lang" href={l.href} hreflang={l.code} lang={l.code} data-no-skeleton><Icon name="globe" />{l.label}</a>)}
|
|
33
|
+
<slot name="tools" />
|
|
34
|
+
{products.length > 0 && (
|
|
35
|
+
<details class="sy-dswitch">
|
|
36
|
+
<summary class="sy-btn sy-btn--quiet sy-btn--sm" aria-label={t('products')}><Icon name="grid" /></summary>
|
|
37
|
+
<ul class="sy-dswitch__menu" role="list">{products.map((p) => <li><a href={p.href} aria-current={p.current ? 'page' : undefined}>{p.label}{p.note && <small>{p.note}</small>}</a></li>)}</ul>
|
|
38
|
+
</details>
|
|
39
|
+
)}
|
|
40
|
+
<button type="button" class="sy-btn sy-btn--quiet sy-btn--icon sy-btn--sm" data-surface-toggle aria-label={t('surface')} title={t('surface')}><Icon name="moon" class="sy-surface-ico--night" /><Icon name="sun" class="sy-surface-ico--paper" /></button>
|
|
41
|
+
{cta && <a class="sy-btn sy-btn--primary sy-btn--sm" href={cta.href}>{cta.label}</a>}
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
</header>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The top of a docs home: what this documentation covers, in the voice, and where to start (slot `actions`, then
|
|
3
|
+
// anything else in the default slot: an <Install>, <Cards>).
|
|
4
|
+
interface Props { title: string; lead?: string; kicker?: string }
|
|
5
|
+
const { title, lead, kicker } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<header class="sy-dhero">
|
|
8
|
+
{kicker && <p class="sy-dhero__kicker"><span class="sy-dot"></span>{kicker}</p>}
|
|
9
|
+
<h1>{title}</h1>
|
|
10
|
+
{lead && <p class="sy-dhero__lead" set:html={lead} />}
|
|
11
|
+
{Astro.slots.has('actions') && <div class="sy-dhero__actions"><slot name="actions" /></div>}
|
|
12
|
+
<slot />
|
|
13
|
+
</header>
|