@oyolincc/create 0.3.0 → 0.5.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/package.json +2 -2
- package/templates/hono-fullstack/.codegraph/.gitignore +5 -0
- 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-fullstack/apps/server/src/infra/work-runner/{example → 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 +21 -8
- package/templates/hono-fullstack/apps/stack/frontend/routes/__root.tsx +1 -1
- package/templates/hono-fullstack/apps/stack/frontend/routes/index.tsx +35 -12
- package/templates/hono-fullstack/apps/stack/frontend/shared/network/query-hooks.ts +33 -0
- 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 +31 -1
- 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/.codegraph/.gitignore +5 -0
- 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-server/apps/server/src/infra/work-runner/{example → 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 +31 -1
- 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/monorepo/.codegraph/.gitignore +5 -0
- package/templates/monorepo/_gitignore +1 -0
- package/templates/monorepo/oyo.config.json +7 -1
- package/templates/monorepo/pnpm-workspace.yaml +4 -4
- package/templates/monorepo/turbo.json +10 -0
- 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-server/apps/server/src/modules/example/contracts.ts +0 -9
- package/templates/hono-server/apps/server/src/shared/app/types.ts +0 -44
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { tagsInputAnatomy } from '@ark-ui/react/anatomy'
|
|
2
|
+
import { defineSlotRecipe } from '@pandacss/dev'
|
|
3
|
+
|
|
4
|
+
const sizeStyles = {
|
|
5
|
+
root: { gap: '1.5' },
|
|
6
|
+
label: { textStyle: 'label' },
|
|
7
|
+
control: {
|
|
8
|
+
'--input-height': 'var(--tags-input-height)',
|
|
9
|
+
minH: 'var(--tags-input-height)',
|
|
10
|
+
px: 'var(--tags-input-px)',
|
|
11
|
+
},
|
|
12
|
+
clearTrigger: { boxSize: 'calc(var(--tags-input-item-height) / 1.5)', _icon: { boxSize: '5' } },
|
|
13
|
+
input: {
|
|
14
|
+
px: 'calc(var(--tags-input-item-px) / 1.25)',
|
|
15
|
+
height: 'var(--tags-input-item-height)',
|
|
16
|
+
minWidth: '20',
|
|
17
|
+
},
|
|
18
|
+
itemInput: {
|
|
19
|
+
px: 'var(--tags-input-item-px)',
|
|
20
|
+
height: 'var(--tags-input-item-height)',
|
|
21
|
+
lineHeight: '1',
|
|
22
|
+
},
|
|
23
|
+
itemPreview: { height: 'var(--tags-input-item-height)', px: 'var(--tags-input-item-px)' },
|
|
24
|
+
} as const
|
|
25
|
+
|
|
26
|
+
const appearance = {
|
|
27
|
+
control: {
|
|
28
|
+
'--focus-color': 'colors.colorPalette.ring',
|
|
29
|
+
'--error-color': 'colors.red.9',
|
|
30
|
+
borderRadius: 'sm',
|
|
31
|
+
transitionDuration: 'normal',
|
|
32
|
+
transitionProperty: 'border-color, box-shadow',
|
|
33
|
+
_disabled: { opacity: '0.5' },
|
|
34
|
+
},
|
|
35
|
+
clearTrigger: {
|
|
36
|
+
borderRadius: 'xs',
|
|
37
|
+
color: 'gray.fg.muted',
|
|
38
|
+
focusRingWidth: '2px',
|
|
39
|
+
focusVisibleRing: 'inside',
|
|
40
|
+
cursor: { base: 'pointer', _disabled: 'initial' },
|
|
41
|
+
},
|
|
42
|
+
input: { outline: 'none' },
|
|
43
|
+
itemInput: { outline: 'none' },
|
|
44
|
+
itemDeleteTrigger: {
|
|
45
|
+
borderRadius: 'xs',
|
|
46
|
+
cursor: 'pointer',
|
|
47
|
+
_hover: { bg: 'colorPalette.bg.subtle' },
|
|
48
|
+
},
|
|
49
|
+
itemPreview: { borderRadius: 'xs' },
|
|
50
|
+
} as const
|
|
51
|
+
|
|
52
|
+
export const tagsInput = defineSlotRecipe({
|
|
53
|
+
className: 'app-tags-input',
|
|
54
|
+
jsx: ['TagsInput.Root', 'TagsInput.RootProvider'],
|
|
55
|
+
slots: tagsInputAnatomy.keys(),
|
|
56
|
+
base: {
|
|
57
|
+
root: { display: 'flex', flexDirection: 'column', width: 'full' },
|
|
58
|
+
control: { alignItems: 'center', display: 'flex', flexWrap: 'wrap', pos: 'relative' },
|
|
59
|
+
clearTrigger: { alignItems: 'center', display: 'flex', justifyContent: 'center' },
|
|
60
|
+
input: { flex: '1', _readOnly: { display: 'none' } },
|
|
61
|
+
itemInput: { minWidth: '2ch', verticalAlign: 'middle' },
|
|
62
|
+
itemDeleteTrigger: { display: 'flex', alignItems: 'center', justifyContent: 'center' },
|
|
63
|
+
itemPreview: { alignItems: 'center', display: 'inline-flex', userSelect: 'none' },
|
|
64
|
+
itemText: { lineClamp: '1' },
|
|
65
|
+
},
|
|
66
|
+
defaultVariants: { size: 'md', variant: 'outline' },
|
|
67
|
+
variants: {
|
|
68
|
+
variant: {
|
|
69
|
+
outline: {
|
|
70
|
+
...appearance,
|
|
71
|
+
control: {
|
|
72
|
+
...appearance.control,
|
|
73
|
+
borderWidth: '1px',
|
|
74
|
+
_invalid: { borderColor: 'var(--error-color)' },
|
|
75
|
+
_focus: {
|
|
76
|
+
outlineWidth: '1px',
|
|
77
|
+
outlineStyle: 'solid',
|
|
78
|
+
outlineColor: 'var(--focus-color)',
|
|
79
|
+
borderColor: 'var(--focus-color)',
|
|
80
|
+
_invalid: { outlineColor: 'var(--error-color)', borderColor: 'var(--error-color)' },
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
itemPreview: {
|
|
84
|
+
...appearance.itemPreview,
|
|
85
|
+
bg: 'colorPalette.bg.subtle',
|
|
86
|
+
color: 'colorPalette.fg.default',
|
|
87
|
+
_highlighted: { bg: 'colorPalette.bg.subtle.hover' },
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
subtle: {
|
|
91
|
+
...appearance,
|
|
92
|
+
control: {
|
|
93
|
+
...appearance.control,
|
|
94
|
+
bg: 'gray.bg.subtle',
|
|
95
|
+
color: 'gray.fg.default',
|
|
96
|
+
borderWidth: '1px',
|
|
97
|
+
borderColor: 'transparent',
|
|
98
|
+
_focus: {
|
|
99
|
+
outlineWidth: '1px',
|
|
100
|
+
outlineStyle: 'solid',
|
|
101
|
+
outlineColor: 'var(--focus-color)',
|
|
102
|
+
borderColor: 'var(--focus-color)',
|
|
103
|
+
_invalid: { outlineColor: 'var(--error-color)', borderColor: 'var(--error-color)' },
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
itemPreview: {
|
|
107
|
+
...appearance.itemPreview,
|
|
108
|
+
bg: 'gray.bg.surface',
|
|
109
|
+
borderWidth: '1px',
|
|
110
|
+
_highlighted: { bg: 'gray.bg.surface.hover', borderColor: 'gray.border.default.hover' },
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
surface: {
|
|
114
|
+
...appearance,
|
|
115
|
+
control: {
|
|
116
|
+
...appearance.control,
|
|
117
|
+
bg: 'gray.bg.surface',
|
|
118
|
+
borderWidth: '1px',
|
|
119
|
+
borderColor: 'gray.border.default',
|
|
120
|
+
_focus: {
|
|
121
|
+
outlineWidth: '1px',
|
|
122
|
+
outlineStyle: 'solid',
|
|
123
|
+
outlineColor: 'var(--focus-color)',
|
|
124
|
+
borderColor: 'var(--focus-color)',
|
|
125
|
+
_invalid: { outlineColor: 'var(--error-color)', borderColor: 'var(--error-color)' },
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
itemPreview: {
|
|
129
|
+
...appearance.itemPreview,
|
|
130
|
+
bg: 'colorPalette.bg.subtle',
|
|
131
|
+
color: 'colorPalette.fg.default',
|
|
132
|
+
_highlighted: { bg: 'colorPalette.bg.subtle.hover' },
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
unstyled: {},
|
|
136
|
+
},
|
|
137
|
+
size: {
|
|
138
|
+
xs: {
|
|
139
|
+
...sizeStyles,
|
|
140
|
+
root: {
|
|
141
|
+
...sizeStyles.root,
|
|
142
|
+
'--tags-input-height': 'sizes.8',
|
|
143
|
+
'--tags-input-px': 'spacing.1.5',
|
|
144
|
+
'--tags-input-item-height': 'sizes.5',
|
|
145
|
+
'--tags-input-item-px': 'spacing.1',
|
|
146
|
+
_icon: { boxSize: '3' },
|
|
147
|
+
textStyle: 'xs',
|
|
148
|
+
},
|
|
149
|
+
control: { ...sizeStyles.control, gap: '1' },
|
|
150
|
+
itemPreview: { ...sizeStyles.itemPreview, gap: '1' },
|
|
151
|
+
itemDeleteTrigger: { boxSize: '3.5', me: '-1px' },
|
|
152
|
+
},
|
|
153
|
+
sm: {
|
|
154
|
+
...sizeStyles,
|
|
155
|
+
root: {
|
|
156
|
+
...sizeStyles.root,
|
|
157
|
+
'--tags-input-height': 'sizes.9',
|
|
158
|
+
'--tags-input-px': 'spacing.1.5',
|
|
159
|
+
'--tags-input-item-height': 'sizes.6',
|
|
160
|
+
'--tags-input-item-px': 'spacing.1.5',
|
|
161
|
+
_icon: { boxSize: '3.5' },
|
|
162
|
+
textStyle: 'sm',
|
|
163
|
+
},
|
|
164
|
+
control: { ...sizeStyles.control, gap: '1' },
|
|
165
|
+
itemPreview: { ...sizeStyles.itemPreview, gap: '1' },
|
|
166
|
+
itemDeleteTrigger: { boxSize: '4.5', me: '-0.5' },
|
|
167
|
+
},
|
|
168
|
+
md: {
|
|
169
|
+
...sizeStyles,
|
|
170
|
+
root: {
|
|
171
|
+
...sizeStyles.root,
|
|
172
|
+
'--tags-input-height': 'sizes.10',
|
|
173
|
+
'--tags-input-px': 'spacing.1.5',
|
|
174
|
+
'--tags-input-item-height': 'sizes.7',
|
|
175
|
+
'--tags-input-item-px': 'spacing.2',
|
|
176
|
+
_icon: { boxSize: '3.5' },
|
|
177
|
+
textStyle: 'sm',
|
|
178
|
+
},
|
|
179
|
+
control: { ...sizeStyles.control, gap: '1.5' },
|
|
180
|
+
itemPreview: { ...sizeStyles.itemPreview, gap: '1' },
|
|
181
|
+
itemDeleteTrigger: { boxSize: '5', me: '-1' },
|
|
182
|
+
},
|
|
183
|
+
lg: {
|
|
184
|
+
...sizeStyles,
|
|
185
|
+
root: {
|
|
186
|
+
...sizeStyles.root,
|
|
187
|
+
'--tags-input-height': 'sizes.11',
|
|
188
|
+
'--tags-input-px': 'spacing.1.5',
|
|
189
|
+
'--tags-input-item-height': 'sizes.8',
|
|
190
|
+
'--tags-input-item-px': 'spacing.2.5',
|
|
191
|
+
_icon: { boxSize: '4' },
|
|
192
|
+
textStyle: 'md',
|
|
193
|
+
},
|
|
194
|
+
control: { ...sizeStyles.control, gap: '1.5' },
|
|
195
|
+
itemPreview: { ...sizeStyles.itemPreview, gap: '1' },
|
|
196
|
+
itemDeleteTrigger: { boxSize: '6', me: '-1.5' },
|
|
197
|
+
},
|
|
198
|
+
unstyled: {},
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
})
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { defineRecipe } from '@pandacss/dev'
|
|
2
|
+
|
|
3
|
+
const appearance = {
|
|
4
|
+
borderRadius: 'sm',
|
|
5
|
+
outline: '0',
|
|
6
|
+
transition: 'colors',
|
|
7
|
+
transitionProperty: 'box-shadow, border-color',
|
|
8
|
+
_disabled: { layerStyle: 'disabled' },
|
|
9
|
+
} as const
|
|
10
|
+
|
|
11
|
+
export const textarea = defineRecipe({
|
|
12
|
+
className: 'app-textarea',
|
|
13
|
+
jsx: ['Textarea'],
|
|
14
|
+
base: {
|
|
15
|
+
appearance: 'none',
|
|
16
|
+
minWidth: '0',
|
|
17
|
+
position: 'relative',
|
|
18
|
+
width: '100%',
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
size: 'md',
|
|
22
|
+
variant: 'surface',
|
|
23
|
+
},
|
|
24
|
+
variants: {
|
|
25
|
+
variant: {
|
|
26
|
+
unstyled: {},
|
|
27
|
+
outline: {
|
|
28
|
+
...appearance,
|
|
29
|
+
borderWidth: '1px',
|
|
30
|
+
borderColor: 'gray.border.strong',
|
|
31
|
+
focusVisibleRing: 'inside',
|
|
32
|
+
_invalid: {
|
|
33
|
+
borderColor: 'red.9',
|
|
34
|
+
focusRingColor: 'red.9',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
surface: {
|
|
38
|
+
...appearance,
|
|
39
|
+
bg: 'gray.bg.surface',
|
|
40
|
+
borderWidth: '1px',
|
|
41
|
+
borderColor: 'gray.border.default',
|
|
42
|
+
focusVisibleRing: 'inside',
|
|
43
|
+
_invalid: {
|
|
44
|
+
borderColor: 'red.9',
|
|
45
|
+
focusRingColor: 'red.9',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
subtle: {
|
|
49
|
+
...appearance,
|
|
50
|
+
borderWidth: '1px',
|
|
51
|
+
borderColor: 'transparent',
|
|
52
|
+
bg: 'gray.bg.subtle',
|
|
53
|
+
color: 'gray.fg.default',
|
|
54
|
+
focusVisibleRing: 'inside',
|
|
55
|
+
_invalid: {
|
|
56
|
+
borderColor: 'red.9',
|
|
57
|
+
focusRingColor: 'red.9',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
flushed: {
|
|
61
|
+
...appearance,
|
|
62
|
+
borderBottomWidth: '1px',
|
|
63
|
+
borderBottomColor: 'gray.border.strong',
|
|
64
|
+
borderRadius: '0',
|
|
65
|
+
color: 'gray.fg.default',
|
|
66
|
+
px: '0',
|
|
67
|
+
_invalid: {
|
|
68
|
+
borderColor: 'red.9',
|
|
69
|
+
},
|
|
70
|
+
_focus: {
|
|
71
|
+
borderColor: 'colorPalette.bg.default',
|
|
72
|
+
boxShadowColor: 'colorPalette.bg.default',
|
|
73
|
+
boxShadow: '0 1px 0 0 var(--shadow-color)',
|
|
74
|
+
_invalid: {
|
|
75
|
+
borderColor: 'red.9',
|
|
76
|
+
boxShadowColor: 'red.9',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
size: {
|
|
82
|
+
unstyled: {},
|
|
83
|
+
xs: { textStyle: 'sm', px: '2', py: '5px', scrollPaddingBottom: '5px' },
|
|
84
|
+
sm: { textStyle: 'sm', px: '2.5', py: '7px', scrollPaddingBottom: '7px' },
|
|
85
|
+
md: { textStyle: 'md', px: '3', py: '7px', scrollPaddingBottom: '7px' },
|
|
86
|
+
lg: { textStyle: 'md', px: '3.5', py: '9px', scrollPaddingBottom: '9px' },
|
|
87
|
+
xl: { textStyle: 'lg', px: '4', py: '9px', scrollPaddingBottom: '9px' },
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
})
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { defineSlotRecipe } from '@pandacss/dev'
|
|
2
|
+
|
|
3
|
+
const sizeStyles = {
|
|
4
|
+
root: { '--timeline-thickness': '1px' },
|
|
5
|
+
item: {
|
|
6
|
+
'--timeline-content-gap': '{spacing.6}',
|
|
7
|
+
gap: '4',
|
|
8
|
+
_last: { '--timeline-content-gap': '0' },
|
|
9
|
+
},
|
|
10
|
+
separator: {
|
|
11
|
+
borderInlineStartWidth: 'var(--timeline-thickness)',
|
|
12
|
+
marginInlineStart: 'calc(-1 * var(--timeline-thickness) / 2)',
|
|
13
|
+
insetInlineStart: 'calc(var(--timeline-indicator-size) / 2)',
|
|
14
|
+
},
|
|
15
|
+
indicator: { boxSize: 'var(--timeline-indicator-size)', fontSize: 'var(--timeline-font-size)' },
|
|
16
|
+
content: { pb: 'var(--timeline-content-gap)', gap: '2' },
|
|
17
|
+
title: { gap: '1.5' },
|
|
18
|
+
description: { textStyle: 'xs' },
|
|
19
|
+
} as const
|
|
20
|
+
|
|
21
|
+
const appearance = {
|
|
22
|
+
separator: { borderColor: 'gray.border.strong' },
|
|
23
|
+
indicator: {
|
|
24
|
+
outline: '2px solid {colors.gray.bg.page}',
|
|
25
|
+
borderRadius: 'full',
|
|
26
|
+
fontWeight: 'medium',
|
|
27
|
+
},
|
|
28
|
+
title: { fontWeight: 'medium' },
|
|
29
|
+
description: { color: 'gray.fg.muted' },
|
|
30
|
+
} as const
|
|
31
|
+
|
|
32
|
+
export const timeline = defineSlotRecipe({
|
|
33
|
+
className: 'app-timeline',
|
|
34
|
+
jsx: ['Timeline.Root'],
|
|
35
|
+
slots: ['root', 'item', 'connector', 'separator', 'indicator', 'content', 'title', 'description'],
|
|
36
|
+
base: {
|
|
37
|
+
root: {
|
|
38
|
+
display: 'flex',
|
|
39
|
+
flexDirection: 'column',
|
|
40
|
+
width: 'full',
|
|
41
|
+
'--timeline-separator-display': 'block',
|
|
42
|
+
},
|
|
43
|
+
item: { display: 'flex', position: 'relative', alignItems: 'flex-start', flexShrink: '0' },
|
|
44
|
+
connector: { alignSelf: 'stretch', position: 'relative' },
|
|
45
|
+
separator: {
|
|
46
|
+
display: 'var(--timeline-separator-display)',
|
|
47
|
+
position: 'absolute',
|
|
48
|
+
insetBlock: '0',
|
|
49
|
+
},
|
|
50
|
+
indicator: {
|
|
51
|
+
position: 'relative',
|
|
52
|
+
flexShrink: '0',
|
|
53
|
+
display: 'flex',
|
|
54
|
+
alignItems: 'center',
|
|
55
|
+
justifyContent: 'center',
|
|
56
|
+
_icon: { boxSize: '1em' },
|
|
57
|
+
},
|
|
58
|
+
content: { display: 'flex', flexDirection: 'column', width: 'full', minWidth: '0' },
|
|
59
|
+
title: { display: 'flex', flexWrap: 'wrap', alignItems: 'center' },
|
|
60
|
+
},
|
|
61
|
+
variants: {
|
|
62
|
+
variant: {
|
|
63
|
+
subtle: {
|
|
64
|
+
...appearance,
|
|
65
|
+
indicator: {
|
|
66
|
+
...appearance.indicator,
|
|
67
|
+
bg: 'colorPalette.bg.subtle',
|
|
68
|
+
color: 'colorPalette.fg.default',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
solid: {
|
|
72
|
+
...appearance,
|
|
73
|
+
indicator: {
|
|
74
|
+
...appearance.indicator,
|
|
75
|
+
bg: 'colorPalette.bg.default',
|
|
76
|
+
color: 'colorPalette.fg.onSolid',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
outline: {
|
|
80
|
+
...appearance,
|
|
81
|
+
indicator: {
|
|
82
|
+
...appearance.indicator,
|
|
83
|
+
bg: 'gray.bg.page',
|
|
84
|
+
borderWidth: '1px',
|
|
85
|
+
borderColor: 'colorPalette.border.strong',
|
|
86
|
+
color: 'colorPalette.fg.default',
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
plain: appearance,
|
|
90
|
+
unstyled: {},
|
|
91
|
+
},
|
|
92
|
+
showLastSeparator: {
|
|
93
|
+
true: { item: { _last: { '--timeline-separator-display': 'block' } } },
|
|
94
|
+
false: { item: { _last: { '--timeline-separator-display': 'none' } } },
|
|
95
|
+
},
|
|
96
|
+
size: {
|
|
97
|
+
sm: {
|
|
98
|
+
...sizeStyles,
|
|
99
|
+
root: {
|
|
100
|
+
...sizeStyles.root,
|
|
101
|
+
'--timeline-indicator-size': '{sizes.4}',
|
|
102
|
+
'--timeline-font-size': '{fontSizes.2xs}',
|
|
103
|
+
},
|
|
104
|
+
title: { ...sizeStyles.title, textStyle: 'xs' },
|
|
105
|
+
},
|
|
106
|
+
md: {
|
|
107
|
+
...sizeStyles,
|
|
108
|
+
root: {
|
|
109
|
+
...sizeStyles.root,
|
|
110
|
+
'--timeline-indicator-size': '{sizes.5}',
|
|
111
|
+
'--timeline-font-size': '{fontSizes.xs}',
|
|
112
|
+
},
|
|
113
|
+
title: { ...sizeStyles.title, textStyle: 'sm' },
|
|
114
|
+
},
|
|
115
|
+
lg: {
|
|
116
|
+
...sizeStyles,
|
|
117
|
+
root: {
|
|
118
|
+
...sizeStyles.root,
|
|
119
|
+
'--timeline-indicator-size': '{sizes.6}',
|
|
120
|
+
'--timeline-font-size': '{fontSizes.xs}',
|
|
121
|
+
},
|
|
122
|
+
title: { ...sizeStyles.title, mt: '0.5', textStyle: 'sm' },
|
|
123
|
+
},
|
|
124
|
+
xl: {
|
|
125
|
+
...sizeStyles,
|
|
126
|
+
root: {
|
|
127
|
+
...sizeStyles.root,
|
|
128
|
+
'--timeline-indicator-size': '{sizes.8}',
|
|
129
|
+
'--timeline-font-size': '{fontSizes.sm}',
|
|
130
|
+
},
|
|
131
|
+
title: { ...sizeStyles.title, mt: '1.5', textStyle: 'sm' },
|
|
132
|
+
},
|
|
133
|
+
unstyled: {},
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
defaultVariants: { size: 'md', variant: 'solid', showLastSeparator: false },
|
|
137
|
+
})
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { toastAnatomy } from '@ark-ui/react/anatomy'
|
|
2
|
+
import { defineSlotRecipe } from '@pandacss/dev'
|
|
3
|
+
|
|
4
|
+
export const toast = defineSlotRecipe({
|
|
5
|
+
className: 'app-toast',
|
|
6
|
+
jsx: ['Toast.Root', 'Root'],
|
|
7
|
+
slots: toastAnatomy.keys(),
|
|
8
|
+
base: {
|
|
9
|
+
root: {
|
|
10
|
+
alignItems: 'start',
|
|
11
|
+
background: 'gray.bg.surface',
|
|
12
|
+
borderRadius: 'md',
|
|
13
|
+
boxShadow: 'lg',
|
|
14
|
+
display: 'flex',
|
|
15
|
+
gap: '4',
|
|
16
|
+
height: 'var(--height)',
|
|
17
|
+
minWidth: 'sm',
|
|
18
|
+
opacity: 'var(--opacity)',
|
|
19
|
+
overflowWrap: 'anywhere',
|
|
20
|
+
p: '4',
|
|
21
|
+
position: 'relative',
|
|
22
|
+
scale: 'var(--scale)',
|
|
23
|
+
transitionDuration: 'slow',
|
|
24
|
+
transitionProperty: 'translate, scale, opacity, height',
|
|
25
|
+
transitionTimingFunction: 'default',
|
|
26
|
+
translate: 'var(--x) var(--y)',
|
|
27
|
+
width: 'full',
|
|
28
|
+
willChange: 'translate, opacity, scale',
|
|
29
|
+
zIndex: 'var(--z-index)',
|
|
30
|
+
},
|
|
31
|
+
title: {
|
|
32
|
+
color: 'gray.fg.default',
|
|
33
|
+
fontWeight: 'medium',
|
|
34
|
+
textStyle: 'sm',
|
|
35
|
+
},
|
|
36
|
+
description: {
|
|
37
|
+
color: 'gray.fg.muted',
|
|
38
|
+
textStyle: 'sm',
|
|
39
|
+
},
|
|
40
|
+
actionTrigger: {
|
|
41
|
+
color: 'colorPalette.fg.default',
|
|
42
|
+
cursor: 'pointer',
|
|
43
|
+
fontWeight: 'semibold',
|
|
44
|
+
textStyle: 'sm',
|
|
45
|
+
},
|
|
46
|
+
closeTrigger: {
|
|
47
|
+
position: 'absolute',
|
|
48
|
+
top: '2',
|
|
49
|
+
insetEnd: '2',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
})
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { tooltipAnatomy } from '@ark-ui/react/anatomy'
|
|
2
|
+
import { defineSlotRecipe } from '@pandacss/dev'
|
|
3
|
+
|
|
4
|
+
export const tooltip = defineSlotRecipe({
|
|
5
|
+
className: 'app-tooltip',
|
|
6
|
+
jsx: ['Tooltip.Root', 'Tooltip.RootProvider', 'Tooltip'],
|
|
7
|
+
slots: tooltipAnatomy.keys(),
|
|
8
|
+
base: {
|
|
9
|
+
content: {
|
|
10
|
+
'--tooltip-bg': 'colors.gray.bg.default',
|
|
11
|
+
bg: 'var(--tooltip-bg)',
|
|
12
|
+
color: 'gray.fg.onSolid',
|
|
13
|
+
borderRadius: 'sm',
|
|
14
|
+
boxShadow: 'sm',
|
|
15
|
+
fontWeight: 'semibold',
|
|
16
|
+
px: '2',
|
|
17
|
+
py: '1.5',
|
|
18
|
+
textStyle: 'xs',
|
|
19
|
+
maxWidth: 'xs',
|
|
20
|
+
_open: {
|
|
21
|
+
_motionSafe: {
|
|
22
|
+
animationStyle: 'scale-fade-in',
|
|
23
|
+
animationDuration: 'fast',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
_closed: {
|
|
27
|
+
_motionSafe: {
|
|
28
|
+
animationStyle: 'scale-fade-out',
|
|
29
|
+
animationDuration: 'faster',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
_motionReduce: { animation: 'none' },
|
|
33
|
+
},
|
|
34
|
+
arrow: {
|
|
35
|
+
'--arrow-size': 'sizes.2',
|
|
36
|
+
'--arrow-background': 'var(--tooltip-bg)',
|
|
37
|
+
},
|
|
38
|
+
arrowTip: {
|
|
39
|
+
borderTopWidth: '1px',
|
|
40
|
+
borderInlineStartWidth: '1px',
|
|
41
|
+
borderColor: 'var(--tooltip-bg)',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
})
|