@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,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The frame of a documentation site: header, side navigation (a drawer on phones, foldable on wide screens), the
|
|
3
|
+
// article with «On this page», search, and the skeleton of the next page while it loads.
|
|
4
|
+
// Put <DocsHead /> in <head>, and this inside <body>; import '@sypnia/ui/dom/elements' once.
|
|
5
|
+
//
|
|
6
|
+
// <DocsShell nav={sections} toc={headings} links={…} languages={…} search="/search.json">
|
|
7
|
+
// <ArticleHead title="…" lead="…" toc={headings} /> (toc: «On this page» folded into the head on narrow screens)
|
|
8
|
+
// <Prose>…</Prose>
|
|
9
|
+
// <PrevNext prev={…} next={…} />
|
|
10
|
+
// </DocsShell>
|
|
11
|
+
//
|
|
12
|
+
// Slots: default (the article), `brand`, `tools` (header buttons), `toc-tools` (under «On this page»), `side-foot`
|
|
13
|
+
// (under the navigation), `foot` (end of the article), `skeletons` (more <template data-skeleton-name="name"> for links
|
|
14
|
+
// with data-next-skeleton="name").
|
|
15
|
+
// With DocsHead's router, the navigation (and its scroll and open sections) and search stay from page to page; the
|
|
16
|
+
// current page is lit again after each change.
|
|
17
|
+
import DocsHeader, { type DocsLanguage, type DocsLink, type DocsProduct } from './DocsHeader.astro';
|
|
18
|
+
import SideNav, { type SideNavSection } from './SideNav.astro';
|
|
19
|
+
import TableOfContents, { type TocHeading } from './TableOfContents.astro';
|
|
20
|
+
import Search from './Search.astro';
|
|
21
|
+
import DocsArticleSkeleton from './DocsArticleSkeleton.astro';
|
|
22
|
+
import Icon from './Icon.astro';
|
|
23
|
+
import Logo from './Logo.astro';
|
|
24
|
+
import { wordsOf } from './_locale';
|
|
25
|
+
import type { SearchEntry } from '../src/dom/search';
|
|
26
|
+
interface Props {
|
|
27
|
+
nav: SideNavSection[];
|
|
28
|
+
current?: string;
|
|
29
|
+
toc?: TocHeading[];
|
|
30
|
+
/** No «On this page» column; the article takes the whole width. */
|
|
31
|
+
wide?: boolean;
|
|
32
|
+
homeHref?: string; product?: string; section?: string;
|
|
33
|
+
links?: DocsLink[]; languages?: DocsLanguage[]; products?: DocsProduct[];
|
|
34
|
+
cta?: { label: string; href: string };
|
|
35
|
+
/** The search index: a URL to a JSON array of entries, or the entries themselves. Leave out for no search. */
|
|
36
|
+
search?: string | SearchEntry[];
|
|
37
|
+
navLabel?: string;
|
|
38
|
+
locale?: string;
|
|
39
|
+
class?: string;
|
|
40
|
+
}
|
|
41
|
+
const { nav, current, toc = [], wide, homeHref, product, section, links = [], languages = [], products, cta, search, navLabel, class: className } = Astro.props;
|
|
42
|
+
const { t, locale } = wordsOf(Astro);
|
|
43
|
+
const hasToc = !wide && toc.length > 1;
|
|
44
|
+
---
|
|
45
|
+
<sy-docs class:list={['sy-docs', className]} data-locale={locale}>
|
|
46
|
+
<a class="sy-skip" href="#sy-article">{t('skipToContent')}</a>
|
|
47
|
+
<DocsHeader homeHref={homeHref} product={product} section={section} links={links} languages={languages} products={products} cta={cta} search={!!search} locale={locale}>
|
|
48
|
+
<Fragment slot="brand">{Astro.slots.has('brand') ? <slot name="brand" /> : <Logo product={product} />}</Fragment>
|
|
49
|
+
<Fragment slot="tools"><slot name="tools" /></Fragment>
|
|
50
|
+
</DocsHeader>
|
|
51
|
+
<div class="sy-dshell">
|
|
52
|
+
<aside class="sy-dside" id="sy-dside" aria-label={navLabel ?? t('docsNav')} transition:persist={`sy-dside-${locale}`}>
|
|
53
|
+
<div class="sy-dside__head">
|
|
54
|
+
<a class="sy-dhead__brand" href={homeHref ?? '/'}>{Astro.slots.has('brand') ? <slot name="brand" /> : <Logo product={product} />}</a>
|
|
55
|
+
<button type="button" class="sy-btn sy-btn--quiet sy-btn--icon" data-nav-close aria-label={t('closeNav')}><Icon name="close" /></button>
|
|
56
|
+
</div>
|
|
57
|
+
<SideNav sections={nav} current={current} label={navLabel ?? t('docsNav')} />
|
|
58
|
+
<div class="sy-dside__foot">
|
|
59
|
+
{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>}
|
|
60
|
+
<div class="sy-row" style="--gap:var(--s-2)">
|
|
61
|
+
<button type="button" class="sy-btn sy-btn--secondary sy-btn--sm" data-surface-toggle><Icon name="moon" class="sy-surface-ico--night" /><Icon name="sun" class="sy-surface-ico--paper" />{t('surface')}</button>
|
|
62
|
+
<slot name="side-foot" />
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</aside>
|
|
66
|
+
<button type="button" class="sy-dscrim" tabindex="-1" aria-hidden="true" data-nav-close></button>
|
|
67
|
+
<main class:list={['sy-dmain', wide && 'sy-dmain--wide', !wide && !hasToc && 'sy-dmain--no-toc']} id="sy-main">
|
|
68
|
+
<article class="sy-darticle" id="sy-article" tabindex="-1">
|
|
69
|
+
<slot />
|
|
70
|
+
<slot name="foot" />
|
|
71
|
+
</article>
|
|
72
|
+
{hasToc && (Astro.slots.has('toc-tools') ? <TableOfContents headings={toc} locale={locale}><slot name="toc-tools" /></TableOfContents> : <TableOfContents headings={toc} locale={locale} />)}
|
|
73
|
+
</main>
|
|
74
|
+
</div>
|
|
75
|
+
{search && <div transition:persist={`sy-search-${locale}`}><Search index={typeof search === 'string' ? search : undefined} entries={typeof search === 'string' ? undefined : search} locale={locale} /></div>}
|
|
76
|
+
<template data-skeleton-name="article"><DocsArticleSkeleton toc={hasToc} /></template>
|
|
77
|
+
<template data-skeleton-name="wide"><DocsArticleSkeleton toc={false} /></template>
|
|
78
|
+
<slot name="skeletons" />
|
|
79
|
+
</sy-docs>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Where to change this page: its source file, in the repository.
|
|
3
|
+
import Icon from './Icon.astro';
|
|
4
|
+
import { wordsOf } from './_locale';
|
|
5
|
+
interface Props { href: string; label?: string; locale?: string }
|
|
6
|
+
const { href, label } = Astro.props;
|
|
7
|
+
const { t } = wordsOf(Astro);
|
|
8
|
+
---
|
|
9
|
+
<a class="sy-editlink" href={href} rel="noopener" data-no-skeleton><Icon name="edit" />{label ?? t('editPage')}</a>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Nothing here yet: say what goes here and offer the next step. With tone="fail" it is the error state of a region.
|
|
3
|
+
// Slots: default (one or two sentences), `actions` (the one button that fills it, and at most one alternative).
|
|
4
|
+
import Icon from './Icon.astro';
|
|
5
|
+
import type { IconName } from '../src/icons/data';
|
|
6
|
+
interface Props { title: string; icon?: IconName; tone?: 'neutral' | 'fail'; compact?: boolean; class?: string }
|
|
7
|
+
const { title, icon = 'light', tone = 'neutral', compact, class: className } = Astro.props;
|
|
8
|
+
---
|
|
9
|
+
<div class:list={['sy-empty', tone === 'fail' && 'sy-empty--fail', compact && 'sy-empty--compact', className]} role={tone === 'fail' ? 'alert' : undefined}>
|
|
10
|
+
<span class="sy-empty__art"><Icon name={tone === 'fail' && icon === 'light' ? 'error' : icon} /></span>
|
|
11
|
+
<p class="sy-empty__title">{title}</p>
|
|
12
|
+
{Astro.slots.has('default') && <div class="sy-empty__body"><slot /></div>}
|
|
13
|
+
{Astro.slots.has('actions') && <div class="sy-empty__actions"><slot name="actions" /></div>}
|
|
14
|
+
</div>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
// One endpoint of an API: method, path, what it does (the slot) and how to authenticate. Follow it with <Params>,
|
|
3
|
+
// <RequestExample>, <ResponseExample> and <ErrorList>. Slot `badges` for where it exists or its version.
|
|
4
|
+
import Icon from './Icon.astro';
|
|
5
|
+
import { wordsOf } from './_locale';
|
|
6
|
+
interface Props { method?: string; path: string; auth?: string; title?: string; id?: string; level?: 2 | 3 | 4; locale?: string }
|
|
7
|
+
const { path, auth, title, id, level = 3 } = Astro.props;
|
|
8
|
+
const method = String(Astro.props.method ?? 'GET').toUpperCase();
|
|
9
|
+
const H = `h${level}`;
|
|
10
|
+
const { t } = wordsOf(Astro);
|
|
11
|
+
---
|
|
12
|
+
{title && <H id={id}>{title}</H>}
|
|
13
|
+
<section class="sy-ref sy-ref--endpoint">
|
|
14
|
+
<div class="sy-ref__sig">
|
|
15
|
+
<span class={`sy-method sy-method--${method.toLowerCase()}`}>{method}</span>
|
|
16
|
+
<code class="sy-ref__name">{path}</code>
|
|
17
|
+
{Astro.slots.has('badges') && <span class="sy-ref__badges"><slot name="badges" /></span>}
|
|
18
|
+
</div>
|
|
19
|
+
{Astro.slots.has('default') && <div class="sy-ref__body"><slot /></div>}
|
|
20
|
+
{auth && <dl class="sy-ref__meta"><div><Icon name="lock" /><dt>{t('authentication')}</dt><dd>{auth}</dd></div></dl>}
|
|
21
|
+
</section>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
---
|
|
2
|
+
interface Props { code?: string | number; name?: string }
|
|
3
|
+
const { code, name } = Astro.props;
|
|
4
|
+
---
|
|
5
|
+
<li class="sy-error"><div class="sy-error__sig">{code !== undefined && <span class="sy-error__code">{code}</span>}{name && <code class="sy-error__name">{name}</code>}</div><div class="sy-param__text"><slot /></div></li>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
// What can go wrong: a list of <ErrorItem code name>when it happens and what to do</ErrorItem>.
|
|
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-errors"><p class="sy-errors__title">{title ?? t('errors')}</p><ul class="sy-errors__list" role="list"><slot /></ul></section>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
// What the reader should see when the step worked.
|
|
3
|
+
import { wordsOf } from './_locale';
|
|
4
|
+
interface Props { title?: string; locale?: string }
|
|
5
|
+
const { title } = Astro.props;
|
|
6
|
+
const { t } = wordsOf(Astro);
|
|
7
|
+
---
|
|
8
|
+
<div class="sy-expected"><span class="sy-status sy-status--ok">{title ?? t('expected')}</span><div class="sy-expected__body"><slot /></div></div>
|
package/astro/Faq.astro
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Questions and answers; one open at a time (native <details name>), the first open. Slot `side` beside the title.
|
|
3
|
+
import Icon from './Icon.astro';
|
|
4
|
+
interface Props { items: { q: string; a: string }[]; title?: string; name?: string }
|
|
5
|
+
const { items, title, name = 'faq' } = Astro.props;
|
|
6
|
+
const side = Astro.slots.has('side');
|
|
7
|
+
---
|
|
8
|
+
<div class:list={['sy-faq', !title && !side && 'sy-faq--solo']}>
|
|
9
|
+
{(title || side) && <div class="sy-faq__side">{title && <h2 class="sy-display sy-display--xs">{title}</h2>}<slot name="side" /></div>}
|
|
10
|
+
<div class="sy-faq__list">{items.map((it, i) => <details class="sy-faq__item" name={name} open={i === 0}><summary><span>{it.q}</span><Icon name="plus" /></summary><div class="sy-faq__answer" set:html={it.a} /></details>)}</div>
|
|
11
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
// What a product does, as a ledger: an icon, a name in the voice and one or two sentences each.
|
|
3
|
+
import Icon from './Icon.astro';
|
|
4
|
+
import type { IconName } from '../src/icons/data';
|
|
5
|
+
interface Feature { icon?: IconName; title: string; text?: string; href?: string; meta?: string }
|
|
6
|
+
interface Props { items: Feature[]; columns?: 2 | 3 | 4; label?: string }
|
|
7
|
+
const { items, columns = 3, label } = Astro.props;
|
|
8
|
+
---
|
|
9
|
+
<ul class="sy-featuregrid" role="list" aria-label={label} style={`--cols:${columns}`}>
|
|
10
|
+
{items.map((f) => <li class="sy-featuregrid__item">{f.icon && <Icon name={f.icon} />}<p class="sy-featuregrid__title">{f.href ? <a href={f.href}>{f.title}</a> : f.title}</p>{f.text && <p class="sy-featuregrid__text" set:html={f.text} />}{f.meta && <p class="sy-featuregrid__meta">{f.meta}</p>}</li>)}
|
|
11
|
+
</ul>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A FeatureGrid before its features are known: the icon, the title and two lines of each.
|
|
3
|
+
interface Props { items?: number; columns?: 2 | 3 | 4 }
|
|
4
|
+
const { items = 3, columns = 3 } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<div class="sy-featuregrid" data-skeleton aria-hidden="true" style={`--cols:${columns}`}>
|
|
7
|
+
{Array.from({ length: items }, () => <div class="sy-featuregrid__item"><span class="sy-skeleton" style="--w:1.6rem;--h:1.6rem;--r:var(--r-1)"></span><span class="sy-skeleton sy-skeleton--text" style="--w:60%;--h:1.3em"></span><span class="sy-skeleton sy-skeleton--text"></span><span class="sy-skeleton sy-skeleton--text" style="--w:70%"></span></div>)}
|
|
8
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
// What a plan or a product includes, one line each, with a check; what it does not include is said in words.
|
|
3
|
+
import Icon from './Icon.astro';
|
|
4
|
+
import { wordsOf } from './_locale';
|
|
5
|
+
type Item = string | { text: string; included?: boolean; hint?: string };
|
|
6
|
+
interface Props { items: Item[]; columns?: 1 | 2; locale?: string }
|
|
7
|
+
const { items, columns = 1 } = Astro.props;
|
|
8
|
+
const { t } = wordsOf(Astro);
|
|
9
|
+
const list = items.map((f) => (typeof f === 'string' ? { text: f, included: true, hint: undefined } : { included: true, ...f }));
|
|
10
|
+
---
|
|
11
|
+
<ul class:list={['sy-featurelist', columns === 2 && 'sy-featurelist--2']}>
|
|
12
|
+
{list.map((it) => (
|
|
13
|
+
<li class:list={['sy-featurelist__item', !it.included && 'sy-featurelist__item--no']}>
|
|
14
|
+
<Icon name={it.included ? 'check-small' : 'close-small'} />
|
|
15
|
+
<span>{!it.included && <span class="sy-sr-only">{t('notIncluded')}: </span>}{it.text}{it.hint && <span class="sy-featurelist__hint">{it.hint}</span>}</span>
|
|
16
|
+
</li>
|
|
17
|
+
))}
|
|
18
|
+
</ul>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A FeatureList before its features are known: the mark and a line for each.
|
|
3
|
+
interface Props { items?: number; columns?: 1 | 2 }
|
|
4
|
+
const { items = 5, columns = 1 } = Astro.props;
|
|
5
|
+
const W = ['62%', '48%', '71%', '55%', '66%', '40%'];
|
|
6
|
+
---
|
|
7
|
+
<ul class:list={['sy-featurelist', columns === 2 && 'sy-featurelist--2']} data-skeleton aria-hidden="true">{Array.from({ length: items }, (_, i) => <li class="sy-featurelist__item"><span class="sy-skeleton sy-skeleton--icon-xs"></span><span class="sy-skeleton sy-skeleton--text" style={`width:${W[i % 6]}`}></span></li>)}</ul>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A diagram or an image, with its caption, its numbered callouts and the same thing told in words.
|
|
3
|
+
// Draw diagrams as inline SVG with the .sy-dg vocabulary (dg-box, dg-wire, dg-light…). Slots: default (the drawing),
|
|
4
|
+
// `legend` (an ordered list: number N is circle N in the drawing), `words` (the diagram in words; screen readers
|
|
5
|
+
// and agents always get it). Without a drawing, `todo` says what it must show.
|
|
6
|
+
import { wordsOf } from './_locale';
|
|
7
|
+
interface Props { caption?: string; todo?: string; label?: string; locale?: string }
|
|
8
|
+
const { caption, todo, label } = Astro.props;
|
|
9
|
+
const { t } = wordsOf(Astro);
|
|
10
|
+
const drawn = Astro.slots.has('default');
|
|
11
|
+
---
|
|
12
|
+
<figure class="sy-figure" aria-label={label ?? caption}>
|
|
13
|
+
{drawn ? <div class="sy-figure__stage"><slot /></div> : <div class="sy-figure__todo"><b>{t('figure')}</b><span>{todo}</span></div>}
|
|
14
|
+
{caption && <figcaption><span><b>{t('figure')}.</b> {caption}</span></figcaption>}
|
|
15
|
+
{Astro.slots.has('legend') && <div class="sy-figure__legend"><slot name="legend" /></div>}
|
|
16
|
+
{Astro.slots.has('words') && <details class="sy-figure__alt"><summary>{t('inWords')}</summary><div><slot name="words" /></div></details>}
|
|
17
|
+
</figure>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A Figure before its picture is known: the stage at its ratio and, with `caption`, a line under it.
|
|
3
|
+
interface Props { ratio?: string; caption?: boolean }
|
|
4
|
+
const { ratio = '16 / 9', caption = true } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<figure class="sy-figure" data-skeleton aria-hidden="true">
|
|
7
|
+
<div class="sy-figure__stage"><span class="sy-image sy-image--rounded" data-skeleton aria-hidden="true" style={`--ratio:${ratio}`}><span class="sy-skeleton sy-image__wait"></span></span></div>
|
|
8
|
+
{caption && <figcaption><span class="sy-skeleton sy-skeleton--text" style="width:60%"></span></figcaption>}
|
|
9
|
+
</figure>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The night field: fireflies that drift and twinkle behind a section, never over its words (<sy-fireflies> drops the
|
|
3
|
+
// ones that would touch text). Put it first in a section with `position: relative; isolation: isolate`.
|
|
4
|
+
import { fireflies, fireflyStyle } from '../src/characters/index';
|
|
5
|
+
interface Props { seed?: number; count?: number }
|
|
6
|
+
const { seed = 11, count = 84 } = Astro.props;
|
|
7
|
+
---
|
|
8
|
+
<sy-fireflies style="display: contents"><div class="sy-flies" aria-hidden="true">{fireflies(seed, count).map((f) => <i style={fireflyStyle(f)} />)}</div></sy-fireflies>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The words of the vocabulary and what each means. Each entry has an id (from the term) so a <Term> can link to it.
|
|
3
|
+
interface Entry { term: string; definition: string; id?: string }
|
|
4
|
+
interface Props { entries: Entry[]; label?: string }
|
|
5
|
+
const { entries, label } = Astro.props;
|
|
6
|
+
const slug = (s: string) => s.normalize('NFD').replace(/\p{Diacritic}/gu, '').toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '');
|
|
7
|
+
---
|
|
8
|
+
<dl class="sy-glossary" aria-label={label}>{entries.map((e) => <div id={e.id ?? slug(e.term)}><dt>{e.term}</dt><dd set:html={e.definition} /></div>)}</dl>
|
package/astro/Grid.astro
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
// As many equal columns as fit. `min`: the narrowest a cell may get before the grid uses one column less.
|
|
3
|
+
import { gapVar, styleOf, type Gap } from './_gap';
|
|
4
|
+
interface Props { as?: string; gap?: Gap; min?: string; class?: string; id?: string }
|
|
5
|
+
const { as: Tag = 'div', gap, min, class: className, id } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<Tag id={id} class:list={['sy-grid', className]} style={styleOf({ '--gap': gapVar(gap), '--min': min })}><slot /></Tag>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A title inside a page. `level` is the outline (h1–h6); `size` is how big it looks (1–4), by default the level.
|
|
3
|
+
interface Props { level?: 1 | 2 | 3 | 4 | 5 | 6; size?: 1 | 2 | 3 | 4; id?: string; class?: string }
|
|
4
|
+
const { level = 2, size, id, class: className } = Astro.props;
|
|
5
|
+
const H = `h${level}`;
|
|
6
|
+
---
|
|
7
|
+
<H id={id} class:list={['sy-heading', `sy-heading--${size ?? Math.min(level, 4)}`, className]}><slot /></H>
|
package/astro/Hero.astro
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The first screen of a landing. Slots: `header` (a SiteHeader), `actions`, `stage` (the product shown working).
|
|
3
|
+
import Fireflies from './Fireflies.astro';
|
|
4
|
+
interface Props { kicker?: string; title: string; lead?: string; note?: string; fireflies?: boolean }
|
|
5
|
+
const { kicker, title, lead, note, fireflies } = Astro.props;
|
|
6
|
+
const stage = Astro.slots.has('stage');
|
|
7
|
+
---
|
|
8
|
+
<section class:list={['sy-hero', !stage && 'sy-hero--solo']}>
|
|
9
|
+
{fireflies && <Fireflies />}
|
|
10
|
+
<slot name="header" />
|
|
11
|
+
<div class="sy-hero__grid sy-wrap">
|
|
12
|
+
<div class="sy-hero__copy">
|
|
13
|
+
{kicker && <p class="sy-hero__kicker"><span class="sy-dot" aria-hidden="true"></span>{kicker}</p>}
|
|
14
|
+
<h1 class="sy-hero__title" set:html={title} />
|
|
15
|
+
{lead && <p class="sy-hero__lead" set:html={lead} />}
|
|
16
|
+
{Astro.slots.has('actions') && <div class="sy-row" style="--gap:var(--s-3)"><slot name="actions" /></div>}
|
|
17
|
+
{note && <p class="sy-hero__note" set:html={note} />}
|
|
18
|
+
</div>
|
|
19
|
+
{stage && <div class="sy-hero__stage"><slot name="stage" /></div>}
|
|
20
|
+
</div>
|
|
21
|
+
</section>
|
package/astro/Icon.astro
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
// An icon of the Sypnia set, drawn inline: no sprite to load, no JavaScript.
|
|
3
|
+
import { icons, type IconName } from '../src/icons/data';
|
|
4
|
+
interface Props {
|
|
5
|
+
name: IconName;
|
|
6
|
+
/** Pixels. Without it the icon follows the text size (1.25em). */
|
|
7
|
+
size?: number;
|
|
8
|
+
/** A name for screen readers. Without it the icon is decoration and is hidden from them. */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** Draws the light in the stroke colour: for icons inside coloured surfaces. */
|
|
11
|
+
plain?: boolean;
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
const { name, size, label, plain, class: className } = Astro.props;
|
|
15
|
+
---
|
|
16
|
+
<svg class:list={['sy-icon', plain && 'sy-icon--plain', className]} viewBox="0 0 24 24" width={size} height={size}
|
|
17
|
+
role={label ? 'img' : undefined} aria-label={label} aria-hidden={label ? undefined : 'true'} set:html={icons[name]} />
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A button that is only an icon. `label` is its accessible name and the hint shown on hover: an icon alone is never enough.
|
|
3
|
+
import type { HTMLAttributes } from 'astro/types';
|
|
4
|
+
import Icon from './Icon.astro';
|
|
5
|
+
import type { IconName } from '../src/icons/data';
|
|
6
|
+
interface Props extends Omit<HTMLAttributes<'button'>, 'class'> {
|
|
7
|
+
icon: IconName;
|
|
8
|
+
/** What the button does. */
|
|
9
|
+
label: string;
|
|
10
|
+
variant?: 'primary' | 'secondary' | 'quiet' | 'danger' | 'danger-quiet';
|
|
11
|
+
size?: 'sm' | 'md' | 'lg';
|
|
12
|
+
href?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
class?: string;
|
|
15
|
+
}
|
|
16
|
+
const { icon, label, variant = 'quiet', size = 'md', href, disabled, class: className, type = 'button', ...rest } = Astro.props;
|
|
17
|
+
const cls = ['sy-btn', `sy-btn--${variant}`, size !== 'md' && `sy-btn--${size}`, 'sy-btn--icon', className];
|
|
18
|
+
---
|
|
19
|
+
{href && !disabled
|
|
20
|
+
? <a class:list={cls} href={href} aria-label={label} title={label} {...(rest as HTMLAttributes<'a'>)}><Icon name={icon} /></a>
|
|
21
|
+
: <button class:list={cls} type={type} aria-label={label} title={label} disabled={disabled} {...rest}><Icon name={icon} /></button>}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Avatar, name and a second line.
|
|
3
|
+
import Avatar from './Avatar.astro';
|
|
4
|
+
interface Props { name: string; meta?: string; src?: string }
|
|
5
|
+
const { name, meta, src } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<span class="sy-identity"><Avatar name={name} src={src} /><span class="sy-identity__text"><span class="sy-identity__name">{name}</span>{meta && <span class="sy-identity__meta">{meta}</span>}</span></span>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
// An Identity before its person is known: the avatar, the name and the line under it.
|
|
3
|
+
import AvatarSkeleton from './AvatarSkeleton.astro';
|
|
4
|
+
interface Props { meta?: boolean }
|
|
5
|
+
const { meta = true } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<span class="sy-identity" data-skeleton aria-hidden="true">
|
|
8
|
+
<AvatarSkeleton />
|
|
9
|
+
<span class="sy-identity__text"><span class="sy-identity__name"><span class="sy-skeleton sy-skeleton--text" style="width:8rem"></span></span>{meta && <span class="sy-identity__meta"><span class="sy-skeleton sy-skeleton--text" style="width:11rem"></span></span>}</span>
|
|
10
|
+
</span>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
// How to install: the package for each package manager, and a line of what comes next (default slot).
|
|
3
|
+
import PackageTabs from './PackageTabs.astro';
|
|
4
|
+
interface Props { pkg: string; dev?: boolean; locale?: string }
|
|
5
|
+
const { pkg, dev, locale } = Astro.props;
|
|
6
|
+
---
|
|
7
|
+
<div class="sy-install"><PackageTabs pkg={pkg} dev={dev} locale={locale} />{Astro.slots.has('default') && <p class="sy-install__note"><slot /></p>}</div>
|
package/astro/Kbd.astro
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Facts about one thing: name on the left, value on the right; stacked on phones.
|
|
3
|
+
interface Props { items: [string, string][] }
|
|
4
|
+
const { items } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<dl class="sy-kv">{items.map(([k, v]) => <div style="display: contents"><dt>{k}</dt><dd>{v}</dd></div>)}</dl>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A KeyValue before its values are known: names and values as bars, row by row.
|
|
3
|
+
interface Props { rows?: number }
|
|
4
|
+
const { rows = 4 } = Astro.props;
|
|
5
|
+
const widths = ['92%', '78%', '86%', '64%', '81%', '70%'], names = ['5rem', '6.5rem', '4rem', '6rem'];
|
|
6
|
+
---
|
|
7
|
+
<dl class="sy-kv" data-skeleton aria-hidden="true">{Array.from({ length: rows }, (_, i) => <div style="display:contents"><dt><span class="sy-skeleton sy-skeleton--text" style={`width:${names[i % 4]}`}></span></dt><dd><span class="sy-skeleton sy-skeleton--text" style={`width:${widths[(i + 2) % widths.length]}`}></span></dd></div>)}</dl>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Facts listed with rules, not cards.
|
|
3
|
+
interface Props { items: { label: string; value: string; note?: string }[]; columns?: 1 | 2 | 3; label?: string }
|
|
4
|
+
const { items, columns = 2, label } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<dl class="sy-ledger" aria-label={label} style={`--cols:${columns}`}>{items.map((it) => <div><dt>{it.label}</dt><dd><Fragment set:html={it.value} />{it.note && <small>{it.note}</small>}</dd></div>)}</dl>
|
package/astro/Logo.astro
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The Sypnia mark and name; `product` names the product it belongs to («UI», «Data», «Docs»).
|
|
3
|
+
interface Props { product?: string; class?: string }
|
|
4
|
+
const { product, class: className } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<span class:list={['sy-logo', className]}>
|
|
7
|
+
<svg viewBox="0 0 32 32" aria-hidden="true"><path fill="currentColor" d="M1.5,13.9A8.5,8.5 0 0 0 17.9,13.9A2.15,2.15 0 0 0 13.7,12.9A4.2,4.2 0 0 1 5.7,12.9A2.15,2.15 0 0 0 1.5,13.9Z" /><circle class="sy-logo__light" cx="24.6" cy="15.4" r="5.3" /></svg>
|
|
8
|
+
Sypnia{product && <small>{product}</small>}
|
|
9
|
+
</span>
|
package/astro/Mark.astro
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<mark class="sy-mark"><slot /></mark>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
// One tool an MCP server offers to agents: its name, what it does (slot) and whether it only reads.
|
|
3
|
+
import Icon from './Icon.astro';
|
|
4
|
+
import { wordsOf } from './_locale';
|
|
5
|
+
interface Props { name: string; readOnly?: boolean; title?: string; id?: string; locale?: string }
|
|
6
|
+
const { name, readOnly, title, id } = Astro.props;
|
|
7
|
+
const { t } = wordsOf(Astro);
|
|
8
|
+
---
|
|
9
|
+
{title && <h3 id={id}>{title}</h3>}
|
|
10
|
+
<section class="sy-ref sy-ref--tool">
|
|
11
|
+
<div class="sy-ref__sig"><Icon name="mcp" /><code class="sy-ref__name">{name}</code><span class="sy-ref__badges"><span class="sy-badge sy-badge--outline">{t('tool')}</span>{readOnly !== undefined && <span class:list={['sy-badge', readOnly ? 'sy-badge--ok' : 'sy-badge--warn']}>{readOnly ? t('readOnly') : t('changesData')}</span>}</span></div>
|
|
12
|
+
{Astro.slots.has('default') && <div class="sy-ref__body"><slot /></div>}
|
|
13
|
+
</section>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
// One choice among several ways to do something: its name, what it means (slot) and where to read more.
|
|
3
|
+
interface Props { name: string; href?: string; go?: string }
|
|
4
|
+
const { name, href, go = 'Read more' } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<li class="sy-option"><span class="sy-option__name">{name}</span><div><slot /></div>{href ? <a class="sy-option__go" href={href}>{go}</a> : <span></span>}</li>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
// One install command, for npm, pnpm, yarn and bun. The choice is the same on every page (sync="pm").
|
|
3
|
+
// <PackageTabs pkg="@sypnia/ui" /> or <PackageTabs pkg="-D vitest" /> or <PackageTabs run="astro dev" />
|
|
4
|
+
import CodeTabs from './CodeTabs.astro';
|
|
5
|
+
interface Props { pkg?: string; run?: string; dev?: boolean; locale?: string }
|
|
6
|
+
const { pkg, run, dev, locale } = Astro.props;
|
|
7
|
+
const d = dev ? ' -D' : '';
|
|
8
|
+
const items = pkg
|
|
9
|
+
? [{ label: 'npm', code: `npm install${d} ${pkg}` }, { label: 'pnpm', code: `pnpm add${d} ${pkg}` }, { label: 'yarn', code: `yarn add${d} ${pkg}` }, { label: 'bun', code: `bun add${d} ${pkg}` }]
|
|
10
|
+
: [{ label: 'npm', code: `npx ${run}` }, { label: 'pnpm', code: `pnpm exec ${run}` }, { label: 'yarn', code: `yarn ${run}` }, { label: 'bun', code: `bunx ${run}` }];
|
|
11
|
+
---
|
|
12
|
+
<CodeTabs items={items.map((i) => ({ ...i, lang: 'sh', id: i.label }))} sync="pm" label="Package manager" locale={locale} />
|
package/astro/Page.astro
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
// «Was this page useful?» Two buttons; the answer is sent as a `sy-feedback` event (detail: page, useful) that the
|
|
3
|
+
// site records where it wants. Without JavaScript it does not show.
|
|
4
|
+
import Icon from './Icon.astro';
|
|
5
|
+
import { wordsOf } from './_locale';
|
|
6
|
+
interface Props { page?: string; locale?: string }
|
|
7
|
+
const { page } = Astro.props;
|
|
8
|
+
const { t } = wordsOf(Astro);
|
|
9
|
+
---
|
|
10
|
+
<sy-feedback page={page ?? Astro.url.pathname}>
|
|
11
|
+
<div class="sy-feedback">
|
|
12
|
+
<span class="sy-feedback__ask">{t('wasUseful')}</span>
|
|
13
|
+
<span class="sy-feedback__choices sy-row" style="--gap:var(--s-2)">
|
|
14
|
+
<button type="button" class="sy-btn sy-btn--secondary sy-btn--sm" data-useful="yes"><Icon name="thumbs-up" />{t('yes')}</button>
|
|
15
|
+
<button type="button" class="sy-btn sy-btn--secondary sy-btn--sm" data-useful="no"><Icon name="thumbs-down" />{t('no')}</button>
|
|
16
|
+
</span>
|
|
17
|
+
<p class="sy-feedback__done" tabindex="-1" role="status">{t('thanks')}</p>
|
|
18
|
+
</div>
|
|
19
|
+
</sy-feedback>
|
|
20
|
+
<style is:global>sy-feedback:not(:defined) { display: none; }</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The top of a page: where you are, in one line, and the main thing you can do here (slot `actions`).
|
|
3
|
+
import Icon from './Icon.astro';
|
|
4
|
+
import type { IconName } from '../src/icons/data';
|
|
5
|
+
interface Props { title: string; lead?: string; icon?: IconName }
|
|
6
|
+
const { title, lead, icon } = Astro.props;
|
|
7
|
+
---
|
|
8
|
+
<header class="sy-page-header">
|
|
9
|
+
<div class="sy-page-header__text">
|
|
10
|
+
<h1 class="sy-page-header__title">{icon && <Icon name={icon} />}{title}</h1>
|
|
11
|
+
{lead && <p class="sy-page-header__lead">{lead}</p>}
|
|
12
|
+
</div>
|
|
13
|
+
{Astro.slots.has('actions') && <div class="sy-actions"><slot name="actions" /></div>}
|
|
14
|
+
</header>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The top of a page before its title is known: the title, the lead and the main actions.
|
|
3
|
+
interface Props { lead?: boolean; actions?: number }
|
|
4
|
+
const { lead = true, actions = 1 } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<header class="sy-page-header" data-skeleton aria-hidden="true">
|
|
7
|
+
<div class="sy-page-header__text">
|
|
8
|
+
<span class="sy-page-header__title"><span class="sy-skeleton sy-skeleton--text" style="width:14rem"></span></span>
|
|
9
|
+
{lead && <span class="sy-page-header__lead"><span class="sy-skeleton sy-skeleton--text" style="width:min(28rem, 100%)"></span></span>}
|
|
10
|
+
</div>
|
|
11
|
+
{actions > 0 && <div class="sy-actions">{Array.from({ length: actions }, () => <span class="sy-skeleton sy-skeleton--btn"></span>)}</div>}
|
|
12
|
+
</header>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A whole console page while it loads: the header, a row of numbers and a table, in the page's own boxes. Mark the
|
|
3
|
+
// main region `aria-busy` while it shows.
|
|
4
|
+
import Page from './Page.astro';
|
|
5
|
+
import PageHeaderSkeleton from './PageHeaderSkeleton.astro';
|
|
6
|
+
import StatGroupSkeleton from './StatGroupSkeleton.astro';
|
|
7
|
+
import TableSkeleton from './TableSkeleton.astro';
|
|
8
|
+
interface Props { /** How many numbers the page has at the top (0 for none). */ stats?: number; rows?: number; columns?: number }
|
|
9
|
+
const { stats = 4, rows = 6, columns = 5 } = Astro.props;
|
|
10
|
+
---
|
|
11
|
+
<div class="sy-pageskel" data-skeleton aria-hidden="true">
|
|
12
|
+
<Page>
|
|
13
|
+
<div class="sy-stack">
|
|
14
|
+
<PageHeaderSkeleton />
|
|
15
|
+
{stats > 0 && <StatGroupSkeleton items={stats} />}
|
|
16
|
+
<TableSkeleton rows={rows} columns={columns} pagination />
|
|
17
|
+
</div>
|
|
18
|
+
</Page>
|
|
19
|
+
</div>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A Pagination before the total is known: the summary, the page size, the page buttons and previous/next.
|
|
3
|
+
interface Props { pageSize?: boolean }
|
|
4
|
+
const { pageSize = true } = Astro.props;
|
|
5
|
+
---
|
|
6
|
+
<div class="sy-pagination" data-skeleton aria-hidden="true">
|
|
7
|
+
<span class="sy-pagination__summary"><span class="sy-skeleton sy-skeleton--text"></span></span>
|
|
8
|
+
{pageSize && <span class="sy-pagination__size"><span class="sy-skeleton sy-skeleton--text"></span><span class="sy-skeleton sy-skeleton--ctl-sm"></span></span>}
|
|
9
|
+
<div>
|
|
10
|
+
<ul class="sy-pagination__pages">
|
|
11
|
+
<li class="sy-pagination__prev"><span class="sy-skeleton sy-skeleton--ctl-sm"></span></li>
|
|
12
|
+
{[1, 2, 3].map(() => <li><span class="sy-pagination__page"><span class="sy-skeleton sy-skeleton--text"></span></span></li>)}
|
|
13
|
+
<li class="sy-pagination__now"><span class="sy-skeleton sy-skeleton--text"></span></li>
|
|
14
|
+
<li class="sy-pagination__next"><span class="sy-skeleton sy-skeleton--ctl-sm"></span></li>
|
|
15
|
+
</ul>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A region of a page with a name. Slots: default (the body), `actions` (next to the title), `footer`.
|
|
3
|
+
interface Props { title?: string; flush?: boolean; class?: string }
|
|
4
|
+
const { title, flush, class: className } = Astro.props;
|
|
5
|
+
const actions = Astro.slots.has('actions');
|
|
6
|
+
---
|
|
7
|
+
<section class:list={['sy-panel', className]}>
|
|
8
|
+
{(title || actions) && <header class="sy-panel__head">{title && <h2 class="sy-panel__title">{title}</h2>}<slot name="actions" /></header>}
|
|
9
|
+
<div class:list={['sy-panel__body', flush && 'sy-panel__body--flush']}><slot /></div>
|
|
10
|
+
{Astro.slots.has('footer') && <footer class="sy-panel__foot"><slot name="footer" /></footer>}
|
|
11
|
+
</section>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
// A Panel before anything is known: its title and as many lines as its body will have.
|
|
3
|
+
interface Props { lines?: number; actions?: boolean }
|
|
4
|
+
const { lines = 3, actions } = Astro.props;
|
|
5
|
+
const widths = ['92%', '78%', '86%', '64%', '81%', '70%'];
|
|
6
|
+
---
|
|
7
|
+
<section class="sy-panel" data-skeleton aria-hidden="true">
|
|
8
|
+
<header class="sy-panel__head"><span class="sy-panel__title"><span class="sy-skeleton sy-skeleton--text" style="width:8rem"></span></span>{actions && <span class="sy-skeleton sy-skeleton--ctl-sm" style="--w:5.5rem"></span>}</header>
|
|
9
|
+
<div class="sy-panel__body">{Array.from({ length: lines }, (_, i) => <span class="sy-skeleton sy-skeleton--text" style={`width:${widths[i % widths.length]}`}></span>)}</div>
|
|
10
|
+
</section>
|