@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,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
// One input: its name, its type, whether it is required, what it does (the slot) and its default.
|
|
3
|
+
import { wordsOf } from './_locale';
|
|
4
|
+
interface Props { name: string; type?: string; required?: boolean; default?: string | number | boolean; locale?: string }
|
|
5
|
+
const { name, type, required } = Astro.props;
|
|
6
|
+
const def = Astro.props.default;
|
|
7
|
+
const { t } = wordsOf(Astro);
|
|
8
|
+
---
|
|
9
|
+
<li class="sy-param">
|
|
10
|
+
<div class="sy-param__sig">
|
|
11
|
+
<code class="sy-param__name">{name}</code>
|
|
12
|
+
<div class="sy-param__facts">{type && <span class="sy-param__type">{type}</span>}{required === true && <span class="sy-param__req">{t('required')}</span>}{required === false && <span>{t('optional')}</span>}</div>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="sy-param__text"><slot />{def !== undefined && <p class="sy-param__default">{t('defaultValue')}: <code>{String(def)}</code></p>}</div>
|
|
15
|
+
</li>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The inputs of an endpoint, a tool or a command, or the fields of a response: a list of <Param>.
|
|
3
|
+
import { wordsOf } from './_locale';
|
|
4
|
+
interface Props { title?: string; locale?: string }
|
|
5
|
+
const { title } = Astro.props;
|
|
6
|
+
const { t } = wordsOf(Astro);
|
|
7
|
+
const html = Astro.slots.has('default') ? (await Astro.slots.render('default')).trim() : '';
|
|
8
|
+
---
|
|
9
|
+
<section class="sy-params">
|
|
10
|
+
<p class="sy-params__title">{title ?? t('parameters')}</p>
|
|
11
|
+
{html ? <ul class="sy-params__list" role="list" set:html={html} /> : <p class="sy-params__none">{t('noParams')}</p>}
|
|
12
|
+
</section>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
interface Props { rows?: number }
|
|
3
|
+
const { rows = 3 } = Astro.props;
|
|
4
|
+
---
|
|
5
|
+
<section class="sy-params" data-skeleton aria-hidden="true"><span class="sy-skeleton sy-skeleton--text" style="--w:6rem"></span><ul class="sy-params__list" role="list">{Array.from({ length: rows }, (_, i) => <li class="sy-param"><span class="sy-skeleton sy-skeleton--text" style={`--w:${50 + ((i * 21) % 40)}%`}></span><span><span class="sy-skeleton sy-skeleton--text" style="--w:92%"></span><span class="sy-skeleton sy-skeleton--text" style={`--w:${45 + ((i * 17) % 35)}%`}></span></span></li>)}</ul></section>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A phone frame for a screen.
|
|
3
|
+
interface Props { url?: string; width?: string; label?: string }
|
|
4
|
+
const { url, width, label } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<figure class="sy-phone" style={`margin:0;${width ? `--phone-w:${width}` : ''}`} aria-label={label}><div class="sy-phone__screen">{url && <div class="sy-phone__bar" aria-hidden="true"><span>{url}</span></div>}<div class="sy-phone__body"><slot /></div></div></figure>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
// One plan: its name, price and period, who it is for, what it includes (FeatureList), and the way to take it
|
|
3
|
+
// (slot `action`). `lit` is the plan most people should take.
|
|
4
|
+
import FeatureList from './FeatureList.astro';
|
|
5
|
+
import { wordsOf } from './_locale';
|
|
6
|
+
interface Props {
|
|
7
|
+
name: string; price: string | number; currency?: string; period?: string; blurb?: string;
|
|
8
|
+
features?: (string | { text: string; included?: boolean; hint?: string })[];
|
|
9
|
+
lit?: boolean; current?: boolean; free?: string; locale?: string;
|
|
10
|
+
}
|
|
11
|
+
const { name, price, currency, period, blurb, features, lit, current, free } = Astro.props;
|
|
12
|
+
const { t, locale } = wordsOf(Astro);
|
|
13
|
+
const isFree = price === 0 && !!free;
|
|
14
|
+
const amount = typeof price === 'number'
|
|
15
|
+
? (isFree ? free : currency ? new Intl.NumberFormat(locale, { style: 'currency', currency, maximumFractionDigits: price % 1 ? 2 : 0 }).format(price).replace(/ /g, ' ') : String(price))
|
|
16
|
+
: price;
|
|
17
|
+
---
|
|
18
|
+
<article class:list={['sy-plan', lit && 'sy-plan--lit', current && 'sy-plan--current']}>
|
|
19
|
+
<header class="sy-plan__head">
|
|
20
|
+
<h3 class="sy-plan__name">{name}</h3>
|
|
21
|
+
{(lit || current) && <span class:list={['sy-badge', lit && !current ? 'sy-badge--light' : 'sy-badge--outline']}>{current ? t('currentPlan') : t('recommended')}</span>}
|
|
22
|
+
</header>
|
|
23
|
+
<p class="sy-plan__price"><span class="sy-plan__amount sy-num">{amount}</span>{period && !isFree && <span class="sy-plan__period">{period}</span>}</p>
|
|
24
|
+
{blurb && <p class="sy-plan__blurb">{blurb}</p>}
|
|
25
|
+
{features && features.length > 0 && <FeatureList items={features} locale={locale} />}
|
|
26
|
+
{!current && Astro.slots.has('action') && <div class="sy-plan__action"><slot name="action" /></div>}
|
|
27
|
+
</article>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A PlanCard before its plan is known: the name, the price, the line, the features and the button.
|
|
3
|
+
import FeatureListSkeleton from './FeatureListSkeleton.astro';
|
|
4
|
+
interface Props { features?: number; lit?: boolean }
|
|
5
|
+
const { features = 4, lit } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<article class:list={['sy-plan', lit && 'sy-plan--lit']} data-skeleton aria-hidden="true">
|
|
8
|
+
<div class="sy-plan__head"><span class="sy-plan__name"><span class="sy-skeleton sy-skeleton--text" style="width:5rem"></span></span></div>
|
|
9
|
+
<p class="sy-plan__price"><span class="sy-plan__amount"><span class="sy-skeleton sy-skeleton--text" style="width:4.5ch"></span></span></p>
|
|
10
|
+
<p class="sy-plan__blurb"><span class="sy-skeleton sy-skeleton--text" style="width:85%"></span></p>
|
|
11
|
+
<FeatureListSkeleton items={features} />
|
|
12
|
+
<div class="sy-plan__action"><span class="sy-skeleton sy-skeleton--ctl"></span></div>
|
|
13
|
+
</article>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The previous and the next page, at the foot of an article.
|
|
3
|
+
import Icon from './Icon.astro';
|
|
4
|
+
import { wordsOf } from './_locale';
|
|
5
|
+
interface Link { title: string; href: string }
|
|
6
|
+
interface Props { prev?: Link; next?: Link; locale?: string }
|
|
7
|
+
const { prev, next } = Astro.props;
|
|
8
|
+
const { t } = wordsOf(Astro);
|
|
9
|
+
---
|
|
10
|
+
{(prev || next) && (
|
|
11
|
+
<nav class="sy-pager" aria-label={t('pager')}>
|
|
12
|
+
{prev && <a rel="prev" href={prev.href}><small><Icon name="arrow-left" />{t('previous')}</small><b>{prev.title}</b></a>}
|
|
13
|
+
{next && <a rel="next" href={next.href}><small>{t('next')}<Icon name="arrow-right" /></small><b>{next.title}</b></a>}
|
|
14
|
+
</nav>
|
|
15
|
+
)}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Every plan side by side with what each includes: a table on wide screens, one plan at a time on phones.
|
|
3
|
+
// Each plan's button is `action: { label, href }`; the recommended plan (`lit`) gets the primary button.
|
|
4
|
+
import Icon from './Icon.astro';
|
|
5
|
+
import PlanCard from './PlanCard.astro';
|
|
6
|
+
import { wordsOf } from './_locale';
|
|
7
|
+
type Value = string | boolean | null;
|
|
8
|
+
interface Plan { id: string; name: string; price: string | number; currency?: string; period?: string; blurb?: string; lit?: boolean; current?: boolean; free?: string; action?: { label: string; href: string } }
|
|
9
|
+
interface Props { plans: Plan[]; rows: { id: string; label: string; hint?: string; values: Record<string, Value> }[]; caption: string; locale?: string }
|
|
10
|
+
const { plans, rows, caption } = Astro.props;
|
|
11
|
+
const { t, locale } = wordsOf(Astro);
|
|
12
|
+
const yes = t('included'), no = t('notIncluded');
|
|
13
|
+
---
|
|
14
|
+
<div class="sy-pricing">
|
|
15
|
+
<div class="sy-pricing__wide">
|
|
16
|
+
<table class="sy-pricing__table">
|
|
17
|
+
<caption class="sy-sr-only">{caption}</caption>
|
|
18
|
+
<thead><tr><td></td>{plans.map((p) => (
|
|
19
|
+
<th scope="col" class:list={[p.lit && 'is-lit']}>
|
|
20
|
+
<PlanCard {...p} locale={locale}>{p.action && <a slot="action" class:list={['sy-btn', p.lit ? 'sy-btn--primary' : 'sy-btn--secondary']} href={p.action.href}>{p.action.label}</a>}</PlanCard>
|
|
21
|
+
</th>
|
|
22
|
+
))}</tr></thead>
|
|
23
|
+
<tbody>
|
|
24
|
+
{rows.map((r) => (
|
|
25
|
+
<tr>
|
|
26
|
+
<th scope="row">{r.label}{r.hint && <small>{r.hint}</small>}</th>
|
|
27
|
+
{plans.map((p) => { const v = r.values[p.id]; return <td class:list={[p.lit && 'is-lit']}>{v === true ? <span class="sy-comparetable__yes"><Icon name="check-small" /><span class="sy-sr-only">{yes}</span></span> : v === false || v == null ? <span class="sy-comparetable__no"><Icon name="minus" /><span class="sy-sr-only">{no}</span></span> : v}</td>; })}
|
|
28
|
+
</tr>
|
|
29
|
+
))}
|
|
30
|
+
</tbody>
|
|
31
|
+
</table>
|
|
32
|
+
</div>
|
|
33
|
+
<div class="sy-pricing__stack">
|
|
34
|
+
{plans.map((p) => (
|
|
35
|
+
<section class="sy-pricing__plan" aria-label={p.name}>
|
|
36
|
+
<PlanCard {...p} locale={locale}>{p.action && <a slot="action" class:list={['sy-btn', p.lit ? 'sy-btn--primary' : 'sy-btn--secondary']} href={p.action.href}>{p.action.label}</a>}</PlanCard>
|
|
37
|
+
<dl class="sy-pricing__rows">{rows.map((r) => { const v = r.values[p.id]; return <div><dt>{r.label}</dt><dd>{v === true ? <span class="sy-comparetable__yes"><Icon name="check-small" /><span class="sy-sr-only">{yes}</span></span> : v === false || v == null ? <span class="sy-comparetable__no"><Icon name="minus" /><span class="sy-sr-only">{no}</span></span> : v}</dd></div>; })}</dl>
|
|
38
|
+
</section>
|
|
39
|
+
))}
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A PricingTable before its plans are known: a PlanCard skeleton per plan, the middle one lit.
|
|
3
|
+
import PlanCardSkeleton from './PlanCardSkeleton.astro';
|
|
4
|
+
interface Props { plans?: number; rows?: number }
|
|
5
|
+
const { plans = 3, rows = 5 } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<div class="sy-pricing" data-skeleton aria-hidden="true">
|
|
8
|
+
<div class="sy-card-grid" style="--min:14rem">{Array.from({ length: plans }, (_, i) => <PlanCardSkeleton features={rows} lit={i === 1} />)}</div>
|
|
9
|
+
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The products of the suite, each with its mark and what it is for.
|
|
3
|
+
import ProductMark from './ProductMark.astro';
|
|
4
|
+
type Product = 'telemetry' | 'cases' | 'agent' | 'git' | 'data' | 'files' | 'run' | 'ai' | 'mail' | 'domains' | 'design' | 'learn' | 'skills' | 'app' | 'ui';
|
|
5
|
+
interface Props { items: { product: Product; text: string; href?: string; name?: string }[]; columns?: 2 | 3 | 4; label?: string }
|
|
6
|
+
const { items, columns = 3, label } = Astro.props;
|
|
7
|
+
---
|
|
8
|
+
<ul class="sy-featuregrid" role="list" aria-label={label} style={`--cols:${columns}`}>
|
|
9
|
+
{items.map((p) => <li class="sy-featuregrid__item">{p.href ? <a href={p.href} class="sy-featuregrid__title" style="text-decoration:none"><ProductMark product={p.product} tile label={p.name} /></a> : <ProductMark product={p.product} tile label={p.name} />}<p class="sy-featuregrid__text">{p.text}</p></li>)}
|
|
10
|
+
</ul>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The mark of one product of the suite: its icon and its name.
|
|
3
|
+
import Icon from './Icon.astro';
|
|
4
|
+
import type { IconName } from '../src/icons/data';
|
|
5
|
+
const names = { telemetry: 'Telemetry', cases: 'Cases', agent: 'Agent', git: 'Git', data: 'Data', files: 'Files', run: 'Run', ai: 'AI', mail: 'Mail', domains: 'Domains', design: 'Design', learn: 'Learn', skills: 'Skills', app: 'App', ui: 'UI' } as const;
|
|
6
|
+
interface Props { product: keyof typeof names; size?: 'md' | 'lg'; tile?: boolean; label?: string; iconOnly?: boolean }
|
|
7
|
+
const { product, size = 'md', tile, label, iconOnly } = Astro.props;
|
|
8
|
+
const name = label ?? names[product];
|
|
9
|
+
---
|
|
10
|
+
<span class:list={['sy-product', size === 'lg' && 'sy-product--lg', tile && 'sy-product--tile']} role={iconOnly ? 'img' : undefined} aria-label={iconOnly ? name : undefined}><Icon name={`p-${product}` as IconName} />{!iconOnly && <span>{name}</span>}</span>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
// How much of a known amount is done or used. Without `value` it shows that work is going on, with no promise of when.
|
|
3
|
+
interface Props { label: string; value?: number; max?: number; detail?: string; tone?: 'ok' | 'warn' | 'fail' }
|
|
4
|
+
const { label, value, max = 100, detail, tone } = Astro.props;
|
|
5
|
+
const pct = value === undefined ? undefined : Math.max(0, Math.min(100, (value / max) * 100));
|
|
6
|
+
---
|
|
7
|
+
<div class:list={['sy-progress', tone && `sy-progress--${tone}`, pct === undefined && 'sy-progress--indeterminate']}>
|
|
8
|
+
<div class="sy-progress__head"><span>{label}</span>{detail && <span class="sy-num">{detail}</span>}</div>
|
|
9
|
+
<div class="sy-progress__track" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow={pct === undefined ? undefined : Math.round(pct)} aria-label={label}>
|
|
10
|
+
<div class="sy-progress__bar" style={pct === undefined ? undefined : `--value:${pct}`}></div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A Progress whose label and value are still loading: the words as bars over the empty track.
|
|
3
|
+
interface Props { detail?: boolean }
|
|
4
|
+
const { detail = true } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<div class="sy-progress" data-skeleton aria-hidden="true">
|
|
7
|
+
<div class="sy-progress__head"><span class="sy-skeleton sy-skeleton--text" style="width:8rem"></span>{detail && <span class="sy-skeleton sy-skeleton--text" style="width:3rem"></span>}</div>
|
|
8
|
+
<div class="sy-progress__track"></div>
|
|
9
|
+
</div>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Text written for reading: Markdown output or hand-written HTML. Keeps a reading measure; code, tables and figures use
|
|
3
|
+
// the whole column.
|
|
4
|
+
interface Props { class?: string; lang?: string }
|
|
5
|
+
const { class: className, lang } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<div class:list={['sy-prose', className]} lang={lang}><slot /></div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
// What a person said, in their words, set in the voice face, with who said it and where.
|
|
3
|
+
import Avatar from './Avatar.astro';
|
|
4
|
+
interface Props { author?: string; role?: string; src?: string; cite?: string; size?: 'md' | 'lg' }
|
|
5
|
+
const { author, role, src, cite, size = 'md' } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<figure class:list={['sy-quote', size === 'lg' && 'sy-quote--lg']}>
|
|
8
|
+
<blockquote class="sy-quote__text" cite={cite}><slot /></blockquote>
|
|
9
|
+
{author && <figcaption class="sy-quote__by"><Avatar name={author} src={src} size="sm" /><span><b>{author}</b>{role && <span class="sy-quote__role">{role}</span>}</span></figcaption>}
|
|
10
|
+
</figure>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A Quote before its words are known: its lines and, with `author`, who said it.
|
|
3
|
+
import AvatarSkeleton from './AvatarSkeleton.astro';
|
|
4
|
+
interface Props { lines?: number; author?: boolean; size?: 'md' | 'lg' }
|
|
5
|
+
const { lines = 3, author = true, size = 'md' } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<figure class:list={['sy-quote', size === 'lg' && 'sy-quote--lg']} data-skeleton aria-hidden="true">
|
|
8
|
+
<div class="sy-quote__text">{Array.from({ length: lines }, (_, i) => <span class="sy-skeleton sy-skeleton--text" style={`width:${i === lines - 1 ? '58%' : '94%'}`}></span>)}</div>
|
|
9
|
+
{author && <div class="sy-quote__by"><AvatarSkeleton size="sm" /><span><span class="sy-skeleton sy-skeleton--text" style="width:7rem"></span><span class="sy-skeleton sy-skeleton--text" style="width:9rem"></span></span></div>}
|
|
10
|
+
</figure>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The example request of an endpoint: wraps one or more code blocks (or a <CodeTabs> by language).
|
|
3
|
+
import { wordsOf } from './_locale';
|
|
4
|
+
interface Props { title?: string; locale?: string }
|
|
5
|
+
const { title } = Astro.props;
|
|
6
|
+
const { t } = wordsOf(Astro);
|
|
7
|
+
---
|
|
8
|
+
<section class="sy-rex"><p class="sy-rex__title">{title ?? t('request')}</p><div class="sy-rex__body"><slot /></div></section>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The example response of an endpoint, with its HTTP status.
|
|
3
|
+
import { wordsOf } from './_locale';
|
|
4
|
+
interface Props { title?: string; status?: number | string; locale?: string }
|
|
5
|
+
const { title, status } = Astro.props;
|
|
6
|
+
const { t } = wordsOf(Astro);
|
|
7
|
+
const code = status === undefined ? 0 : parseInt(String(status), 10);
|
|
8
|
+
---
|
|
9
|
+
<section class="sy-rex"><p class="sy-rex__title">{title ?? t('response')}{status !== undefined && <span class:list={['sy-status', code >= 400 ? 'sy-status--fail' : 'sy-status--ok']}>{status}</span>}</p><div class="sy-rex__body"><slot /></div></section>
|
package/astro/Row.astro
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Things side by side; they wrap onto the next line when there is no room. `pairs`: two by two on phones.
|
|
3
|
+
import { gapVar, styleOf, type Gap } from './_gap';
|
|
4
|
+
interface Props { as?: string; gap?: Gap; justify?: 'start' | 'between' | 'end'; top?: boolean; nowrap?: boolean; pairs?: boolean; class?: string; id?: string }
|
|
5
|
+
const { as: Tag = 'div', gap, justify = 'start', top, nowrap, pairs, class: className, id } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<Tag id={id} class:list={['sy-row', justify !== 'start' && `sy-row--${justify}`, top && 'sy-row--top', nowrap && 'sy-row--nowrap', pairs && 'sy-row--pairs', className]} style={styleOf({ '--gap': gapVar(gap) })}><slot /></Tag>
|
package/astro/Says.astro
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Sypnia speaking to the person, in the voice, opened by the lit dot.
|
|
3
|
+
interface Props { size?: 'sm' | 'md' | 'lg'; as?: string }
|
|
4
|
+
const { size = 'md', as: Tag = 'p' } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<Tag class:list={['sy-says', size !== 'md' && `sy-says--${size}`]}><slot /></Tag>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A region that scrolls on its own, with a shadow on the side where more is hidden. It can be focused, so the keyboard scrolls it.
|
|
3
|
+
import { styleOf } from './_gap';
|
|
4
|
+
interface Props { label: string; axis?: 'y' | 'x'; maxHeight?: string; class?: string }
|
|
5
|
+
const { label, axis = 'y', maxHeight, class: className } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<div class:list={['sy-scroll', axis === 'x' && 'sy-scroll--x', className]} role="region" aria-label={label} tabindex="0" style={styleOf({ '--max-h': maxHeight })}><slot /></div>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Search across the site, in a <dialog>, from an index of pages (`index`: a JSON URL, loaded on first open; or
|
|
3
|
+
// `entries` inline). Opens with Ctrl K / ⌘ K, «/», or any button with data-search-open. Results are grouped; the
|
|
4
|
+
// arrow keys choose and Enter goes. Behaviour: <sy-search>.
|
|
5
|
+
import Icon from './Icon.astro';
|
|
6
|
+
import Kbd from './Kbd.astro';
|
|
7
|
+
import Character from './Character.astro';
|
|
8
|
+
import { wordsOf } from './_locale';
|
|
9
|
+
import type { SearchEntry } from '../src/dom/search';
|
|
10
|
+
interface Props { index?: string; entries?: SearchEntry[]; placeholder?: string; locale?: string; id?: string }
|
|
11
|
+
const { index, entries, id = 'sy-search' } = Astro.props;
|
|
12
|
+
const { t } = wordsOf(Astro);
|
|
13
|
+
const placeholder = Astro.props.placeholder ?? t('searchDocs');
|
|
14
|
+
---
|
|
15
|
+
<sy-search index={index} id={id}>
|
|
16
|
+
<dialog class="sy-dsearch" aria-label={placeholder}>
|
|
17
|
+
<div class="sy-dsearch__field">
|
|
18
|
+
<Icon name="search" />
|
|
19
|
+
<input class="sy-dsearch__input" type="search" placeholder={placeholder} aria-label={placeholder} autocomplete="off" spellcheck="false"
|
|
20
|
+
role="combobox" aria-expanded="true" aria-controls={`${id}-results`} aria-autocomplete="list" />
|
|
21
|
+
<form method="dialog"><button class="sy-btn sy-btn--quiet sy-btn--sm sy-btn--icon" aria-label={t('close')}><Icon name="close" /></button></form>
|
|
22
|
+
</div>
|
|
23
|
+
<ul class="sy-dsearch__results" id={`${id}-results`} role="listbox" aria-label={t('search')} data-results></ul>
|
|
24
|
+
<p class="sy-dsearch__empty" data-hint><span>{t('searchHint')}</span></p>
|
|
25
|
+
<div class="sy-dsearch__empty" data-empty hidden data-template={t('noResultsFor')}>
|
|
26
|
+
<Character name="nio-sleeping" size="7rem" />
|
|
27
|
+
<b data-empty-title></b><span>{t('noResultsHint')}</span>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="sy-dsearch__foot" aria-hidden="true">
|
|
30
|
+
<span><Kbd>↑</Kbd><Kbd>↓</Kbd> {t('toMove')}</span>
|
|
31
|
+
<span><Kbd>↵</Kbd> {t('toOpen')}</span>
|
|
32
|
+
<span><Kbd>Esc</Kbd> {t('toClose')}</span>
|
|
33
|
+
</div>
|
|
34
|
+
</dialog>
|
|
35
|
+
{entries && <script type="application/json" set:html={JSON.stringify(entries).replace(/</g, '\\u003c')} />}
|
|
36
|
+
</sy-search>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
// One search result: the title in bold, a line of the page under it. For a search page rendered on the server, or
|
|
3
|
+
// for showing results outside the dialog. `query` marks the words that matched.
|
|
4
|
+
import { highlight } from '../src/dom/search';
|
|
5
|
+
interface Props { title: string; href: string; text?: string; query?: string; selected?: boolean }
|
|
6
|
+
const { title, href, text, query = '', selected } = Astro.props;
|
|
7
|
+
---
|
|
8
|
+
<a class="sy-hit" href={href} aria-current={selected ? 'true' : undefined} data-selected={selected ? '' : undefined}><b set:html={highlight(title, query)} />{text && <span set:html={highlight(text, query)} />}</a>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
interface Props { items?: number }
|
|
3
|
+
const { items = 4 } = Astro.props;
|
|
4
|
+
---
|
|
5
|
+
<div data-skeleton aria-hidden="true">{Array.from({ length: items }, (_, i) => <div class="sy-hit"><span class="sy-skeleton sy-skeleton--text" style={`--w:${35 + ((i * 17) % 30)}%`}></span><span class="sy-skeleton sy-skeleton--text" style={`--w:${70 + ((i * 13) % 25)}%`}></span></div>)}</div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A part of a page with a name: a title, a line about it, its actions (slot `actions`), then its content.
|
|
3
|
+
import { gapVar, styleOf, type Gap } from './_gap';
|
|
4
|
+
interface Props { title?: string; lead?: string; level?: 2 | 3; gap?: Gap; id?: string; class?: string }
|
|
5
|
+
const { title, lead, level = 2, gap, id, class: className } = Astro.props;
|
|
6
|
+
const H = `h${level}`;
|
|
7
|
+
const actions = Astro.slots.has('actions');
|
|
8
|
+
---
|
|
9
|
+
<section id={id} class:list={['sy-section', className]} style={styleOf({ '--gap': gapVar(gap) })}>
|
|
10
|
+
{(title || lead || actions) && (
|
|
11
|
+
<header class="sy-section__head">
|
|
12
|
+
<div class="sy-section__text">{title && <H class="sy-section__title">{title}</H>}{lead && <p class="sy-section__lead" set:html={lead} />}</div>
|
|
13
|
+
{actions && <div class="sy-actions"><slot name="actions" /></div>}
|
|
14
|
+
</header>
|
|
15
|
+
)}
|
|
16
|
+
<slot />
|
|
17
|
+
</section>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A Section before its title is known: the title and the lead as bars, then what goes in it (the slot).
|
|
3
|
+
interface Props { lead?: boolean }
|
|
4
|
+
const { lead = true } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<section class="sy-section" data-skeleton aria-hidden="true">
|
|
7
|
+
<header class="sy-section__head"><div class="sy-section__text"><span class="sy-skeleton sy-skeleton--text" style="--w:12rem;--h:1.1em"></span>{lead && <span class="sy-skeleton sy-skeleton--text" style="--w:min(28rem, 90%)"></span>}</div></header>
|
|
8
|
+
<slot />
|
|
9
|
+
</section>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
// One setting of a configuration: its name (as written in the file or the environment), facts about it, what it does.
|
|
3
|
+
import { wordsOf } from './_locale';
|
|
4
|
+
interface Props { name: string; type?: string; default?: string; env?: string; required?: boolean; id?: string; locale?: string }
|
|
5
|
+
const { name, type, env, required, id } = Astro.props;
|
|
6
|
+
const def = Astro.props.default;
|
|
7
|
+
const { t } = wordsOf(Astro);
|
|
8
|
+
---
|
|
9
|
+
<section class="sy-setting" id={id}>
|
|
10
|
+
<div class="sy-setting__head"><code class="sy-setting__name">{name}</code>{required && <span class="sy-badge sy-badge--outline">{t('required')}</span>}</div>
|
|
11
|
+
{(type || def !== undefined || env) && (
|
|
12
|
+
<dl class="sy-setting__facts">
|
|
13
|
+
{type && <div><dt>{t('type')}</dt><dd><code>{type}</code></dd></div>}
|
|
14
|
+
{def !== undefined && <div><dt>{t('defaultValue')}</dt><dd><code>{def}</code></dd></div>}
|
|
15
|
+
{env && <div><dt>{t('envVar')}</dt><dd><code>{env}</code></dd></div>}
|
|
16
|
+
</dl>
|
|
17
|
+
)}
|
|
18
|
+
{Astro.slots.has('default') && <div class="sy-setting__body"><slot /></div>}
|
|
19
|
+
</section>
|
package/astro/Show.astro
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Shows its content only on some screens: above="md" on screens wider than 56rem, below="sm" on phones (CSS only).
|
|
3
|
+
interface Props { above?: 'sm' | 'md' | 'lg'; below?: 'sm' | 'md' | 'lg'; as?: string }
|
|
4
|
+
const { above, below, as: Tag = 'div' } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<Tag class:list={[above && `sy-above-${above}`, below && `sy-below-${below}`]}><slot /></Tag>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The navigation of a docs site: sections that fold (a native <details>, so it works without JavaScript), and the
|
|
3
|
+
// light beside the page you are on. A section that holds the current page starts open; the others open as the
|
|
4
|
+
// person left them (remembered in the browser).
|
|
5
|
+
import Icon from './Icon.astro';
|
|
6
|
+
export interface SideNavItem { label: string; href: string; planned?: boolean; count?: number; /** The skeleton DocsShell shows while this page loads. */ skeleton?: string; /** Load it as a whole page, not in place (pages with scripts of their own). */ reload?: boolean }
|
|
7
|
+
export interface SideNavSection { title: string; items: SideNavItem[]; open?: boolean; collapsible?: boolean }
|
|
8
|
+
interface Props { sections: SideNavSection[]; current?: string; label?: string; class?: string }
|
|
9
|
+
const { sections, label = 'Documentation', class: className } = Astro.props;
|
|
10
|
+
const norm = (p: string) => p.replace(/\/$/, '') || '/';
|
|
11
|
+
const current = norm(Astro.props.current ?? Astro.url.pathname);
|
|
12
|
+
const isCurrent = (href: string) => norm(href) === current;
|
|
13
|
+
---
|
|
14
|
+
<nav class:list={['sy-snav-wrap', className]} aria-label={label}>
|
|
15
|
+
<ul class="sy-snav" role="list">
|
|
16
|
+
{sections.map((s) => {
|
|
17
|
+
const here = s.items.some((i) => isCurrent(i.href));
|
|
18
|
+
const list = (
|
|
19
|
+
<ul class:list={['sy-snav__pages', s.collapsible === false && 'sy-snav__pages--flat']} role="list">
|
|
20
|
+
{s.items.map((i) => (
|
|
21
|
+
<li><a href={i.href} data-next-skeleton={i.skeleton} data-astro-reload={i.reload ? '' : undefined} aria-current={isCurrent(i.href) ? 'page' : undefined}><span>{i.label}</span>{i.count !== undefined && <span class="sy-snav__count">{i.count}</span>}{i.planned && <span class="sy-snav__planned" title="Planned" />}</a></li>
|
|
22
|
+
))}
|
|
23
|
+
</ul>
|
|
24
|
+
);
|
|
25
|
+
return s.collapsible === false
|
|
26
|
+
? <li class="sy-snav__sec"><p class="sy-snav__label">{s.title}</p>{list}</li>
|
|
27
|
+
: <li><details class="sy-snav__sec" data-key={s.title} data-here={here ? '' : undefined} open={here || s.open}><summary><span>{s.title}</span><Icon name="chevron-right" /></summary>{list}</details></li>;
|
|
28
|
+
})}
|
|
29
|
+
</ul>
|
|
30
|
+
<script is:inline>
|
|
31
|
+
// Before the first paint: the sections open as the person left them (the current page's section always open).
|
|
32
|
+
(() => { try {
|
|
33
|
+
const open = JSON.parse(localStorage.getItem('sy-snav') || '{}'), nav = document.currentScript.parentElement;
|
|
34
|
+
for (const d of nav.querySelectorAll('details.sy-snav__sec[data-key]')) {
|
|
35
|
+
if (d.hasAttribute('data-here')) continue;
|
|
36
|
+
if (d.dataset.key in open) d.open = !!open[d.dataset.key];
|
|
37
|
+
}
|
|
38
|
+
} catch {} })();
|
|
39
|
+
</script>
|
|
40
|
+
</nav>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The side navigation while it loads: section titles and their pages, as bars.
|
|
3
|
+
interface Props { sections?: number; items?: number }
|
|
4
|
+
const { sections = 3, items = 5 } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<div class="sy-snav" data-skeleton aria-hidden="true">
|
|
7
|
+
{Array.from({ length: sections }, (_, s) => (
|
|
8
|
+
<div class="sy-snav__sec">
|
|
9
|
+
<span class="sy-skeleton sy-skeleton--text" style={`--w:${55 + ((s * 17) % 30)}%;margin-block:0.7rem 0.55rem`}></span>
|
|
10
|
+
<div class="sy-snav__pages">{Array.from({ length: items }, (_, i) => <span class="sy-skeleton sy-skeleton--text" style={`--w:${50 + ((i * 23 + s * 11) % 40)}%;margin:0.62rem 0 0.62rem 0.95rem`}></span>)}</div>
|
|
11
|
+
</div>
|
|
12
|
+
))}
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The foot of a site: the brand and its sentence, columns of links, and the last line (slot `base`).
|
|
3
|
+
import Logo from './Logo.astro';
|
|
4
|
+
interface Link { label: string; href: string }
|
|
5
|
+
interface Props { tagline?: string; product?: string; columns: { title: string; links: Link[] }[] }
|
|
6
|
+
const { tagline, product, columns } = Astro.props;
|
|
7
|
+
---
|
|
8
|
+
<footer class="sy-sitefoot">
|
|
9
|
+
<div class="sy-wrap sy-sitefoot__grid">
|
|
10
|
+
<div class="sy-sitefoot__brand"><Logo product={product} />{tagline && <p class="sy-sitefoot__tagline">{tagline}</p>}</div>
|
|
11
|
+
{columns.map((c) => <nav class="sy-sitefoot__col" aria-label={c.title}><p class="sy-sitefoot__title">{c.title}</p>{c.links.map((l) => <a href={l.href}>{l.label}</a>)}</nav>)}
|
|
12
|
+
</div>
|
|
13
|
+
{Astro.slots.has('base') && <div class="sy-wrap sy-sitefoot__base"><slot name="base" /></div>}
|
|
14
|
+
</footer>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The top of a landing or a product page: brand (slot `brand`, or the logo), links, language, one action (slot
|
|
3
|
+
// `action`). On phones the links fold into a menu (a native disclosure).
|
|
4
|
+
import Icon from './Icon.astro';
|
|
5
|
+
import Logo from './Logo.astro';
|
|
6
|
+
import { wordsOf } from './_locale';
|
|
7
|
+
interface Link { label: string; href: string; current?: boolean }
|
|
8
|
+
interface Props { homeHref?: string; product?: string; links: Link[]; language?: { label: string; href: string; lang: string }; label?: string; locale?: string }
|
|
9
|
+
const { homeHref = '/', product, links, language, label } = Astro.props;
|
|
10
|
+
const { t } = wordsOf(Astro);
|
|
11
|
+
---
|
|
12
|
+
<header class="sy-sitehead">
|
|
13
|
+
<div class="sy-sitehead__in sy-wrap">
|
|
14
|
+
<a class="sy-sitehead__home" href={homeHref}>{Astro.slots.has('brand') ? <slot name="brand" /> : <Logo product={product} />}</a>
|
|
15
|
+
<nav class="sy-sitehead__links" aria-label={label ?? t('mainNav')}>{links.map((l) => <a href={l.href} aria-current={l.current ? 'page' : undefined}>{l.label}</a>)}</nav>
|
|
16
|
+
<div class="sy-sitehead__end">
|
|
17
|
+
{language && <a class="sy-sitehead__lang" href={language.href} lang={language.lang} hreflang={language.lang}>{language.label}</a>}
|
|
18
|
+
<slot name="action" />
|
|
19
|
+
<details class="sy-sitehead__menu">
|
|
20
|
+
<summary class="sy-btn sy-btn--quiet sy-btn--icon" aria-label={t('openNav')}><Icon name="menu" /></summary>
|
|
21
|
+
<nav class="sy-sitehead__panel" aria-label={label ?? t('mainNav')}>
|
|
22
|
+
{links.map((l) => <a href={l.href} aria-current={l.current ? 'page' : undefined}>{l.label}</a>)}
|
|
23
|
+
{language && <a href={language.href} lang={language.lang} hreflang={language.lang}>{language.label}</a>}
|
|
24
|
+
</nav>
|
|
25
|
+
</details>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</header>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The shape of what is coming. Wrap a group in an element with aria-busy="true". Never a spinner.
|
|
3
|
+
interface Props { width?: number | string; height?: number | string; radius?: number | string; circle?: boolean; class?: string }
|
|
4
|
+
const { width, height, radius, circle, class: className } = Astro.props;
|
|
5
|
+
const px = (v?: number | string) => (typeof v === 'number' ? `${v}px` : v);
|
|
6
|
+
const style = Object.entries({ '--w': px(width), '--h': px(height), '--r': px(radius) }).filter(([, v]) => v !== undefined).map(([k, v]) => `${k}:${v}`).join(';');
|
|
7
|
+
---
|
|
8
|
+
<span class:list={['sy-skeleton', circle && 'sy-skeleton--circle', className]} style={style || undefined} aria-hidden="true"></span>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Empty room: pushes what follows to the end of a Row (no `size`), or a fixed amount of space (`size`, 0–10 or CSS).
|
|
3
|
+
import { gapVar, styleOf, type Gap } from './_gap';
|
|
4
|
+
interface Props { size?: Gap }
|
|
5
|
+
const { size } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<span aria-hidden="true" class:list={['sy-spacer', size !== undefined && 'sy-spacer--size']} style={styleOf({ '--size': gapVar(size) })}></span>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Two panes with a divider that can be dragged or moved with the arrow keys. Slots: `first` and `second`.
|
|
3
|
+
// Needs `import '@sypnia/ui/dom/elements'` on the page; without JavaScript the panes keep their first size.
|
|
4
|
+
// `remember`: a key under which the size is kept in this browser.
|
|
5
|
+
import { styleOf } from './_gap';
|
|
6
|
+
import { wordsOf } from './_locale';
|
|
7
|
+
interface Props { size?: number; min?: number; max?: number; orientation?: 'horizontal' | 'vertical'; label?: string; keepOnPhones?: boolean; height?: string; remember?: string; locale?: string; class?: string }
|
|
8
|
+
const { size = 50, min = 15, max = 85, orientation = 'horizontal', label, keepOnPhones, height, remember, class: className } = Astro.props;
|
|
9
|
+
const { t } = wordsOf(Astro);
|
|
10
|
+
---
|
|
11
|
+
<sy-split size={size} min={min} max={max} orientation={orientation} remember={remember} style="display: contents">
|
|
12
|
+
<div class:list={['sy-split', orientation === 'vertical' && 'sy-split--v', keepOnPhones && 'sy-split--keep', className]} style={styleOf({ '--split': `${size}%`, height })}>
|
|
13
|
+
<div class="sy-split__pane"><slot name="first" /></div>
|
|
14
|
+
<div class="sy-split__handle" role="separator" tabindex="0" aria-orientation={orientation === 'horizontal' ? 'vertical' : 'horizontal'} aria-valuemin={min} aria-valuemax={max} aria-valuenow={Math.round(size)} aria-label={label ?? t('resize')}></div>
|
|
15
|
+
<div class="sy-split__pane"><slot name="second" /></div>
|
|
16
|
+
</div>
|
|
17
|
+
</sy-split>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Things one under the other, with the same space between them. `gap`: a step of the scale (0–10) or a CSS length.
|
|
3
|
+
import { gapVar, styleOf, type Gap } from './_gap';
|
|
4
|
+
interface Props { as?: string; gap?: Gap; class?: string; id?: string }
|
|
5
|
+
const { as: Tag = 'div', gap, class: className, id } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<Tag id={id} class:list={['sy-stack', className]} style={styleOf({ '--gap': gapVar(gap) })}><slot /></Tag>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The product shown working, on a plate; with `url`, the bar of a browser window.
|
|
3
|
+
interface Props { url?: string; float?: boolean; caption?: string; label?: string }
|
|
4
|
+
const { url, float, caption, label } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<figure class="sy-stage-fig" style="margin:0" aria-label={label}>
|
|
7
|
+
<div class:list={['sy-stage', float && 'sy-stage--float']}>
|
|
8
|
+
{url !== undefined && <div class="sy-stage__bar" aria-hidden="true"><i></i><i></i><i></i><span class="sy-stage__url">{url}</span></div>}
|
|
9
|
+
<div class="sy-stage__body"><slot /></div>
|
|
10
|
+
</div>
|
|
11
|
+
{caption && <figcaption class="sy-stage__caption">{caption}</figcaption>}
|
|
12
|
+
</figure>
|
package/astro/Stat.astro
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
// One number that matters, with its name and how it moved.
|
|
3
|
+
interface Props { label: string; value: string | number; unit?: string; delta?: string; trend?: 'good' | 'bad' | 'flat' }
|
|
4
|
+
const { label, value, unit, delta, trend } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<div class="sy-stat">
|
|
7
|
+
<span class="sy-stat__label">{label}</span>
|
|
8
|
+
<span class="sy-stat__value">{value}{unit && <small>{unit}</small>}</span>
|
|
9
|
+
{delta && <span class:list={['sy-stat__delta', trend && trend !== 'flat' && `sy-stat__delta--${trend}`]}>{delta}</span>}
|
|
10
|
+
</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<div class="sy-stats"><slot /></div>
|