@oyolincc/create 0.4.0 → 0.5.1
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/package.json +2 -2
- package/templates/{monorepo/.agents/skills/grilling → hono-fullstack/.agents/skills/ask-grilling}/SKILL.md +1 -1
- package/templates/hono-fullstack/.agents/skills/build-api-and-interface-design/SKILL.md +369 -0
- package/templates/hono-fullstack/.agents/skills/build-context-engineering/SKILL.md +353 -0
- package/templates/hono-fullstack/.agents/skills/build-incremental-implementation/SKILL.md +249 -0
- package/templates/hono-fullstack/.agents/skills/build-observability-and-instrumentation/SKILL.md +239 -0
- package/templates/hono-fullstack/.agents/skills/plan-planning-and-task-breakdown/SKILL.md +257 -0
- package/templates/{monorepo/.agents/skills/prototype → hono-fullstack/.agents/skills/plan-prototype}/LOGIC.md +1 -1
- package/templates/{monorepo/.agents/skills/prototype → hono-fullstack/.agents/skills/plan-prototype}/SKILL.md +2 -2
- package/templates/hono-fullstack/.agents/skills/{prototype → plan-prototype}/UI.md +2 -2
- package/templates/{monorepo/.agents/skills/research → hono-fullstack/.agents/skills/plan-research}/SKILL.md +2 -2
- package/templates/hono-fullstack/.agents/skills/plan-using-agent-skills/SKILL.md +185 -0
- package/templates/{monorepo/.agents/skills/wayfinder → hono-fullstack/.agents/skills/plan-wayfinder}/SKILL.md +43 -29
- package/templates/hono-fullstack/.agents/skills/review-code-review-and-quality/SKILL.md +400 -0
- package/templates/hono-fullstack/.agents/skills/review-doubt-driven-development/SKILL.md +244 -0
- package/templates/hono-fullstack/.agents/skills/review-security-and-hardening/SKILL.md +216 -0
- package/templates/hono-fullstack/.agents/skills/review-security-and-hardening/references/hardening-patterns.md +331 -0
- package/templates/hono-fullstack/.agents/skills/ship-ci-cd-and-automation/SKILL.md +393 -0
- package/templates/hono-fullstack/.agents/skills/ship-deprecation-and-migration/SKILL.md +252 -0
- package/templates/hono-fullstack/.agents/skills/ship-documentation-and-adrs/SKILL.md +298 -0
- package/templates/hono-fullstack/.agents/skills/ship-git-workflow-and-versioning/SKILL.md +355 -0
- package/templates/hono-fullstack/.agents/skills/ship-shipping-and-launch/SKILL.md +336 -0
- package/templates/hono-fullstack/.agents/skills/simplify-code-simplification/SKILL.md +332 -0
- package/templates/hono-fullstack/.agents/skills/simplify-performance-optimization/SKILL.md +268 -0
- package/templates/hono-fullstack/.agents/skills/simplify-performance-optimization/references/optimization-patterns.md +250 -0
- package/templates/hono-fullstack/.agents/skills/spec-constraint-driven-development/SKILL.md +318 -0
- package/templates/hono-fullstack/.agents/skills/spec-constraint-driven-development/references/floor-guard.md +182 -0
- package/templates/hono-fullstack/.agents/skills/spec-constraint-driven-development/scripts/quality-gate.mjs +45 -0
- package/templates/hono-fullstack/.agents/skills/spec-driven-development/SKILL.md +261 -0
- package/templates/hono-fullstack/.agents/skills/test-browser-testing-with-devtools/SKILL.md +319 -0
- package/templates/hono-fullstack/.agents/skills/test-debugging-and-error-recovery/SKILL.md +300 -0
- package/templates/hono-fullstack/.agents/skills/test-driven-development/SKILL.md +400 -0
- package/templates/hono-fullstack/.codegraph/.gitignore +5 -0
- package/templates/hono-fullstack/AGENTS.md +9 -20
- package/templates/hono-fullstack/README.md +22 -1
- package/templates/hono-fullstack/_gitignore +1 -0
- package/templates/hono-fullstack/apps/server/package.json +7 -2
- package/templates/hono-fullstack/apps/server/src/adapters/cloudflare/entry.ts +4 -30
- package/templates/hono-fullstack/apps/server/src/adapters/nodejs/bootstrap.ts +20 -12
- package/templates/hono-fullstack/apps/server/src/adapters/nodejs/entry.ts +7 -57
- package/templates/hono-fullstack/apps/server/src/app.ts +37 -21
- package/templates/hono-fullstack/apps/server/src/config.ts +1 -1
- package/templates/hono-fullstack/apps/server/src/di-container.ts +51 -0
- package/templates/hono-fullstack/apps/server/src/infra/logger/getter.ts +1 -1
- package/templates/hono-fullstack/apps/server/src/infra/logger/pino.ts +21 -34
- package/templates/hono-fullstack/apps/server/src/infra/work-runner/errors.ts +22 -0
- package/templates/hono-fullstack/apps/server/src/infra/work-runner/pass-through/runner.ts +28 -22
- package/templates/hono-fullstack/apps/server/src/infra/work-runner/piscina/runner.ts +11 -34
- package/templates/{hono-server/apps/server/src/infra/work-runner/example → hono-fullstack/apps/server/src/infra/work-runner/piscina}/worker-entry.ts +6 -2
- package/templates/hono-fullstack/apps/server/src/infra/work-runner/types.ts +2 -16
- package/templates/hono-fullstack/apps/server/src/infra/work-runner/utils/business-error.ts +10 -5
- package/templates/hono-fullstack/apps/server/src/infra/work-runner/utils/message.ts +5 -17
- package/templates/hono-fullstack/apps/server/src/middlewares/cors.ts +16 -22
- package/templates/hono-fullstack/apps/server/src/middlewares/logger.ts +34 -0
- package/templates/hono-fullstack/apps/server/src/modules/example/module.ts +8 -0
- package/templates/hono-fullstack/apps/server/src/modules/example/queries.ts +8 -0
- package/templates/hono-fullstack/apps/server/src/modules/example/routes.ts +74 -68
- package/templates/hono-fullstack/apps/server/src/modules/example/service.test.ts +53 -0
- package/templates/hono-fullstack/apps/server/src/modules/example/service.ts +54 -0
- package/templates/hono-fullstack/apps/server/src/modules/example/types.ts +12 -0
- package/templates/hono-fullstack/apps/server/src/modules/example/work-task/tasks.test.ts +9 -35
- package/templates/hono-fullstack/apps/server/src/modules/example/work-task/tasks.ts +15 -46
- package/templates/hono-fullstack/apps/server/src/shared/errors/defs/index.ts +6 -1
- package/templates/hono-fullstack/apps/server/src/shared/errors/handler.ts +1 -1
- package/templates/hono-fullstack/apps/server/src/shared/network/openapi/index.ts +1 -1
- package/templates/hono-fullstack/apps/server/src/shared/types/app.ts +51 -0
- package/templates/hono-fullstack/apps/server/src/shared/types/db.ts +126 -0
- package/templates/hono-fullstack/apps/server/src/shared/utils/data-access/check.ts +19 -0
- package/templates/hono-fullstack/apps/server/src/shared/utils/data-access/model.ts +47 -0
- package/templates/hono-fullstack/apps/server/src/shared/utils/data-access/params.ts +105 -0
- package/templates/hono-fullstack/apps/server/src/shared/utils/data-access/query.test.ts +139 -0
- package/templates/hono-fullstack/apps/server/src/shared/utils/data-access/query.ts +236 -0
- package/templates/hono-fullstack/apps/server/vite.config.ts +2 -2
- package/templates/hono-fullstack/apps/server/wrangler.jsonc +1 -1
- package/templates/hono-fullstack/apps/stack/frontend/assets/styles.css +6 -0
- package/templates/hono-fullstack/apps/stack/frontend/components/general/ErrorMessage.tsx +3 -1
- package/templates/hono-fullstack/apps/stack/frontend/components/layouts/AppLayout.tsx +2 -1
- package/templates/hono-fullstack/apps/stack/frontend/components/layouts/Header.tsx +14 -2
- package/templates/hono-fullstack/apps/stack/frontend/components/layouts/Page.tsx +2 -1
- package/templates/hono-fullstack/apps/stack/frontend/components/layouts/PageContainer.tsx +4 -1
- package/templates/hono-fullstack/apps/stack/frontend/modules/example/api.ts +16 -9
- package/templates/hono-fullstack/apps/stack/frontend/modules/example/components/ExampleForm.tsx +25 -12
- package/templates/hono-fullstack/apps/stack/frontend/modules/example/components/ExampleList.tsx +13 -4
- package/templates/hono-fullstack/apps/stack/frontend/modules/example/hooks/api-hooks.ts +3 -3
- package/templates/hono-fullstack/apps/stack/frontend/routes/__root.tsx +1 -1
- package/templates/hono-fullstack/apps/stack/frontend/routes/index.tsx +16 -4
- package/templates/hono-fullstack/apps/stack/package.json +9 -4
- package/templates/hono-fullstack/apps/stack/panda.config.ts +31 -0
- package/templates/hono-fullstack/apps/stack/tsconfig.json +1 -0
- package/templates/hono-fullstack/apps/stack/turbo.json +20 -0
- package/templates/hono-fullstack/apps/stack/vite.config.ts +48 -12
- package/templates/hono-fullstack/apps/stack/wrangler.jsonc +1 -1
- package/templates/hono-fullstack/envs/.env.example.sqlite-d1 +1 -0
- package/templates/hono-fullstack/libs/db/drizzle-kit/sqlite-d1.config.ts +29 -10
- package/templates/hono-fullstack/libs/db/package.json +1 -0
- package/templates/hono-fullstack/libs/db/src/dialects/sqlite/schema/columns.ts +1 -1
- package/templates/hono-fullstack/libs/db/src/dialects/sqlite/schema/modules/examples/examples.ts +6 -3
- package/templates/hono-fullstack/libs/db/src/dialects/sqlite/schema/vo.ts +7 -1
- package/templates/hono-fullstack/libs/definition/README.md +81 -0
- package/templates/hono-fullstack/libs/definition/package.json +3 -1
- package/templates/hono-fullstack/libs/definition/src/constants/index.ts +1 -0
- package/templates/hono-fullstack/libs/definition/src/constants/pagination.ts +3 -0
- package/templates/hono-fullstack/libs/definition/src/modules/common-contracts.ts +24 -0
- package/templates/hono-fullstack/libs/definition/src/modules/example/contracts.ts +34 -0
- package/templates/hono-fullstack/libs/definition/src/modules/example/index.ts +1 -16
- package/templates/hono-fullstack/libs/definition/src/modules/index.ts +2 -0
- package/templates/hono-fullstack/libs/definition/src/modules/vo-generated-types.ts +12 -0
- package/templates/hono-fullstack/libs/ui/.storybook/main.ts +32 -0
- package/templates/hono-fullstack/libs/ui/.storybook/panda.config.ts +22 -0
- package/templates/hono-fullstack/libs/ui/.storybook/preview.tsx +79 -0
- package/templates/hono-fullstack/libs/ui/.storybook/styles.css +1 -0
- package/templates/hono-fullstack/libs/ui/.storybook/vite.config.ts +37 -0
- package/templates/hono-fullstack/libs/ui/components.json +15 -0
- package/templates/hono-fullstack/libs/ui/package.json +114 -0
- package/templates/hono-fullstack/libs/ui/panda.config.ts +41 -0
- package/templates/hono-fullstack/libs/ui/src/Tooltip.tsx +47 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/buttons/Button.tsx +80 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/buttons/CloseButton.tsx +15 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/buttons/IconButton.tsx +10 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/collections/Combobox.tsx +91 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/collections/Select.tsx +88 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/collections/TreeView.tsx +142 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/data-display/Avatar.tsx +64 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/data-display/Badge.tsx +7 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/data-display/Card.tsx +23 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/data-display/Clipboard.tsx +77 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/data-display/Icon.tsx +9 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/data-display/Table.tsx +51 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/data-display/Tag.tsx +23 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/data-display/Timeline.tsx +33 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/date-and-time/DatePicker.tsx +255 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/disclosure/Accordion.tsx +48 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/disclosure/Breadcrumb.tsx +50 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/disclosure/Collapsible.tsx +34 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/disclosure/Pagination.tsx +74 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/disclosure/Steps.tsx +91 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/disclosure/Tabs.tsx +37 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/feedback/Alert.tsx +52 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/feedback/Progress.tsx +41 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/feedback/ProgressCircle.tsx +40 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/feedback/Skeleton.tsx +37 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/feedback/Spinner.tsx +7 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/feedback/Toast.tsx +99 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/Checkbox.tsx +95 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/ColorPicker.tsx +148 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/Editable.tsx +44 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/Field.tsx +36 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/Fieldset.tsx +34 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/FileUpload.tsx +143 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/Input.tsx +7 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/InputAddon.tsx +7 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/InputGroup.tsx +61 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/NativeSelect.tsx +81 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/NumberInput.tsx +63 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/PasswordInput.tsx +76 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/PinInput.tsx +36 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/RadioCard.tsx +96 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/RadioGroup.tsx +61 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/RatingGroup.tsx +106 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/SegmentGroup.tsx +68 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/Slider.tsx +87 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/Switch.tsx +74 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/TagsInput.tsx +77 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/forms/Textarea.tsx +7 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/index.ts +98 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/internal/AbsoluteCenter.tsx +7 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/internal/Loader.tsx +69 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/internal/Span.tsx +5 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/internal/create-layout.ts +18 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/layout/Float.tsx +7 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/layout/Grid.tsx +17 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/layout/Group.tsx +7 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/layout/ScrollArea.tsx +46 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/layout/Separator.tsx +26 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/layout/Stack.tsx +54 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/overlays/Dialog.tsx +69 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/overlays/Drawer.tsx +49 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/overlays/HoverCard.tsx +37 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/overlays/Menu.tsx +74 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/overlays/OverlayManager.test.ts +124 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/overlays/OverlayManager.tsx +189 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/overlays/Popover.tsx +57 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/overlays/Tooltip.tsx +37 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/typography/Heading.tsx +6 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/typography/Link.tsx +7 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/typography/LinkOverlay.tsx +21 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/typography/Text.tsx +6 -0
- package/templates/hono-fullstack/libs/ui/src/components/atoms/utilities/VisuallyHidden.tsx +13 -0
- package/templates/hono-fullstack/libs/ui/src/hooks.ts +242 -0
- package/templates/hono-fullstack/libs/ui/src/index.ts +19 -0
- package/templates/hono-fullstack/libs/ui/src/theme/animation-styles.ts +50 -0
- package/templates/hono-fullstack/libs/ui/src/theme/breakpoints.ts +7 -0
- package/templates/hono-fullstack/libs/ui/src/theme/conditions.ts +12 -0
- package/templates/hono-fullstack/libs/ui/src/theme/containers.ts +16 -0
- package/templates/hono-fullstack/libs/ui/src/theme/global-css.ts +12 -0
- package/templates/hono-fullstack/libs/ui/src/theme/keyframes.ts +157 -0
- package/templates/hono-fullstack/libs/ui/src/theme/layer-styles.ts +11 -0
- package/templates/hono-fullstack/libs/ui/src/theme/patterns/grid.ts +51 -0
- package/templates/hono-fullstack/libs/ui/src/theme/patterns/index.ts +60 -0
- package/templates/hono-fullstack/libs/ui/src/theme/patterns/stack.ts +46 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/absolute-center.ts +38 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/accordion.ts +68 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/alert.ts +83 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/avatar.ts +155 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/badge.ts +67 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/breadcrumb.ts +69 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/button.ts +149 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/card.ts +36 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/checkbox.ts +120 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/clipboard.ts +22 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/collapsible.ts +26 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/color-picker.ts +299 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/combobox.ts +141 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/date-picker.ts +302 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/dialog.ts +191 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/drawer.ts +170 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/editable.ts +64 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/field.ts +41 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/fieldset.ts +47 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/file-upload.ts +86 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/group.ts +78 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/heading.ts +24 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/hover-card.ts +47 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/icon.ts +25 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/index.ts +120 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/input-addon.ts +51 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/input-group.ts +77 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/input.ts +99 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/link.ts +36 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/menu.ts +114 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/native-select.ts +92 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/number-input.ts +91 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/pagination.ts +9 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/pin-input.ts +33 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/popover.ts +78 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/progress-circle.ts +50 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/progress.ts +112 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/radio-card.ts +223 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/radio-group.ts +78 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/rating-group.ts +98 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/scroll-area.ts +119 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/segment-group.ts +162 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/select.ts +157 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/separator.ts +25 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/skeleton.ts +65 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/slider.ts +164 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/spinner.ts +34 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/steps.ts +162 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/switch.ts +150 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/table.ts +150 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/tabs.ts +128 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/tag.ts +114 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/tags-input.ts +201 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/text.ts +7 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/textarea.ts +90 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/timeline.ts +137 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/toast.ts +52 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/tooltip.ts +44 -0
- package/templates/hono-fullstack/libs/ui/src/theme/recipes/tree-view.ts +200 -0
- package/templates/hono-fullstack/libs/ui/src/theme/semanticTokens/colors/amber.ts +91 -0
- package/templates/hono-fullstack/libs/ui/src/theme/semanticTokens/colors/gray.ts +103 -0
- package/templates/hono-fullstack/libs/ui/src/theme/semanticTokens/colors/green.ts +88 -0
- package/templates/hono-fullstack/libs/ui/src/theme/semanticTokens/colors/index.ts +14 -0
- package/templates/hono-fullstack/libs/ui/src/theme/semanticTokens/colors/lime.ts +91 -0
- package/templates/hono-fullstack/libs/ui/src/theme/semanticTokens/colors/red.ts +88 -0
- package/templates/hono-fullstack/libs/ui/src/theme/semanticTokens/index.ts +8 -0
- package/templates/hono-fullstack/libs/ui/src/theme/semanticTokens/shadows.ts +46 -0
- package/templates/hono-fullstack/libs/ui/src/theme/text-styles.ts +82 -0
- package/templates/hono-fullstack/libs/ui/src/theme/tokens/animations.ts +8 -0
- package/templates/hono-fullstack/libs/ui/src/theme/tokens/aspect-ratio.ts +6 -0
- package/templates/hono-fullstack/libs/ui/src/theme/tokens/borders.ts +5 -0
- package/templates/hono-fullstack/libs/ui/src/theme/tokens/colors.ts +35 -0
- package/templates/hono-fullstack/libs/ui/src/theme/tokens/durations.ts +11 -0
- package/templates/hono-fullstack/libs/ui/src/theme/tokens/easings.ts +9 -0
- package/templates/hono-fullstack/libs/ui/src/theme/tokens/index.ts +42 -0
- package/templates/hono-fullstack/libs/ui/src/theme/tokens/radii.ts +13 -0
- package/templates/hono-fullstack/libs/ui/src/theme/tokens/sizes.ts +27 -0
- package/templates/hono-fullstack/libs/ui/src/theme/tokens/spacing.ts +41 -0
- package/templates/hono-fullstack/libs/ui/src/theme/tokens/typography.ts +86 -0
- package/templates/hono-fullstack/libs/ui/src/theme/tokens/z-index.ts +43 -0
- package/templates/hono-fullstack/libs/ui/stories/README.md +107 -0
- package/templates/hono-fullstack/libs/ui/stories/actions/Button.stories.tsx +260 -0
- package/templates/hono-fullstack/libs/ui/stories/actions/Clipboard.stories.tsx +87 -0
- package/templates/hono-fullstack/libs/ui/stories/actions/IconButton.stories.tsx +33 -0
- package/templates/hono-fullstack/libs/ui/stories/collections/Combobox.stories.tsx +334 -0
- package/templates/hono-fullstack/libs/ui/stories/collections/Select.stories.tsx +342 -0
- package/templates/hono-fullstack/libs/ui/stories/collections/TreeView.stories.tsx +252 -0
- package/templates/hono-fullstack/libs/ui/stories/color/ColorPicker.stories.tsx +217 -0
- package/templates/hono-fullstack/libs/ui/stories/date/DatePicker.stories.tsx +302 -0
- package/templates/hono-fullstack/libs/ui/stories/disclosure/Accordion.stories.tsx +105 -0
- package/templates/hono-fullstack/libs/ui/stories/disclosure/Collapsible.stories.tsx +55 -0
- package/templates/hono-fullstack/libs/ui/stories/disclosure/Steps.stories.tsx +208 -0
- package/templates/hono-fullstack/libs/ui/stories/disclosure/Tabs.stories.tsx +176 -0
- package/templates/hono-fullstack/libs/ui/stories/display/Avatar.stories.tsx +108 -0
- package/templates/hono-fullstack/libs/ui/stories/display/Badge.stories.tsx +90 -0
- package/templates/hono-fullstack/libs/ui/stories/display/Card.stories.tsx +121 -0
- package/templates/hono-fullstack/libs/ui/stories/display/Heading.stories.tsx +62 -0
- package/templates/hono-fullstack/libs/ui/stories/display/Icon.stories.tsx +51 -0
- package/templates/hono-fullstack/libs/ui/stories/display/Table.stories.tsx +222 -0
- package/templates/hono-fullstack/libs/ui/stories/display/Tag.stories.tsx +168 -0
- package/templates/hono-fullstack/libs/ui/stories/display/Text.stories.tsx +32 -0
- package/templates/hono-fullstack/libs/ui/stories/display/Timeline.stories.tsx +241 -0
- package/templates/hono-fullstack/libs/ui/stories/feedback/Alert.stories.tsx +122 -0
- package/templates/hono-fullstack/libs/ui/stories/feedback/Progress.stories.tsx +163 -0
- package/templates/hono-fullstack/libs/ui/stories/feedback/ProgressCircle.stories.tsx +176 -0
- package/templates/hono-fullstack/libs/ui/stories/feedback/Skeleton.stories.tsx +75 -0
- package/templates/hono-fullstack/libs/ui/stories/feedback/Spinner.stories.tsx +49 -0
- package/templates/hono-fullstack/libs/ui/stories/feedback/Toast.stories.tsx +145 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/Checkbox.stories.tsx +281 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/Editable.stories.tsx +94 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/Field.stories.tsx +72 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/Fieldset.stories.tsx +109 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/FileUpload.stories.tsx +115 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/Form.stories.tsx +120 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/Input.stories.tsx +155 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/InputGroup.stories.tsx +79 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/NativeSelect.stories.tsx +160 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/NumberInput.stories.tsx +149 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/PasswordInput.stories.tsx +141 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/PinInput.stories.tsx +155 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/RadioCard.stories.tsx +265 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/RadioGroup.stories.tsx +109 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/RatingGroup.stories.tsx +123 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/SegmentGroup.stories.tsx +130 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/Slider.stories.tsx +190 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/Switch.stories.tsx +124 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/TagsInput.stories.tsx +154 -0
- package/templates/hono-fullstack/libs/ui/stories/forms/Textarea.stories.tsx +148 -0
- package/templates/hono-fullstack/libs/ui/stories/layout/Grid.stories.tsx +60 -0
- package/templates/hono-fullstack/libs/ui/stories/layout/Positioning.stories.tsx +90 -0
- package/templates/hono-fullstack/libs/ui/stories/layout/ScrollArea.stories.tsx +68 -0
- package/templates/hono-fullstack/libs/ui/stories/layout/Stack.stories.tsx +87 -0
- package/templates/hono-fullstack/libs/ui/stories/navigation/Breadcrumb.stories.tsx +104 -0
- package/templates/hono-fullstack/libs/ui/stories/navigation/Link.stories.tsx +62 -0
- package/templates/hono-fullstack/libs/ui/stories/navigation/LinkBox.stories.tsx +45 -0
- package/templates/hono-fullstack/libs/ui/stories/navigation/Pagination.stories.tsx +74 -0
- package/templates/hono-fullstack/libs/ui/stories/overlays/Dialog.stories.tsx +255 -0
- package/templates/hono-fullstack/libs/ui/stories/overlays/Drawer.stories.tsx +114 -0
- package/templates/hono-fullstack/libs/ui/stories/overlays/HoverCard.stories.tsx +47 -0
- package/templates/hono-fullstack/libs/ui/stories/overlays/Menu.stories.tsx +133 -0
- package/templates/hono-fullstack/libs/ui/stories/overlays/OverlayManager.stories.tsx +206 -0
- package/templates/hono-fullstack/libs/ui/stories/overlays/Popover.stories.tsx +73 -0
- package/templates/hono-fullstack/libs/ui/stories/overlays/Tooltip.stories.tsx +114 -0
- package/templates/hono-fullstack/libs/ui/stories/tsconfig.json +14 -0
- package/templates/hono-fullstack/libs/ui/tsconfig.build.json +5 -0
- package/templates/hono-fullstack/libs/ui/tsconfig.json +13 -0
- package/templates/hono-fullstack/libs/ui/turbo.json +28 -0
- package/templates/hono-fullstack/libs/ui/vite.config.ts +33 -0
- package/templates/hono-fullstack/oyo.config.json +30 -4
- package/templates/hono-fullstack/package.json +1 -0
- package/templates/hono-fullstack/pnpm-workspace.yaml +20 -10
- package/templates/hono-fullstack/turbo.json +10 -0
- package/templates/hono-server/.agents/skills/{grilling → ask-grilling}/SKILL.md +1 -1
- package/templates/hono-server/.agents/skills/build-api-and-interface-design/SKILL.md +369 -0
- package/templates/hono-server/.agents/skills/build-context-engineering/SKILL.md +353 -0
- package/templates/hono-server/.agents/skills/build-incremental-implementation/SKILL.md +249 -0
- package/templates/hono-server/.agents/skills/build-observability-and-instrumentation/SKILL.md +239 -0
- package/templates/hono-server/.agents/skills/plan-planning-and-task-breakdown/SKILL.md +257 -0
- package/templates/hono-server/.agents/skills/{prototype → plan-prototype}/LOGIC.md +1 -1
- package/templates/hono-server/.agents/skills/{prototype → plan-prototype}/SKILL.md +2 -2
- package/templates/{monorepo/.agents/skills/prototype → hono-server/.agents/skills/plan-prototype}/UI.md +2 -2
- package/templates/{hono-fullstack/.agents/skills/research → hono-server/.agents/skills/plan-research}/SKILL.md +2 -2
- package/templates/hono-server/.agents/skills/plan-using-agent-skills/SKILL.md +185 -0
- package/templates/{hono-fullstack/.agents/skills/wayfinder → hono-server/.agents/skills/plan-wayfinder}/SKILL.md +43 -29
- package/templates/hono-server/.agents/skills/review-code-review-and-quality/SKILL.md +400 -0
- package/templates/hono-server/.agents/skills/review-doubt-driven-development/SKILL.md +244 -0
- package/templates/hono-server/.agents/skills/review-security-and-hardening/SKILL.md +216 -0
- package/templates/hono-server/.agents/skills/review-security-and-hardening/references/hardening-patterns.md +331 -0
- package/templates/hono-server/.agents/skills/ship-ci-cd-and-automation/SKILL.md +393 -0
- package/templates/hono-server/.agents/skills/ship-deprecation-and-migration/SKILL.md +252 -0
- package/templates/hono-server/.agents/skills/ship-documentation-and-adrs/SKILL.md +298 -0
- package/templates/hono-server/.agents/skills/ship-git-workflow-and-versioning/SKILL.md +355 -0
- package/templates/hono-server/.agents/skills/ship-shipping-and-launch/SKILL.md +336 -0
- package/templates/hono-server/.agents/skills/simplify-code-simplification/SKILL.md +332 -0
- package/templates/hono-server/.agents/skills/simplify-performance-optimization/SKILL.md +268 -0
- package/templates/hono-server/.agents/skills/simplify-performance-optimization/references/optimization-patterns.md +250 -0
- package/templates/hono-server/.agents/skills/spec-constraint-driven-development/SKILL.md +318 -0
- package/templates/hono-server/.agents/skills/spec-constraint-driven-development/references/floor-guard.md +182 -0
- package/templates/hono-server/.agents/skills/spec-constraint-driven-development/scripts/quality-gate.mjs +45 -0
- package/templates/hono-server/.agents/skills/spec-driven-development/SKILL.md +261 -0
- package/templates/hono-server/.agents/skills/test-browser-testing-with-devtools/SKILL.md +319 -0
- package/templates/hono-server/.agents/skills/test-debugging-and-error-recovery/SKILL.md +300 -0
- package/templates/hono-server/.agents/skills/test-driven-development/SKILL.md +400 -0
- package/templates/hono-server/.codegraph/.gitignore +5 -0
- package/templates/hono-server/AGENTS.md +9 -20
- package/templates/hono-server/README.md +9 -1
- package/templates/hono-server/_gitignore +1 -0
- package/templates/hono-server/apps/server/package.json +7 -2
- package/templates/hono-server/apps/server/src/adapters/cloudflare/entry.ts +4 -30
- package/templates/hono-server/apps/server/src/adapters/nodejs/bootstrap.ts +20 -12
- package/templates/hono-server/apps/server/src/adapters/nodejs/entry.ts +7 -57
- package/templates/hono-server/apps/server/src/app.ts +37 -21
- package/templates/hono-server/apps/server/src/config.ts +1 -1
- package/templates/hono-server/apps/server/src/di-container.ts +51 -0
- package/templates/hono-server/apps/server/src/infra/logger/getter.ts +1 -1
- package/templates/hono-server/apps/server/src/infra/logger/pino.ts +21 -34
- package/templates/hono-server/apps/server/src/infra/work-runner/errors.ts +22 -0
- package/templates/hono-server/apps/server/src/infra/work-runner/pass-through/runner.ts +28 -22
- package/templates/hono-server/apps/server/src/infra/work-runner/piscina/runner.ts +11 -34
- package/templates/{hono-fullstack/apps/server/src/infra/work-runner/example → hono-server/apps/server/src/infra/work-runner/piscina}/worker-entry.ts +6 -2
- package/templates/hono-server/apps/server/src/infra/work-runner/types.ts +2 -16
- package/templates/hono-server/apps/server/src/infra/work-runner/utils/business-error.ts +10 -5
- package/templates/hono-server/apps/server/src/infra/work-runner/utils/message.ts +5 -17
- package/templates/hono-server/apps/server/src/middlewares/cors.ts +16 -22
- package/templates/hono-server/apps/server/src/middlewares/logger.ts +34 -0
- package/templates/hono-server/apps/server/src/modules/example/module.ts +8 -0
- package/templates/hono-server/apps/server/src/modules/example/queries.ts +8 -0
- package/templates/hono-server/apps/server/src/modules/example/routes.ts +74 -68
- package/templates/hono-server/apps/server/src/modules/example/service.test.ts +53 -0
- package/templates/hono-server/apps/server/src/modules/example/service.ts +54 -0
- package/templates/hono-server/apps/server/src/modules/example/types.ts +12 -0
- package/templates/hono-server/apps/server/src/modules/example/work-task/tasks.test.ts +9 -35
- package/templates/hono-server/apps/server/src/modules/example/work-task/tasks.ts +15 -46
- package/templates/hono-server/apps/server/src/shared/errors/defs/index.ts +6 -1
- package/templates/hono-server/apps/server/src/shared/errors/handler.ts +1 -1
- package/templates/hono-server/apps/server/src/shared/network/openapi/index.ts +1 -1
- package/templates/hono-server/apps/server/src/shared/types/app.ts +51 -0
- package/templates/hono-server/apps/server/src/shared/types/db.ts +126 -0
- package/templates/hono-server/apps/server/src/shared/utils/data-access/check.ts +19 -0
- package/templates/hono-server/apps/server/src/shared/utils/data-access/model.ts +47 -0
- package/templates/hono-server/apps/server/src/shared/utils/data-access/params.ts +105 -0
- package/templates/hono-server/apps/server/src/shared/utils/data-access/query.test.ts +139 -0
- package/templates/hono-server/apps/server/src/shared/utils/data-access/query.ts +236 -0
- package/templates/hono-server/apps/server/vite.config.ts +2 -2
- package/templates/hono-server/apps/server/wrangler.jsonc +1 -1
- package/templates/hono-server/docker/README.md +1 -1
- package/templates/hono-server/envs/.env.example.sqlite-d1 +1 -0
- package/templates/hono-server/libs/db/drizzle-kit/sqlite-d1.config.ts +29 -10
- package/templates/hono-server/libs/db/package.json +1 -0
- package/templates/hono-server/libs/db/src/dialects/sqlite/schema/columns.ts +1 -1
- package/templates/hono-server/libs/db/src/dialects/sqlite/schema/modules/examples/examples.ts +6 -3
- package/templates/hono-server/libs/db/src/dialects/sqlite/schema/vo.ts +7 -1
- package/templates/hono-server/libs/definition/README.md +81 -0
- package/templates/hono-server/libs/definition/package.json +3 -1
- package/templates/hono-server/libs/definition/src/constants/index.ts +1 -0
- package/templates/hono-server/libs/definition/src/constants/pagination.ts +3 -0
- package/templates/hono-server/libs/definition/src/modules/common-contracts.ts +24 -0
- package/templates/hono-server/libs/definition/src/modules/example/contracts.ts +34 -0
- package/templates/hono-server/libs/definition/src/modules/example/index.ts +1 -16
- package/templates/hono-server/libs/definition/src/modules/index.ts +2 -0
- package/templates/hono-server/libs/definition/src/modules/vo-generated-types.ts +12 -0
- package/templates/hono-server/oyo.config.json +30 -4
- package/templates/hono-server/package.json +1 -0
- package/templates/hono-server/pnpm-workspace.yaml +9 -7
- package/templates/hono-server/turbo.json +10 -0
- package/templates/{hono-fullstack/.agents/skills/grilling → monorepo/.agents/skills/ask-grilling}/SKILL.md +1 -1
- package/templates/monorepo/.agents/skills/build-api-and-interface-design/SKILL.md +369 -0
- package/templates/monorepo/.agents/skills/build-context-engineering/SKILL.md +353 -0
- package/templates/monorepo/.agents/skills/build-incremental-implementation/SKILL.md +249 -0
- package/templates/monorepo/.agents/skills/build-observability-and-instrumentation/SKILL.md +239 -0
- package/templates/monorepo/.agents/skills/plan-planning-and-task-breakdown/SKILL.md +257 -0
- package/templates/{hono-fullstack/.agents/skills/prototype → monorepo/.agents/skills/plan-prototype}/LOGIC.md +1 -1
- package/templates/{hono-fullstack/.agents/skills/prototype → monorepo/.agents/skills/plan-prototype}/SKILL.md +2 -2
- package/templates/{hono-server/.agents/skills/prototype → monorepo/.agents/skills/plan-prototype}/UI.md +2 -2
- package/templates/{hono-server/.agents/skills/research → monorepo/.agents/skills/plan-research}/SKILL.md +2 -2
- package/templates/monorepo/.agents/skills/plan-using-agent-skills/SKILL.md +185 -0
- package/templates/{hono-server/.agents/skills/wayfinder → monorepo/.agents/skills/plan-wayfinder}/SKILL.md +43 -29
- package/templates/monorepo/.agents/skills/review-code-review-and-quality/SKILL.md +400 -0
- package/templates/monorepo/.agents/skills/review-doubt-driven-development/SKILL.md +244 -0
- package/templates/monorepo/.agents/skills/review-security-and-hardening/SKILL.md +216 -0
- package/templates/monorepo/.agents/skills/review-security-and-hardening/references/hardening-patterns.md +331 -0
- package/templates/monorepo/.agents/skills/ship-ci-cd-and-automation/SKILL.md +393 -0
- package/templates/monorepo/.agents/skills/ship-deprecation-and-migration/SKILL.md +252 -0
- package/templates/monorepo/.agents/skills/ship-documentation-and-adrs/SKILL.md +298 -0
- package/templates/monorepo/.agents/skills/ship-git-workflow-and-versioning/SKILL.md +355 -0
- package/templates/monorepo/.agents/skills/ship-shipping-and-launch/SKILL.md +336 -0
- package/templates/monorepo/.agents/skills/simplify-code-simplification/SKILL.md +332 -0
- package/templates/monorepo/.agents/skills/simplify-performance-optimization/SKILL.md +268 -0
- package/templates/monorepo/.agents/skills/simplify-performance-optimization/references/optimization-patterns.md +250 -0
- package/templates/monorepo/.agents/skills/spec-constraint-driven-development/SKILL.md +318 -0
- package/templates/monorepo/.agents/skills/spec-constraint-driven-development/references/floor-guard.md +182 -0
- package/templates/monorepo/.agents/skills/spec-constraint-driven-development/scripts/quality-gate.mjs +45 -0
- package/templates/monorepo/.agents/skills/spec-driven-development/SKILL.md +261 -0
- package/templates/monorepo/.agents/skills/test-browser-testing-with-devtools/SKILL.md +319 -0
- package/templates/monorepo/.agents/skills/test-debugging-and-error-recovery/SKILL.md +300 -0
- package/templates/monorepo/.agents/skills/test-driven-development/SKILL.md +400 -0
- package/templates/monorepo/.codegraph/.gitignore +5 -0
- package/templates/monorepo/AGENTS.md +9 -20
- package/templates/monorepo/_gitignore +1 -0
- package/templates/monorepo/oyo.config.json +6 -4
- package/templates/monorepo/pnpm-workspace.yaml +4 -4
- package/templates/monorepo/turbo.json +10 -0
- package/templates/hono-fullstack/.agents/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
- package/templates/hono-fullstack/.agents/skills/ask-matt/SKILL.md +0 -90
- package/templates/hono-fullstack/.agents/skills/ask-matt/agents/openai.yaml +0 -5
- package/templates/hono-fullstack/.agents/skills/code-review/SKILL.md +0 -87
- package/templates/hono-fullstack/.agents/skills/code-review/agents/openai.yaml +0 -3
- package/templates/hono-fullstack/.agents/skills/codebase-design/DEEPENING.md +0 -37
- package/templates/hono-fullstack/.agents/skills/codebase-design/DESIGN-IT-TWICE.md +0 -44
- package/templates/hono-fullstack/.agents/skills/codebase-design/SKILL.md +0 -114
- package/templates/hono-fullstack/.agents/skills/codebase-design/agents/openai.yaml +0 -3
- package/templates/hono-fullstack/.agents/skills/confirm-requirements/SKILL.md +0 -25
- package/templates/hono-fullstack/.agents/skills/diagnosing-bugs/SKILL.md +0 -140
- package/templates/hono-fullstack/.agents/skills/diagnosing-bugs/agents/openai.yaml +0 -3
- package/templates/hono-fullstack/.agents/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +0 -44
- package/templates/hono-fullstack/.agents/skills/domain-modeling/ADR-FORMAT.md +0 -47
- package/templates/hono-fullstack/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +0 -60
- package/templates/hono-fullstack/.agents/skills/domain-modeling/SKILL.md +0 -74
- package/templates/hono-fullstack/.agents/skills/domain-modeling/agents/openai.yaml +0 -3
- package/templates/hono-fullstack/.agents/skills/grill-me/SKILL.md +0 -7
- package/templates/hono-fullstack/.agents/skills/grill-me/agents/openai.yaml +0 -5
- package/templates/hono-fullstack/.agents/skills/implement/SKILL.md +0 -15
- package/templates/hono-fullstack/.agents/skills/implement/agents/openai.yaml +0 -5
- package/templates/hono-fullstack/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +0 -123
- package/templates/hono-fullstack/.agents/skills/improve-codebase-architecture/SKILL.md +0 -71
- package/templates/hono-fullstack/.agents/skills/improve-codebase-architecture/agents/openai.yaml +0 -5
- package/templates/hono-fullstack/.agents/skills/resolving-merge-conflicts/SKILL.md +0 -14
- package/templates/hono-fullstack/.agents/skills/resolving-merge-conflicts/agents/openai.yaml +0 -3
- package/templates/hono-fullstack/.agents/skills/scoped-code-review/SKILL.md +0 -113
- package/templates/hono-fullstack/.agents/skills/setup-matt-pocock-skills/SKILL.md +0 -116
- package/templates/hono-fullstack/.agents/skills/setup-matt-pocock-skills/agents/openai.yaml +0 -5
- package/templates/hono-fullstack/.agents/skills/setup-matt-pocock-skills/domain.md +0 -51
- package/templates/hono-fullstack/.agents/skills/setup-matt-pocock-skills/issue-tracker-github.md +0 -45
- package/templates/hono-fullstack/.agents/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +0 -46
- package/templates/hono-fullstack/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +0 -30
- package/templates/hono-fullstack/.agents/skills/setup-matt-pocock-skills/triage-labels.md +0 -15
- package/templates/hono-fullstack/.agents/skills/tdd/SKILL.md +0 -38
- package/templates/hono-fullstack/.agents/skills/tdd/agents/openai.yaml +0 -3
- package/templates/hono-fullstack/.agents/skills/tdd/mocking.md +0 -59
- package/templates/hono-fullstack/.agents/skills/tdd/tests.md +0 -77
- package/templates/hono-fullstack/.agents/skills/teach/GLOSSARY-FORMAT.md +0 -35
- package/templates/hono-fullstack/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
- package/templates/hono-fullstack/.agents/skills/teach/MISSION-FORMAT.md +0 -31
- package/templates/hono-fullstack/.agents/skills/teach/RESOURCES-FORMAT.md +0 -32
- package/templates/hono-fullstack/.agents/skills/teach/SKILL.md +0 -140
- package/templates/hono-fullstack/.agents/skills/teach/agents/openai.yaml +0 -5
- package/templates/hono-fullstack/.agents/skills/to-questionnaire/SKILL.md +0 -53
- package/templates/hono-fullstack/.agents/skills/to-questionnaire/agents/openai.yaml +0 -5
- package/templates/hono-fullstack/.agents/skills/triage/AGENT-BRIEF.md +0 -207
- package/templates/hono-fullstack/.agents/skills/triage/OUT-OF-SCOPE.md +0 -105
- package/templates/hono-fullstack/.agents/skills/triage/SKILL.md +0 -112
- package/templates/hono-fullstack/.agents/skills/triage/agents/openai.yaml +0 -5
- package/templates/hono-fullstack/.agents/skills/wait-what/SKILL.md +0 -7
- package/templates/hono-fullstack/.agents/skills/wait-what/agents/openai.yaml +0 -5
- package/templates/hono-fullstack/.agents/skills/wizard/SKILL.md +0 -44
- package/templates/hono-fullstack/.agents/skills/wizard/agents/openai.yaml +0 -3
- package/templates/hono-fullstack/.agents/skills/wizard/template.sh +0 -204
- package/templates/hono-fullstack/.agents/skills/writing-for-agents/SKILL-MECHANICS.md +0 -22
- package/templates/hono-fullstack/.agents/skills/writing-for-agents/SKILL.md +0 -81
- package/templates/hono-fullstack/.agents/skills/writing-for-agents/agents/openai.yaml +0 -3
- package/templates/hono-fullstack/apps/server/src/modules/example/contracts.ts +0 -9
- package/templates/hono-fullstack/apps/server/src/shared/app/types.ts +0 -44
- package/templates/hono-fullstack/apps/stack/frontend/styles.css +0 -23
- package/templates/hono-fullstack/docs/agents/domain.md +0 -41
- package/templates/hono-fullstack/docs/agents/issue-tracker.md +0 -30
- package/templates/hono-fullstack/docs/agents/triage-labels.md +0 -15
- package/templates/hono-server/.agents/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
- package/templates/hono-server/.agents/skills/ask-matt/SKILL.md +0 -90
- package/templates/hono-server/.agents/skills/ask-matt/agents/openai.yaml +0 -5
- package/templates/hono-server/.agents/skills/code-review/SKILL.md +0 -87
- package/templates/hono-server/.agents/skills/code-review/agents/openai.yaml +0 -3
- package/templates/hono-server/.agents/skills/codebase-design/DEEPENING.md +0 -37
- package/templates/hono-server/.agents/skills/codebase-design/DESIGN-IT-TWICE.md +0 -44
- package/templates/hono-server/.agents/skills/codebase-design/SKILL.md +0 -114
- package/templates/hono-server/.agents/skills/codebase-design/agents/openai.yaml +0 -3
- package/templates/hono-server/.agents/skills/confirm-requirements/SKILL.md +0 -25
- package/templates/hono-server/.agents/skills/diagnosing-bugs/SKILL.md +0 -140
- package/templates/hono-server/.agents/skills/diagnosing-bugs/agents/openai.yaml +0 -3
- package/templates/hono-server/.agents/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +0 -44
- package/templates/hono-server/.agents/skills/domain-modeling/ADR-FORMAT.md +0 -47
- package/templates/hono-server/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +0 -60
- package/templates/hono-server/.agents/skills/domain-modeling/SKILL.md +0 -74
- package/templates/hono-server/.agents/skills/domain-modeling/agents/openai.yaml +0 -3
- package/templates/hono-server/.agents/skills/grill-me/SKILL.md +0 -7
- package/templates/hono-server/.agents/skills/grill-me/agents/openai.yaml +0 -5
- package/templates/hono-server/.agents/skills/implement/SKILL.md +0 -15
- package/templates/hono-server/.agents/skills/implement/agents/openai.yaml +0 -5
- package/templates/hono-server/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +0 -123
- package/templates/hono-server/.agents/skills/improve-codebase-architecture/SKILL.md +0 -71
- package/templates/hono-server/.agents/skills/improve-codebase-architecture/agents/openai.yaml +0 -5
- package/templates/hono-server/.agents/skills/resolving-merge-conflicts/SKILL.md +0 -14
- package/templates/hono-server/.agents/skills/resolving-merge-conflicts/agents/openai.yaml +0 -3
- package/templates/hono-server/.agents/skills/scoped-code-review/SKILL.md +0 -113
- package/templates/hono-server/.agents/skills/setup-matt-pocock-skills/SKILL.md +0 -116
- package/templates/hono-server/.agents/skills/setup-matt-pocock-skills/agents/openai.yaml +0 -5
- package/templates/hono-server/.agents/skills/setup-matt-pocock-skills/domain.md +0 -51
- package/templates/hono-server/.agents/skills/setup-matt-pocock-skills/issue-tracker-github.md +0 -45
- package/templates/hono-server/.agents/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +0 -46
- package/templates/hono-server/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +0 -30
- package/templates/hono-server/.agents/skills/setup-matt-pocock-skills/triage-labels.md +0 -15
- package/templates/hono-server/.agents/skills/tdd/SKILL.md +0 -38
- package/templates/hono-server/.agents/skills/tdd/agents/openai.yaml +0 -3
- package/templates/hono-server/.agents/skills/tdd/mocking.md +0 -59
- package/templates/hono-server/.agents/skills/tdd/tests.md +0 -77
- package/templates/hono-server/.agents/skills/teach/GLOSSARY-FORMAT.md +0 -35
- package/templates/hono-server/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
- package/templates/hono-server/.agents/skills/teach/MISSION-FORMAT.md +0 -31
- package/templates/hono-server/.agents/skills/teach/RESOURCES-FORMAT.md +0 -32
- package/templates/hono-server/.agents/skills/teach/SKILL.md +0 -140
- package/templates/hono-server/.agents/skills/teach/agents/openai.yaml +0 -5
- package/templates/hono-server/.agents/skills/to-questionnaire/SKILL.md +0 -53
- package/templates/hono-server/.agents/skills/to-questionnaire/agents/openai.yaml +0 -5
- package/templates/hono-server/.agents/skills/triage/AGENT-BRIEF.md +0 -207
- package/templates/hono-server/.agents/skills/triage/OUT-OF-SCOPE.md +0 -105
- package/templates/hono-server/.agents/skills/triage/SKILL.md +0 -112
- package/templates/hono-server/.agents/skills/triage/agents/openai.yaml +0 -5
- package/templates/hono-server/.agents/skills/wait-what/SKILL.md +0 -7
- package/templates/hono-server/.agents/skills/wait-what/agents/openai.yaml +0 -5
- package/templates/hono-server/.agents/skills/wizard/SKILL.md +0 -44
- package/templates/hono-server/.agents/skills/wizard/agents/openai.yaml +0 -3
- package/templates/hono-server/.agents/skills/wizard/template.sh +0 -204
- package/templates/hono-server/.agents/skills/writing-for-agents/SKILL-MECHANICS.md +0 -22
- package/templates/hono-server/.agents/skills/writing-for-agents/SKILL.md +0 -81
- package/templates/hono-server/.agents/skills/writing-for-agents/agents/openai.yaml +0 -3
- package/templates/hono-server/apps/server/src/modules/example/contracts.ts +0 -9
- package/templates/hono-server/apps/server/src/shared/app/types.ts +0 -44
- package/templates/hono-server/docs/agents/domain.md +0 -41
- package/templates/hono-server/docs/agents/issue-tracker.md +0 -30
- package/templates/hono-server/docs/agents/triage-labels.md +0 -15
- package/templates/monorepo/.agents/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
- package/templates/monorepo/.agents/skills/ask-matt/SKILL.md +0 -90
- package/templates/monorepo/.agents/skills/ask-matt/agents/openai.yaml +0 -5
- package/templates/monorepo/.agents/skills/code-review/SKILL.md +0 -87
- package/templates/monorepo/.agents/skills/code-review/agents/openai.yaml +0 -3
- package/templates/monorepo/.agents/skills/codebase-design/DEEPENING.md +0 -37
- package/templates/monorepo/.agents/skills/codebase-design/DESIGN-IT-TWICE.md +0 -44
- package/templates/monorepo/.agents/skills/codebase-design/SKILL.md +0 -114
- package/templates/monorepo/.agents/skills/codebase-design/agents/openai.yaml +0 -3
- package/templates/monorepo/.agents/skills/confirm-requirements/SKILL.md +0 -25
- package/templates/monorepo/.agents/skills/diagnosing-bugs/SKILL.md +0 -140
- package/templates/monorepo/.agents/skills/diagnosing-bugs/agents/openai.yaml +0 -3
- package/templates/monorepo/.agents/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +0 -44
- package/templates/monorepo/.agents/skills/domain-modeling/ADR-FORMAT.md +0 -47
- package/templates/monorepo/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +0 -60
- package/templates/monorepo/.agents/skills/domain-modeling/SKILL.md +0 -74
- package/templates/monorepo/.agents/skills/domain-modeling/agents/openai.yaml +0 -3
- package/templates/monorepo/.agents/skills/grill-me/SKILL.md +0 -7
- package/templates/monorepo/.agents/skills/grill-me/agents/openai.yaml +0 -5
- package/templates/monorepo/.agents/skills/implement/SKILL.md +0 -15
- package/templates/monorepo/.agents/skills/implement/agents/openai.yaml +0 -5
- package/templates/monorepo/.agents/skills/improve-codebase-architecture/HTML-REPORT.md +0 -123
- package/templates/monorepo/.agents/skills/improve-codebase-architecture/SKILL.md +0 -71
- package/templates/monorepo/.agents/skills/improve-codebase-architecture/agents/openai.yaml +0 -5
- package/templates/monorepo/.agents/skills/resolving-merge-conflicts/SKILL.md +0 -14
- package/templates/monorepo/.agents/skills/resolving-merge-conflicts/agents/openai.yaml +0 -3
- package/templates/monorepo/.agents/skills/scoped-code-review/SKILL.md +0 -113
- package/templates/monorepo/.agents/skills/setup-matt-pocock-skills/SKILL.md +0 -116
- package/templates/monorepo/.agents/skills/setup-matt-pocock-skills/agents/openai.yaml +0 -5
- package/templates/monorepo/.agents/skills/setup-matt-pocock-skills/domain.md +0 -51
- package/templates/monorepo/.agents/skills/setup-matt-pocock-skills/issue-tracker-github.md +0 -45
- package/templates/monorepo/.agents/skills/setup-matt-pocock-skills/issue-tracker-gitlab.md +0 -46
- package/templates/monorepo/.agents/skills/setup-matt-pocock-skills/issue-tracker-local.md +0 -30
- package/templates/monorepo/.agents/skills/setup-matt-pocock-skills/triage-labels.md +0 -15
- package/templates/monorepo/.agents/skills/tdd/SKILL.md +0 -38
- package/templates/monorepo/.agents/skills/tdd/agents/openai.yaml +0 -3
- package/templates/monorepo/.agents/skills/tdd/mocking.md +0 -59
- package/templates/monorepo/.agents/skills/tdd/tests.md +0 -77
- package/templates/monorepo/.agents/skills/teach/GLOSSARY-FORMAT.md +0 -35
- package/templates/monorepo/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
- package/templates/monorepo/.agents/skills/teach/MISSION-FORMAT.md +0 -31
- package/templates/monorepo/.agents/skills/teach/RESOURCES-FORMAT.md +0 -32
- package/templates/monorepo/.agents/skills/teach/SKILL.md +0 -140
- package/templates/monorepo/.agents/skills/teach/agents/openai.yaml +0 -5
- package/templates/monorepo/.agents/skills/to-questionnaire/SKILL.md +0 -53
- package/templates/monorepo/.agents/skills/to-questionnaire/agents/openai.yaml +0 -5
- package/templates/monorepo/.agents/skills/triage/AGENT-BRIEF.md +0 -207
- package/templates/monorepo/.agents/skills/triage/OUT-OF-SCOPE.md +0 -105
- package/templates/monorepo/.agents/skills/triage/SKILL.md +0 -112
- package/templates/monorepo/.agents/skills/triage/agents/openai.yaml +0 -5
- package/templates/monorepo/.agents/skills/wait-what/SKILL.md +0 -7
- package/templates/monorepo/.agents/skills/wait-what/agents/openai.yaml +0 -5
- package/templates/monorepo/.agents/skills/wizard/SKILL.md +0 -44
- package/templates/monorepo/.agents/skills/wizard/agents/openai.yaml +0 -3
- package/templates/monorepo/.agents/skills/wizard/template.sh +0 -204
- package/templates/monorepo/.agents/skills/writing-for-agents/SKILL-MECHANICS.md +0 -22
- package/templates/monorepo/.agents/skills/writing-for-agents/SKILL.md +0 -81
- package/templates/monorepo/.agents/skills/writing-for-agents/agents/openai.yaml +0 -3
- package/templates/monorepo/docs/agents/domain.md +0 -41
- package/templates/monorepo/docs/agents/issue-tracker.md +0 -30
- package/templates/monorepo/docs/agents/triage-labels.md +0 -15
- /package/templates/hono-fullstack/.agents/skills/{grilling → ask-grilling}/agents/openai.yaml +0 -0
- /package/templates/hono-fullstack/.agents/skills/{prototype → plan-prototype}/agents/openai.yaml +0 -0
- /package/templates/hono-fullstack/.agents/skills/{research → plan-research}/agents/openai.yaml +0 -0
- /package/templates/hono-fullstack/.agents/skills/{wayfinder → plan-wayfinder}/agents/openai.yaml +0 -0
- /package/templates/hono-server/.agents/skills/{grilling → ask-grilling}/agents/openai.yaml +0 -0
- /package/templates/hono-server/.agents/skills/{prototype → plan-prototype}/agents/openai.yaml +0 -0
- /package/templates/hono-server/.agents/skills/{research → plan-research}/agents/openai.yaml +0 -0
- /package/templates/hono-server/.agents/skills/{wayfinder → plan-wayfinder}/agents/openai.yaml +0 -0
- /package/templates/monorepo/.agents/skills/{grilling → ask-grilling}/agents/openai.yaml +0 -0
- /package/templates/monorepo/.agents/skills/{prototype → plan-prototype}/agents/openai.yaml +0 -0
- /package/templates/monorepo/.agents/skills/{research → plan-research}/agents/openai.yaml +0 -0
- /package/templates/monorepo/.agents/skills/{wayfinder → plan-wayfinder}/agents/openai.yaml +0 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { Button, Heading, Table, Text } from '@repo/ui'
|
|
2
|
+
import { useState } from 'react'
|
|
3
|
+
import { hstack } from 'styled-system/patterns'
|
|
4
|
+
import { css } from 'styled-system/css'
|
|
5
|
+
|
|
6
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
7
|
+
const rows = [
|
|
8
|
+
{ name: 'Table', group: '数据展示', count: 12 },
|
|
9
|
+
{ name: 'Tag', group: '数据展示', count: 8 },
|
|
10
|
+
{ name: 'Breadcrumb', group: '导航', count: 5 },
|
|
11
|
+
{ name: 'Grid', group: '布局', count: 3 },
|
|
12
|
+
{ name: 'Stack', group: '布局', count: 9 },
|
|
13
|
+
{ name: 'FileUpload', group: '表单', count: 6 },
|
|
14
|
+
]
|
|
15
|
+
const meta = {
|
|
16
|
+
title: 'Display/Table',
|
|
17
|
+
component: Table.Root,
|
|
18
|
+
args: { size: 'md', variant: 'plain', striped: true, interactive: true, columnBorder: false },
|
|
19
|
+
argTypes: {
|
|
20
|
+
columnBorder: { control: 'boolean' },
|
|
21
|
+
interactive: { control: 'boolean' },
|
|
22
|
+
size: { control: 'select', options: ['lg', 'md', 'sm', 'unstyled'] },
|
|
23
|
+
stickyHeader: { control: 'boolean' },
|
|
24
|
+
striped: { control: 'boolean' },
|
|
25
|
+
variant: { control: 'select', options: ['line', 'outline', 'plain', 'surface', 'unstyled'] },
|
|
26
|
+
},
|
|
27
|
+
parameters: {
|
|
28
|
+
controls: { disable: true },
|
|
29
|
+
docs: {
|
|
30
|
+
source: { type: 'code' },
|
|
31
|
+
description: { component: '表头固定、滚动、原生插槽、条纹与悬停高亮。' },
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
} satisfies Meta<typeof Table.Root>
|
|
35
|
+
export default meta
|
|
36
|
+
type Story = StoryObj<typeof meta>
|
|
37
|
+
export const Playground: Story = {
|
|
38
|
+
parameters: {
|
|
39
|
+
controls: {
|
|
40
|
+
disable: false,
|
|
41
|
+
include: ['columnBorder', 'interactive', 'size', 'stickyHeader', 'striped', 'variant'],
|
|
42
|
+
},
|
|
43
|
+
docs: { source: { type: 'dynamic' } },
|
|
44
|
+
},
|
|
45
|
+
render: (args) => (
|
|
46
|
+
<div className={css({ maxWidth: '2xl' })}>
|
|
47
|
+
<Table.Root {...args}>
|
|
48
|
+
<Table.Caption>组件统计</Table.Caption>
|
|
49
|
+
<Table.Header>
|
|
50
|
+
<Table.Row>
|
|
51
|
+
<Table.ColumnHeader>组件</Table.ColumnHeader>
|
|
52
|
+
<Table.ColumnHeader>类别</Table.ColumnHeader>
|
|
53
|
+
</Table.Row>
|
|
54
|
+
</Table.Header>
|
|
55
|
+
<Table.Body>
|
|
56
|
+
<Table.Row>
|
|
57
|
+
<Table.Cell>Button</Table.Cell>
|
|
58
|
+
<Table.Cell>操作</Table.Cell>
|
|
59
|
+
</Table.Row>
|
|
60
|
+
<Table.Row>
|
|
61
|
+
<Table.Cell>Select</Table.Cell>
|
|
62
|
+
<Table.Cell>集合</Table.Cell>
|
|
63
|
+
</Table.Row>
|
|
64
|
+
</Table.Body>
|
|
65
|
+
</Table.Root>
|
|
66
|
+
</div>
|
|
67
|
+
),
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export const Scrollable: Story = {
|
|
71
|
+
render: function Scrollable() {
|
|
72
|
+
const [striped, setStriped] = useState(true)
|
|
73
|
+
const [interactive, setInteractive] = useState(true)
|
|
74
|
+
return (
|
|
75
|
+
<div className={css({ display: 'grid', gap: '4', maxWidth: '4xl' })}>
|
|
76
|
+
<Heading as="h3" size="lg">
|
|
77
|
+
固定表头、滚动和可组合配方
|
|
78
|
+
</Heading>
|
|
79
|
+
<div className={hstack({ gap: '3', flexWrap: 'wrap' })}>
|
|
80
|
+
<Button variant="outline" onClick={() => setStriped((value) => !value)}>
|
|
81
|
+
条纹:{striped ? '开启' : '关闭'}
|
|
82
|
+
</Button>
|
|
83
|
+
<Button variant="outline" onClick={() => setInteractive((value) => !value)}>
|
|
84
|
+
悬停高亮:{interactive ? '开启' : '关闭'}
|
|
85
|
+
</Button>
|
|
86
|
+
</div>
|
|
87
|
+
<Table.ScrollArea
|
|
88
|
+
maxHeight="56"
|
|
89
|
+
borderWidth="1px"
|
|
90
|
+
borderRadius="sm"
|
|
91
|
+
tabIndex={0}
|
|
92
|
+
aria-label="组件统计表滚动区域">
|
|
93
|
+
<Table.Root
|
|
94
|
+
size="md"
|
|
95
|
+
striped={striped}
|
|
96
|
+
interactive={interactive}
|
|
97
|
+
stickyHeader
|
|
98
|
+
columnBorder
|
|
99
|
+
minWidth="640px">
|
|
100
|
+
<Table.Caption>组件使用次数示例</Table.Caption>
|
|
101
|
+
<Table.ColumnGroup>
|
|
102
|
+
<Table.Column width="45%" />
|
|
103
|
+
<Table.Column />
|
|
104
|
+
<Table.Column />
|
|
105
|
+
</Table.ColumnGroup>
|
|
106
|
+
<Table.Header bg="bg.page">
|
|
107
|
+
<Table.Row>
|
|
108
|
+
<Table.ColumnHeader>名称</Table.ColumnHeader>
|
|
109
|
+
<Table.ColumnHeader>类别</Table.ColumnHeader>
|
|
110
|
+
<Table.ColumnHeader textAlign="end">次数</Table.ColumnHeader>
|
|
111
|
+
</Table.Row>
|
|
112
|
+
</Table.Header>
|
|
113
|
+
<Table.Body>
|
|
114
|
+
{rows.map((row) => (
|
|
115
|
+
<Table.Row key={row.name}>
|
|
116
|
+
<Table.Cell>{row.name}</Table.Cell>
|
|
117
|
+
<Table.Cell>{row.group}</Table.Cell>
|
|
118
|
+
<Table.Cell textAlign="end">{row.count}</Table.Cell>
|
|
119
|
+
</Table.Row>
|
|
120
|
+
))}
|
|
121
|
+
</Table.Body>
|
|
122
|
+
<Table.Footer>
|
|
123
|
+
<Table.Row>
|
|
124
|
+
<Table.Cell colSpan={2}>合计</Table.Cell>
|
|
125
|
+
<Table.Cell textAlign="end">43</Table.Cell>
|
|
126
|
+
</Table.Row>
|
|
127
|
+
</Table.Footer>
|
|
128
|
+
</Table.Root>
|
|
129
|
+
</Table.ScrollArea>
|
|
130
|
+
<Text>悬停高亮可以与条纹同时使用;数字列通过 textAlign 右对齐。</Text>
|
|
131
|
+
</div>
|
|
132
|
+
)
|
|
133
|
+
},
|
|
134
|
+
}
|
|
135
|
+
export const NativeAndSizes: Story = {
|
|
136
|
+
render: function NativeAndSizes() {
|
|
137
|
+
return (
|
|
138
|
+
<div className={css({ display: 'grid', gap: '4', maxWidth: '4xl' })}>
|
|
139
|
+
<Heading as="h3" size="lg">
|
|
140
|
+
原生表格与小尺寸
|
|
141
|
+
</Heading>
|
|
142
|
+
<Table.Root native size="sm" variant="outline" striped>
|
|
143
|
+
<caption>native 模式直接使用 HTML 插槽</caption>
|
|
144
|
+
<thead>
|
|
145
|
+
<tr>
|
|
146
|
+
<th scope="col">名称</th>
|
|
147
|
+
<th scope="col">类别</th>
|
|
148
|
+
</tr>
|
|
149
|
+
</thead>
|
|
150
|
+
<tbody>
|
|
151
|
+
{rows.slice(0, 3).map((row) => (
|
|
152
|
+
<tr key={row.name}>
|
|
153
|
+
<td>{row.name}</td>
|
|
154
|
+
<td>{row.group}</td>
|
|
155
|
+
</tr>
|
|
156
|
+
))}
|
|
157
|
+
</tbody>
|
|
158
|
+
</Table.Root>
|
|
159
|
+
<Table.Root size="lg" variant="line" interactive>
|
|
160
|
+
<Table.Body>
|
|
161
|
+
<Table.Row>
|
|
162
|
+
<Table.Cell>lg + line 配方</Table.Cell>
|
|
163
|
+
</Table.Row>
|
|
164
|
+
</Table.Body>
|
|
165
|
+
</Table.Root>
|
|
166
|
+
</div>
|
|
167
|
+
)
|
|
168
|
+
},
|
|
169
|
+
}
|
|
170
|
+
export const Customization: Story = {
|
|
171
|
+
render: function Customization() {
|
|
172
|
+
return (
|
|
173
|
+
<div className={css({ display: 'grid', gap: '4', maxWidth: '4xl' })}>
|
|
174
|
+
<Heading as="h3" size="lg">
|
|
175
|
+
Table · 分维度定制
|
|
176
|
+
</Heading>
|
|
177
|
+
<Table.Root
|
|
178
|
+
native
|
|
179
|
+
size="unstyled"
|
|
180
|
+
variant="outline"
|
|
181
|
+
css={{ '& th, & td': { px: '2', py: '1.5', textStyle: 'sm' } }}>
|
|
182
|
+
<caption>自定紧凑尺寸 · native 模式</caption>
|
|
183
|
+
<thead>
|
|
184
|
+
<tr>
|
|
185
|
+
<th scope="col">名称</th>
|
|
186
|
+
<th scope="col">次数</th>
|
|
187
|
+
</tr>
|
|
188
|
+
</thead>
|
|
189
|
+
<tbody>
|
|
190
|
+
{rows.slice(0, 2).map((row) => (
|
|
191
|
+
<tr key={row.name}>
|
|
192
|
+
<td>{row.name}</td>
|
|
193
|
+
<td>{row.count}</td>
|
|
194
|
+
</tr>
|
|
195
|
+
))}
|
|
196
|
+
</tbody>
|
|
197
|
+
</Table.Root>
|
|
198
|
+
<Table.Root variant="unstyled">
|
|
199
|
+
<Table.Caption color="gray.fg.muted">自定外观 · 保留默认尺寸</Table.Caption>
|
|
200
|
+
<Table.Header bg="lime.3" color="lime.11">
|
|
201
|
+
<Table.Row>
|
|
202
|
+
<Table.ColumnHeader>名称</Table.ColumnHeader>
|
|
203
|
+
<Table.ColumnHeader>次数</Table.ColumnHeader>
|
|
204
|
+
</Table.Row>
|
|
205
|
+
</Table.Header>
|
|
206
|
+
<Table.Body>
|
|
207
|
+
{rows.slice(0, 2).map((row) => (
|
|
208
|
+
<Table.Row key={row.name}>
|
|
209
|
+
<Table.Cell borderBottomWidth="1px" borderColor="lime.5">
|
|
210
|
+
{row.name}
|
|
211
|
+
</Table.Cell>
|
|
212
|
+
<Table.Cell borderBottomWidth="1px" borderColor="lime.5">
|
|
213
|
+
{row.count}
|
|
214
|
+
</Table.Cell>
|
|
215
|
+
</Table.Row>
|
|
216
|
+
))}
|
|
217
|
+
</Table.Body>
|
|
218
|
+
</Table.Root>
|
|
219
|
+
</div>
|
|
220
|
+
)
|
|
221
|
+
},
|
|
222
|
+
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { Avatar, Button, Heading, Tag } from '@repo/ui'
|
|
2
|
+
import { useState } from 'react'
|
|
3
|
+
import { hstack } from 'styled-system/patterns'
|
|
4
|
+
import { css } from 'styled-system/css'
|
|
5
|
+
|
|
6
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
7
|
+
|
|
8
|
+
const meta = {
|
|
9
|
+
title: 'Display/Tag',
|
|
10
|
+
component: Tag.Root,
|
|
11
|
+
args: { size: 'md', variant: 'surface' },
|
|
12
|
+
argTypes: {
|
|
13
|
+
size: { control: 'select', options: ['lg', 'md', 'sm', 'unstyled', 'xl'] },
|
|
14
|
+
variant: { control: 'select', options: ['outline', 'solid', 'subtle', 'surface', 'unstyled'] },
|
|
15
|
+
},
|
|
16
|
+
parameters: {
|
|
17
|
+
controls: { disable: true },
|
|
18
|
+
docs: { source: { type: 'code' }, description: { component: '标签外观、插槽、关闭和恢复。' } },
|
|
19
|
+
},
|
|
20
|
+
} satisfies Meta<typeof Tag.Root>
|
|
21
|
+
export default meta
|
|
22
|
+
type Story = StoryObj<typeof meta>
|
|
23
|
+
export const Playground: Story = {
|
|
24
|
+
parameters: {
|
|
25
|
+
controls: { disable: false, include: ['size', 'variant'] },
|
|
26
|
+
docs: { source: { type: 'dynamic' } },
|
|
27
|
+
},
|
|
28
|
+
render: (args) => (
|
|
29
|
+
<div className={css({ maxWidth: '2xl' })}>
|
|
30
|
+
<Tag.Root {...args}>
|
|
31
|
+
<Tag.Label>技术标签</Tag.Label>
|
|
32
|
+
</Tag.Root>
|
|
33
|
+
</div>
|
|
34
|
+
),
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const Variants: Story = {
|
|
38
|
+
tags: ['!dev'],
|
|
39
|
+
render: function Variants() {
|
|
40
|
+
const [, setTags] = useState(['Panda CSS', 'Ark UI', 'Park UI'])
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<div className={css({ display: 'grid', gap: '4', maxWidth: '4xl' })}>
|
|
44
|
+
<Heading as="h3" size="lg">
|
|
45
|
+
Tag 配方、尺寸与插槽
|
|
46
|
+
</Heading>
|
|
47
|
+
<div className={hstack({ gap: '3', flexWrap: 'wrap' })}>
|
|
48
|
+
<Tag.Root size="sm" variant="subtle">
|
|
49
|
+
<Tag.Label>Small</Tag.Label>
|
|
50
|
+
</Tag.Root>
|
|
51
|
+
<Tag.Root size="md" variant="surface">
|
|
52
|
+
<Tag.Label>Medium</Tag.Label>
|
|
53
|
+
</Tag.Root>
|
|
54
|
+
<Tag.Root size="lg" variant="outline">
|
|
55
|
+
<Tag.Label>Large</Tag.Label>
|
|
56
|
+
</Tag.Root>
|
|
57
|
+
<Tag.Root size="xl" variant="solid">
|
|
58
|
+
<Tag.Label>Extra large</Tag.Label>
|
|
59
|
+
</Tag.Root>
|
|
60
|
+
<Tag.Root size="lg" colorPalette="green">
|
|
61
|
+
<Tag.StartElement>
|
|
62
|
+
<Avatar.Root size="full">
|
|
63
|
+
<Avatar.Fallback name="Ada" />
|
|
64
|
+
</Avatar.Root>
|
|
65
|
+
</Tag.StartElement>
|
|
66
|
+
<Tag.Label>Ada</Tag.Label>
|
|
67
|
+
</Tag.Root>
|
|
68
|
+
<Tag.Root maxWidth="40">
|
|
69
|
+
<Tag.Label>这是一段需要截断的较长标签文本</Tag.Label>
|
|
70
|
+
</Tag.Root>
|
|
71
|
+
<Tag.Root asChild variant="outline">
|
|
72
|
+
<button type="button" onClick={() => setTags(['Panda CSS', 'Ark UI', 'Park UI'])}>
|
|
73
|
+
<Tag.Label>重置标签</Tag.Label>
|
|
74
|
+
</button>
|
|
75
|
+
</Tag.Root>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
)
|
|
79
|
+
},
|
|
80
|
+
}
|
|
81
|
+
export const Closable: Story = {
|
|
82
|
+
render: function Closable() {
|
|
83
|
+
const [tags, setTags] = useState(['Panda CSS', 'Ark UI', 'Park UI'])
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<div className={css({ display: 'grid', gap: '4', maxWidth: '4xl' })}>
|
|
87
|
+
<div className={hstack({ gap: '3', flexWrap: 'wrap' })}>
|
|
88
|
+
{tags.map((label) => (
|
|
89
|
+
<Tag.Root key={label}>
|
|
90
|
+
<Tag.Label>{label}</Tag.Label>
|
|
91
|
+
<Tag.EndElement>
|
|
92
|
+
<Tag.CloseTrigger
|
|
93
|
+
aria-label={`移除 ${label}`}
|
|
94
|
+
onClick={() => setTags((current) => current.filter((value) => value !== label))}
|
|
95
|
+
/>
|
|
96
|
+
</Tag.EndElement>
|
|
97
|
+
</Tag.Root>
|
|
98
|
+
))}
|
|
99
|
+
<Tag.Root variant="outline">
|
|
100
|
+
<Tag.Label>自定义关闭内容</Tag.Label>
|
|
101
|
+
<Tag.EndElement>
|
|
102
|
+
<Tag.CloseTrigger aria-label="禁用的关闭按钮" disabled>
|
|
103
|
+
×
|
|
104
|
+
</Tag.CloseTrigger>
|
|
105
|
+
</Tag.EndElement>
|
|
106
|
+
</Tag.Root>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
)
|
|
110
|
+
},
|
|
111
|
+
}
|
|
112
|
+
export const Customization: Story = {
|
|
113
|
+
render: function Customization() {
|
|
114
|
+
const [customTagVisible, setCustomTagVisible] = useState(true)
|
|
115
|
+
|
|
116
|
+
return (
|
|
117
|
+
<div className={css({ display: 'grid', gap: '4', maxWidth: '4xl' })}>
|
|
118
|
+
<Heading as="h3" size="lg">
|
|
119
|
+
Tag · 分维度定制
|
|
120
|
+
</Heading>
|
|
121
|
+
<div className={hstack({ gap: '3', flexWrap: 'wrap' })}>
|
|
122
|
+
{customTagVisible && (
|
|
123
|
+
<Tag.Root size="unstyled" minHeight="26px" px="2" gap="1.5" lineHeight="1">
|
|
124
|
+
<Tag.StartElement width="18px" height="18px">
|
|
125
|
+
<Avatar.Root size="full">
|
|
126
|
+
<Avatar.Fallback name="Ada" />
|
|
127
|
+
</Avatar.Root>
|
|
128
|
+
</Tag.StartElement>
|
|
129
|
+
<Tag.Label textStyle="xs">自定尺寸</Tag.Label>
|
|
130
|
+
<Tag.EndElement width="14px" height="14px">
|
|
131
|
+
<Tag.CloseTrigger
|
|
132
|
+
aria-label="移除自定尺寸标签"
|
|
133
|
+
onClick={() => setCustomTagVisible(false)}
|
|
134
|
+
/>
|
|
135
|
+
</Tag.EndElement>
|
|
136
|
+
</Tag.Root>
|
|
137
|
+
)}
|
|
138
|
+
{!customTagVisible && (
|
|
139
|
+
<Button
|
|
140
|
+
type="button"
|
|
141
|
+
size="sm"
|
|
142
|
+
variant="outline"
|
|
143
|
+
onClick={() => setCustomTagVisible(true)}>
|
|
144
|
+
恢复自定尺寸标签
|
|
145
|
+
</Button>
|
|
146
|
+
)}
|
|
147
|
+
<Tag.Root
|
|
148
|
+
variant="unstyled"
|
|
149
|
+
bg="lime.3"
|
|
150
|
+
color="lime.11"
|
|
151
|
+
borderRadius="full"
|
|
152
|
+
fontWeight="semibold">
|
|
153
|
+
<Tag.Label>自定外观</Tag.Label>
|
|
154
|
+
<Tag.EndElement>
|
|
155
|
+
<Tag.CloseTrigger
|
|
156
|
+
borderRadius="full"
|
|
157
|
+
focusVisibleRing="inside"
|
|
158
|
+
aria-label="禁用的自定外观关闭按钮"
|
|
159
|
+
disabled
|
|
160
|
+
css={{ _disabled: { opacity: 0.5 } }}
|
|
161
|
+
/>
|
|
162
|
+
</Tag.EndElement>
|
|
163
|
+
</Tag.Root>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
)
|
|
167
|
+
},
|
|
168
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Text } from '@repo/ui'
|
|
2
|
+
|
|
3
|
+
import { css } from 'styled-system/css'
|
|
4
|
+
|
|
5
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Display/Text',
|
|
9
|
+
component: Text,
|
|
10
|
+
parameters: {
|
|
11
|
+
controls: { disable: true },
|
|
12
|
+
docs: { source: { type: 'code' }, description: { component: '文本样式与多行截断。' } },
|
|
13
|
+
},
|
|
14
|
+
} satisfies Meta<typeof Text>
|
|
15
|
+
export default meta
|
|
16
|
+
type Story = StoryObj<typeof meta>
|
|
17
|
+
export const Truncation: Story = {
|
|
18
|
+
render: function Truncation() {
|
|
19
|
+
return (
|
|
20
|
+
<div className={css({ display: 'grid', gap: '4', maxWidth: '4xl' })}>
|
|
21
|
+
<Text textStyle="lg">
|
|
22
|
+
Text 继承主题文本样式,Heading 默认使用 h2,可按标题层级修改 as。
|
|
23
|
+
</Text>
|
|
24
|
+
<Text color="fg.muted" lineClamp={2}>
|
|
25
|
+
这是一段用于展示两行截断的较长文字。基础排版支持 Panda
|
|
26
|
+
的样式属性和原生属性,应用可直接使用主题
|
|
27
|
+
token;组件库保留配方源码以便后续调整。重复内容让示例覆盖多行文本截断。
|
|
28
|
+
</Text>
|
|
29
|
+
</div>
|
|
30
|
+
)
|
|
31
|
+
},
|
|
32
|
+
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { Avatar, Badge, Button, Heading, Text, Timeline } from '@repo/ui'
|
|
2
|
+
import { useRef, useState } from 'react'
|
|
3
|
+
import { grid, hstack } from 'styled-system/patterns'
|
|
4
|
+
import { css } from 'styled-system/css'
|
|
5
|
+
|
|
6
|
+
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
7
|
+
const events = [
|
|
8
|
+
{ title: '订单已创建', date: '2026-10-11', description: '已确认商品与配送地址。' },
|
|
9
|
+
{ title: '订单已发货', date: '2026-10-12', description: '包裹正在运输中。' },
|
|
10
|
+
{ title: '订单已签收', date: '2026-10-13', description: '感谢使用。' },
|
|
11
|
+
]
|
|
12
|
+
function VariantItems({ label }: { label: string }) {
|
|
13
|
+
return events.slice(0, 2).map((event, index) => (
|
|
14
|
+
<Timeline.Item key={event.date}>
|
|
15
|
+
<Timeline.Connector>
|
|
16
|
+
<Timeline.Separator />
|
|
17
|
+
<Timeline.Indicator>{index + 1}</Timeline.Indicator>
|
|
18
|
+
</Timeline.Connector>
|
|
19
|
+
<Timeline.Content>
|
|
20
|
+
<Timeline.Title>
|
|
21
|
+
{label} · {event.title}
|
|
22
|
+
</Timeline.Title>
|
|
23
|
+
<Timeline.Description>{event.description}</Timeline.Description>
|
|
24
|
+
</Timeline.Content>
|
|
25
|
+
</Timeline.Item>
|
|
26
|
+
))
|
|
27
|
+
}
|
|
28
|
+
const meta = {
|
|
29
|
+
title: 'Display/Timeline',
|
|
30
|
+
component: Timeline.Root,
|
|
31
|
+
parameters: {
|
|
32
|
+
controls: { disable: true },
|
|
33
|
+
docs: {
|
|
34
|
+
source: { type: 'code' },
|
|
35
|
+
description: { component: '时间线样式、交替布局、组件组合及末尾连线。' },
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
} satisfies Meta<typeof Timeline.Root>
|
|
39
|
+
export default meta
|
|
40
|
+
type Story = StoryObj<typeof meta>
|
|
41
|
+
export const ControlledSeparator: Story = {
|
|
42
|
+
render: function ControlledSeparator() {
|
|
43
|
+
const [showLastSeparator, setShowLastSeparator] = useState(false)
|
|
44
|
+
const rootRef = useRef<HTMLDivElement>(null)
|
|
45
|
+
return (
|
|
46
|
+
<div className={css({ display: 'grid', gap: '4', maxWidth: '4xl' })}>
|
|
47
|
+
<Text>插槽组合与 Chakra 一致,支持自定义指示器、前置内容及交替排列。</Text>
|
|
48
|
+
<div className={hstack({ gap: '3', flexWrap: 'wrap' })}>
|
|
49
|
+
<Button variant="outline" onClick={() => setShowLastSeparator((value) => !value)}>
|
|
50
|
+
末尾连线:{showLastSeparator ? '显示' : '隐藏'}
|
|
51
|
+
</Button>
|
|
52
|
+
<Button
|
|
53
|
+
variant="outline"
|
|
54
|
+
onClick={() =>
|
|
55
|
+
rootRef.current?.scrollIntoView({ block: 'center', behavior: 'smooth' })
|
|
56
|
+
}>
|
|
57
|
+
通过 ref 定位时间线
|
|
58
|
+
</Button>
|
|
59
|
+
</div>
|
|
60
|
+
<Timeline.Root ref={rootRef} showLastSeparator={showLastSeparator} aria-label="订单进度">
|
|
61
|
+
{events.map((event, index) => (
|
|
62
|
+
<Timeline.Item key={event.date}>
|
|
63
|
+
<Timeline.Connector>
|
|
64
|
+
<Timeline.Separator />
|
|
65
|
+
<Timeline.Indicator>{index + 1}</Timeline.Indicator>
|
|
66
|
+
</Timeline.Connector>
|
|
67
|
+
<Timeline.Content>
|
|
68
|
+
<Timeline.Title>{event.title}</Timeline.Title>
|
|
69
|
+
<Timeline.Description asChild>
|
|
70
|
+
<time dateTime={event.date}>{event.date}</time>
|
|
71
|
+
</Timeline.Description>
|
|
72
|
+
<Text textStyle="sm">{event.description}</Text>
|
|
73
|
+
</Timeline.Content>
|
|
74
|
+
</Timeline.Item>
|
|
75
|
+
))}
|
|
76
|
+
</Timeline.Root>
|
|
77
|
+
</div>
|
|
78
|
+
)
|
|
79
|
+
},
|
|
80
|
+
}
|
|
81
|
+
export const Variants: Story = {
|
|
82
|
+
tags: ['!dev'],
|
|
83
|
+
render: function Variants() {
|
|
84
|
+
return (
|
|
85
|
+
<div className={css({ display: 'grid', gap: '4', maxWidth: '4xl' })}>
|
|
86
|
+
<Heading as="h3" size="lg">
|
|
87
|
+
样式与尺寸
|
|
88
|
+
</Heading>
|
|
89
|
+
<div className={grid({ columns: { base: 1, md: 2 }, gap: '6' })}>
|
|
90
|
+
<Timeline.Root variant="solid" size="sm" colorPalette="green" aria-label="solid 配方">
|
|
91
|
+
<VariantItems label="solid · sm" />
|
|
92
|
+
</Timeline.Root>
|
|
93
|
+
<Timeline.Root variant="subtle" size="md" colorPalette="green" aria-label="subtle 配方">
|
|
94
|
+
<VariantItems label="subtle · md" />
|
|
95
|
+
</Timeline.Root>
|
|
96
|
+
<Timeline.Root variant="outline" size="lg" colorPalette="green" aria-label="outline 配方">
|
|
97
|
+
<VariantItems label="outline · lg" />
|
|
98
|
+
</Timeline.Root>
|
|
99
|
+
<Timeline.Root variant="plain" size="xl" colorPalette="green" aria-label="plain 配方">
|
|
100
|
+
<VariantItems label="plain · xl" />
|
|
101
|
+
</Timeline.Root>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
)
|
|
105
|
+
},
|
|
106
|
+
}
|
|
107
|
+
export const Alternating: Story = {
|
|
108
|
+
render: function Alternating() {
|
|
109
|
+
return (
|
|
110
|
+
<div className={css({ display: 'grid', gap: '4', maxWidth: '4xl' })}>
|
|
111
|
+
<Heading as="h3" size="lg">
|
|
112
|
+
前置日期与交替排列
|
|
113
|
+
</Heading>
|
|
114
|
+
<Timeline.Root size="lg" variant="outline" aria-label="项目动态">
|
|
115
|
+
{events.map((event, index) => (
|
|
116
|
+
<Timeline.Item key={event.date}>
|
|
117
|
+
<Timeline.Content textAlign="end" alignItems="flex-end">
|
|
118
|
+
{index % 2 === 0 ? (
|
|
119
|
+
<Timeline.Description asChild>
|
|
120
|
+
<time dateTime={event.date}>{event.date}</time>
|
|
121
|
+
</Timeline.Description>
|
|
122
|
+
) : (
|
|
123
|
+
<Timeline.Title>{event.title}</Timeline.Title>
|
|
124
|
+
)}
|
|
125
|
+
</Timeline.Content>
|
|
126
|
+
<Timeline.Connector>
|
|
127
|
+
<Timeline.Separator />
|
|
128
|
+
<Timeline.Indicator>{index + 1}</Timeline.Indicator>
|
|
129
|
+
</Timeline.Connector>
|
|
130
|
+
<Timeline.Content>
|
|
131
|
+
{index % 2 === 0 ? (
|
|
132
|
+
<Timeline.Title>{event.title}</Timeline.Title>
|
|
133
|
+
) : (
|
|
134
|
+
<Timeline.Description asChild>
|
|
135
|
+
<time dateTime={event.date}>{event.date}</time>
|
|
136
|
+
</Timeline.Description>
|
|
137
|
+
)}
|
|
138
|
+
<Text textStyle="sm">{event.description}</Text>
|
|
139
|
+
</Timeline.Content>
|
|
140
|
+
</Timeline.Item>
|
|
141
|
+
))}
|
|
142
|
+
</Timeline.Root>
|
|
143
|
+
</div>
|
|
144
|
+
)
|
|
145
|
+
},
|
|
146
|
+
}
|
|
147
|
+
export const Composition: Story = {
|
|
148
|
+
render: function Composition() {
|
|
149
|
+
return (
|
|
150
|
+
<div className={css({ display: 'grid', gap: '4', maxWidth: '4xl' })}>
|
|
151
|
+
<Heading as="h3" size="lg">
|
|
152
|
+
自定义指示器与组件组合
|
|
153
|
+
</Heading>
|
|
154
|
+
<Timeline.PropsProvider value={{ size: 'xl', variant: 'plain' }}>
|
|
155
|
+
<Timeline.Root showLastSeparator aria-label="协作动态">
|
|
156
|
+
<Timeline.Item>
|
|
157
|
+
<Timeline.Connector>
|
|
158
|
+
<Timeline.Separator />
|
|
159
|
+
<Timeline.Indicator asChild>
|
|
160
|
+
<Avatar.Root size="full">
|
|
161
|
+
<Avatar.Fallback name="Ada" />
|
|
162
|
+
</Avatar.Root>
|
|
163
|
+
</Timeline.Indicator>
|
|
164
|
+
</Timeline.Connector>
|
|
165
|
+
<Timeline.Content>
|
|
166
|
+
<Timeline.Title>
|
|
167
|
+
Ada 更新了状态 <Badge colorPalette="green">已完成</Badge>
|
|
168
|
+
</Timeline.Title>
|
|
169
|
+
<Timeline.Description>刚刚</Timeline.Description>
|
|
170
|
+
<Text textStyle="sm">指示器可以使用 Avatar、图标或自定义内容。</Text>
|
|
171
|
+
</Timeline.Content>
|
|
172
|
+
</Timeline.Item>
|
|
173
|
+
<Timeline.Item>
|
|
174
|
+
<Timeline.Connector>
|
|
175
|
+
<Timeline.Separator />
|
|
176
|
+
<Timeline.Indicator>✓</Timeline.Indicator>
|
|
177
|
+
</Timeline.Connector>
|
|
178
|
+
<Timeline.Content>
|
|
179
|
+
<Timeline.Title>构建成功</Timeline.Title>
|
|
180
|
+
<Timeline.Description>无需额外状态管理。</Timeline.Description>
|
|
181
|
+
</Timeline.Content>
|
|
182
|
+
</Timeline.Item>
|
|
183
|
+
</Timeline.Root>
|
|
184
|
+
</Timeline.PropsProvider>
|
|
185
|
+
</div>
|
|
186
|
+
)
|
|
187
|
+
},
|
|
188
|
+
}
|
|
189
|
+
export const Customization: Story = {
|
|
190
|
+
render: function Customization() {
|
|
191
|
+
const [showLastSeparator] = useState(false)
|
|
192
|
+
|
|
193
|
+
return (
|
|
194
|
+
<div className={css({ display: 'grid', gap: '4', maxWidth: '4xl' })}>
|
|
195
|
+
<Heading as="h3" size="lg">
|
|
196
|
+
分维度定制
|
|
197
|
+
</Heading>
|
|
198
|
+
<Timeline.Root
|
|
199
|
+
size="unstyled"
|
|
200
|
+
showLastSeparator={showLastSeparator}
|
|
201
|
+
aria-label="自定尺寸时间线">
|
|
202
|
+
{events.slice(0, 2).map((event, index) => (
|
|
203
|
+
<Timeline.Item key={event.date} gap="3">
|
|
204
|
+
<Timeline.Connector>
|
|
205
|
+
<Timeline.Separator borderInlineStartWidth="1px" insetInlineStart="10px" />
|
|
206
|
+
<Timeline.Indicator boxSize="20px" textStyle="xs">
|
|
207
|
+
{index + 1}
|
|
208
|
+
</Timeline.Indicator>
|
|
209
|
+
</Timeline.Connector>
|
|
210
|
+
<Timeline.Content pb="4" gap="1">
|
|
211
|
+
<Timeline.Title textStyle="sm">{event.title}</Timeline.Title>
|
|
212
|
+
<Timeline.Description textStyle="xs">{event.description}</Timeline.Description>
|
|
213
|
+
</Timeline.Content>
|
|
214
|
+
</Timeline.Item>
|
|
215
|
+
))}
|
|
216
|
+
</Timeline.Root>
|
|
217
|
+
<Timeline.Root
|
|
218
|
+
variant="unstyled"
|
|
219
|
+
showLastSeparator={showLastSeparator}
|
|
220
|
+
aria-label="自定外观时间线">
|
|
221
|
+
{events.slice(0, 2).map((event, index) => (
|
|
222
|
+
<Timeline.Item key={event.date}>
|
|
223
|
+
<Timeline.Connector>
|
|
224
|
+
<Timeline.Separator borderColor="lime.6" />
|
|
225
|
+
<Timeline.Indicator bg="lime.3" color="lime.11" borderRadius="sm">
|
|
226
|
+
{index + 1}
|
|
227
|
+
</Timeline.Indicator>
|
|
228
|
+
</Timeline.Connector>
|
|
229
|
+
<Timeline.Content>
|
|
230
|
+
<Timeline.Title fontWeight="semibold">{event.title}</Timeline.Title>
|
|
231
|
+
<Timeline.Description color="gray.fg.muted">
|
|
232
|
+
{event.description}
|
|
233
|
+
</Timeline.Description>
|
|
234
|
+
</Timeline.Content>
|
|
235
|
+
</Timeline.Item>
|
|
236
|
+
))}
|
|
237
|
+
</Timeline.Root>
|
|
238
|
+
</div>
|
|
239
|
+
)
|
|
240
|
+
},
|
|
241
|
+
}
|