aeon-ui-engine 1.0.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/.changeset/README.md +23 -0
- package/.changeset/combobox-and-changesets.md +9 -0
- package/.changeset/config.json +30 -0
- package/.changeset/framework-adapters.md +12 -0
- package/.changeset/scene-3d.md +6 -0
- package/.changeset/scene-plane.md +8 -0
- package/.changeset/site-og.md +5 -0
- package/.cursor/rules/aeon-ui.mdc +22 -0
- package/ACCESSIBILITY.md +32 -0
- package/AGENTS.md +226 -0
- package/COMPONENTS.md +36 -0
- package/FRAMEWORKS.md +57 -0
- package/INTEGRATION.md +89 -0
- package/LICENSE +21 -0
- package/PHILOSOPHY.md +71 -0
- package/PUBLISHING.md +85 -0
- package/README.md +154 -0
- package/SCENE.md +113 -0
- package/STATES.md +243 -0
- package/apps/demo/index.html +31 -0
- package/apps/demo/og.config.mjs +15 -0
- package/apps/demo/package.json +41 -0
- package/apps/demo/public/favicon.svg +16 -0
- package/apps/demo/public/og.png +0 -0
- package/apps/demo/public/og.svg +35 -0
- package/apps/demo/scripts/generate-og-png.mjs +60 -0
- package/apps/demo/src/App.tsx +31 -0
- package/apps/demo/src/aeonDiagrams.ts +100 -0
- package/apps/demo/src/app.css +16 -0
- package/apps/demo/src/components/ActionCluster.tsx +20 -0
- package/apps/demo/src/components/AsyncMachineDemo.tsx +97 -0
- package/apps/demo/src/components/ButtonLifecycleDemo.tsx +63 -0
- package/apps/demo/src/components/CodeExample.tsx +7 -0
- package/apps/demo/src/components/ComboboxDemo.tsx +30 -0
- package/apps/demo/src/components/DiagramsSection.tsx +38 -0
- package/apps/demo/src/components/FieldStateDemo.tsx +51 -0
- package/apps/demo/src/components/GridMesh.tsx +8 -0
- package/apps/demo/src/components/HeroInstall.tsx +10 -0
- package/apps/demo/src/components/LandingFaq.tsx +29 -0
- package/apps/demo/src/components/LandingFooter.tsx +22 -0
- package/apps/demo/src/components/LandingHeader.tsx +60 -0
- package/apps/demo/src/components/LandingHero.tsx +55 -0
- package/apps/demo/src/components/LayersSection.tsx +51 -0
- package/apps/demo/src/components/MermaidDiagram.tsx +84 -0
- package/apps/demo/src/components/PhilosophySection.tsx +33 -0
- package/apps/demo/src/components/PlaygroundBlock.tsx +23 -0
- package/apps/demo/src/components/PlaygroundSection.tsx +204 -0
- package/apps/demo/src/components/SceneSection.tsx +157 -0
- package/apps/demo/src/components/ScrollRegionDemo.tsx +74 -0
- package/apps/demo/src/components/ThemeSwitcher.tsx +76 -0
- package/apps/demo/src/demo-layout.css +264 -0
- package/apps/demo/src/landing.css +1094 -0
- package/apps/demo/src/main.tsx +14 -0
- package/apps/demo/src/nav.ts +9 -0
- package/apps/demo/src/site.ts +347 -0
- package/apps/demo/tsconfig.json +17 -0
- package/apps/demo/vite-plugins/og-meta.ts +30 -0
- package/apps/demo/vite.config.ts +69 -0
- package/docs/API_PATTERNS.md +234 -0
- package/docs/ARCHITECTURE.md +125 -0
- package/docs/COMPONENT_CHECKLIST.md +103 -0
- package/docs/FILE_MAP.md +122 -0
- package/docs/GLOSSARY.md +125 -0
- package/docs/INDEX.md +53 -0
- package/docs/LAYOUT_COORDINATES.md +178 -0
- package/docs/MACHINES.md +166 -0
- package/docs/MIGRATION_FROM_ARK.md +295 -0
- package/docs/VITE_CONSUMER.md +114 -0
- package/package.json +25 -0
- package/packages/core/README.md +69 -0
- package/packages/core/package.json +37 -0
- package/packages/core/src/anatomy.ts +144 -0
- package/packages/core/src/attrs.ts +47 -0
- package/packages/core/src/index.ts +8 -0
- package/packages/core/src/layout.ts +176 -0
- package/packages/core/src/machine.test.ts +18 -0
- package/packages/core/src/machine.ts +15 -0
- package/packages/core/src/philosophy.ts +10 -0
- package/packages/core/src/scroll.ts +72 -0
- package/packages/core/src/theme.test.ts +14 -0
- package/packages/core/src/theme.ts +53 -0
- package/packages/core/src/types.ts +25 -0
- package/packages/core/theme-transition.css +58 -0
- package/packages/core/tsconfig.json +8 -0
- package/packages/core/vitest.config.ts +8 -0
- package/packages/geometry/README.md +7 -0
- package/packages/geometry/package.json +35 -0
- package/packages/geometry/src/index.ts +3 -0
- package/packages/geometry/src/patterns.ts +55 -0
- package/packages/geometry/src/scene-attrs.ts +11 -0
- package/packages/geometry/src/svg.ts +60 -0
- package/packages/geometry/tsconfig.json +8 -0
- package/packages/panda/README.md +66 -0
- package/packages/panda/package.json +40 -0
- package/packages/panda/panda.config.ts +229 -0
- package/packages/panda/scripts/emit-theme-runtime.ts +37 -0
- package/packages/panda/src/recipes/accordion.ts +95 -0
- package/packages/panda/src/recipes/async.ts +76 -0
- package/packages/panda/src/recipes/badge.ts +44 -0
- package/packages/panda/src/recipes/button-group.ts +33 -0
- package/packages/panda/src/recipes/button.ts +91 -0
- package/packages/panda/src/recipes/checkbox.ts +41 -0
- package/packages/panda/src/recipes/combobox.ts +121 -0
- package/packages/panda/src/recipes/dialog.ts +96 -0
- package/packages/panda/src/recipes/field-shared.ts +29 -0
- package/packages/panda/src/recipes/field.ts +72 -0
- package/packages/panda/src/recipes/floating.ts +170 -0
- package/packages/panda/src/recipes/index.ts +14 -0
- package/packages/panda/src/recipes/scroll-region.ts +55 -0
- package/packages/panda/src/recipes/select.ts +111 -0
- package/packages/panda/src/recipes/switch.ts +51 -0
- package/packages/panda/src/recipes/tabs.ts +50 -0
- package/packages/panda/src/theme/catalog-types.ts +24 -0
- package/packages/panda/src/theme/catalog.ts +73 -0
- package/packages/panda/src/theme/chrome.css +75 -0
- package/packages/panda/src/theme/global-theme-css.ts +42 -0
- package/packages/panda/src/theme/index.ts +5 -0
- package/packages/panda/src/theme/palette.ts +65 -0
- package/packages/panda/src/theme/scrollbars.css +96 -0
- package/packages/panda/src/theme/semantic-tokens.ts +17 -0
- package/packages/panda/src/theme/themes.config.ts +516 -0
- package/packages/panda/src/theme/tokens.ts +51 -0
- package/packages/panda/styled-system/css/conditions.mjs +36 -0
- package/packages/panda/styled-system/css/css.d.ts +22 -0
- package/packages/panda/styled-system/css/css.mjs +45 -0
- package/packages/panda/styled-system/css/cva.d.ts +6 -0
- package/packages/panda/styled-system/css/cva.mjs +87 -0
- package/packages/panda/styled-system/css/cx.d.ts +5 -0
- package/packages/panda/styled-system/css/cx.mjs +15 -0
- package/packages/panda/styled-system/css/index.d.ts +5 -0
- package/packages/panda/styled-system/css/index.mjs +4 -0
- package/packages/panda/styled-system/css/sva.d.ts +4 -0
- package/packages/panda/styled-system/css/sva.mjs +41 -0
- package/packages/panda/styled-system/helpers.mjs +339 -0
- package/packages/panda/styled-system/jsx/aspect-ratio.d.ts +10 -0
- package/packages/panda/styled-system/jsx/aspect-ratio.mjs +14 -0
- package/packages/panda/styled-system/jsx/bleed.d.ts +10 -0
- package/packages/panda/styled-system/jsx/bleed.mjs +14 -0
- package/packages/panda/styled-system/jsx/box.d.ts +10 -0
- package/packages/panda/styled-system/jsx/box.mjs +14 -0
- package/packages/panda/styled-system/jsx/center.d.ts +10 -0
- package/packages/panda/styled-system/jsx/center.mjs +14 -0
- package/packages/panda/styled-system/jsx/circle.d.ts +10 -0
- package/packages/panda/styled-system/jsx/circle.mjs +14 -0
- package/packages/panda/styled-system/jsx/container.d.ts +10 -0
- package/packages/panda/styled-system/jsx/container.mjs +14 -0
- package/packages/panda/styled-system/jsx/cq.d.ts +10 -0
- package/packages/panda/styled-system/jsx/cq.mjs +14 -0
- package/packages/panda/styled-system/jsx/divider.d.ts +10 -0
- package/packages/panda/styled-system/jsx/divider.mjs +14 -0
- package/packages/panda/styled-system/jsx/factory-helper.mjs +22 -0
- package/packages/panda/styled-system/jsx/factory.d.ts +3 -0
- package/packages/panda/styled-system/jsx/factory.mjs +80 -0
- package/packages/panda/styled-system/jsx/flex.d.ts +10 -0
- package/packages/panda/styled-system/jsx/flex.mjs +14 -0
- package/packages/panda/styled-system/jsx/float.d.ts +10 -0
- package/packages/panda/styled-system/jsx/float.mjs +14 -0
- package/packages/panda/styled-system/jsx/grid-item.d.ts +10 -0
- package/packages/panda/styled-system/jsx/grid-item.mjs +14 -0
- package/packages/panda/styled-system/jsx/grid.d.ts +10 -0
- package/packages/panda/styled-system/jsx/grid.mjs +14 -0
- package/packages/panda/styled-system/jsx/hstack.d.ts +10 -0
- package/packages/panda/styled-system/jsx/hstack.mjs +14 -0
- package/packages/panda/styled-system/jsx/index.d.ts +24 -0
- package/packages/panda/styled-system/jsx/index.mjs +22 -0
- package/packages/panda/styled-system/jsx/is-valid-prop.d.ts +11 -0
- package/packages/panda/styled-system/jsx/is-valid-prop.mjs +17 -0
- package/packages/panda/styled-system/jsx/link-overlay.d.ts +10 -0
- package/packages/panda/styled-system/jsx/link-overlay.mjs +14 -0
- package/packages/panda/styled-system/jsx/spacer.d.ts +10 -0
- package/packages/panda/styled-system/jsx/spacer.mjs +14 -0
- package/packages/panda/styled-system/jsx/square.d.ts +10 -0
- package/packages/panda/styled-system/jsx/square.mjs +14 -0
- package/packages/panda/styled-system/jsx/stack.d.ts +10 -0
- package/packages/panda/styled-system/jsx/stack.mjs +14 -0
- package/packages/panda/styled-system/jsx/visually-hidden.d.ts +10 -0
- package/packages/panda/styled-system/jsx/visually-hidden.mjs +14 -0
- package/packages/panda/styled-system/jsx/vstack.d.ts +10 -0
- package/packages/panda/styled-system/jsx/vstack.mjs +14 -0
- package/packages/panda/styled-system/jsx/wrap.d.ts +10 -0
- package/packages/panda/styled-system/jsx/wrap.mjs +14 -0
- package/packages/panda/styled-system/patterns/aspect-ratio.d.ts +21 -0
- package/packages/panda/styled-system/patterns/aspect-ratio.mjs +38 -0
- package/packages/panda/styled-system/patterns/bleed.d.ts +22 -0
- package/packages/panda/styled-system/patterns/bleed.mjs +24 -0
- package/packages/panda/styled-system/patterns/box.d.ts +21 -0
- package/packages/panda/styled-system/patterns/box.mjs +15 -0
- package/packages/panda/styled-system/patterns/center.d.ts +21 -0
- package/packages/panda/styled-system/patterns/center.mjs +21 -0
- package/packages/panda/styled-system/patterns/circle.d.ts +21 -0
- package/packages/panda/styled-system/patterns/circle.mjs +25 -0
- package/packages/panda/styled-system/patterns/container.d.ts +21 -0
- package/packages/panda/styled-system/patterns/container.mjs +21 -0
- package/packages/panda/styled-system/patterns/cq.d.ts +22 -0
- package/packages/panda/styled-system/patterns/cq.mjs +21 -0
- package/packages/panda/styled-system/patterns/divider.d.ts +23 -0
- package/packages/panda/styled-system/patterns/divider.mjs +25 -0
- package/packages/panda/styled-system/patterns/flex.d.ts +27 -0
- package/packages/panda/styled-system/patterns/flex.mjs +26 -0
- package/packages/panda/styled-system/patterns/float.d.ts +24 -0
- package/packages/panda/styled-system/patterns/float.mjs +52 -0
- package/packages/panda/styled-system/patterns/grid-item.d.ts +26 -0
- package/packages/panda/styled-system/patterns/grid-item.mjs +25 -0
- package/packages/panda/styled-system/patterns/grid.d.ts +25 -0
- package/packages/panda/styled-system/patterns/grid.mjs +27 -0
- package/packages/panda/styled-system/patterns/hstack.d.ts +22 -0
- package/packages/panda/styled-system/patterns/hstack.mjs +24 -0
- package/packages/panda/styled-system/patterns/index.d.ts +21 -0
- package/packages/panda/styled-system/patterns/index.mjs +20 -0
- package/packages/panda/styled-system/patterns/link-overlay.d.ts +21 -0
- package/packages/panda/styled-system/patterns/link-overlay.mjs +24 -0
- package/packages/panda/styled-system/patterns/spacer.d.ts +21 -0
- package/packages/panda/styled-system/patterns/spacer.mjs +21 -0
- package/packages/panda/styled-system/patterns/square.d.ts +21 -0
- package/packages/panda/styled-system/patterns/square.mjs +24 -0
- package/packages/panda/styled-system/patterns/stack.d.ts +24 -0
- package/packages/panda/styled-system/patterns/stack.mjs +24 -0
- package/packages/panda/styled-system/patterns/visually-hidden.d.ts +21 -0
- package/packages/panda/styled-system/patterns/visually-hidden.mjs +18 -0
- package/packages/panda/styled-system/patterns/vstack.d.ts +22 -0
- package/packages/panda/styled-system/patterns/vstack.mjs +24 -0
- package/packages/panda/styled-system/patterns/wrap.d.ts +25 -0
- package/packages/panda/styled-system/patterns/wrap.mjs +25 -0
- package/packages/panda/styled-system/recipes/aeon-accordion.d.ts +32 -0
- package/packages/panda/styled-system/recipes/aeon-accordion.mjs +48 -0
- package/packages/panda/styled-system/recipes/aeon-async.d.ts +32 -0
- package/packages/panda/styled-system/recipes/aeon-async.mjs +56 -0
- package/packages/panda/styled-system/recipes/aeon-badge.d.ts +31 -0
- package/packages/panda/styled-system/recipes/aeon-badge.mjs +32 -0
- package/packages/panda/styled-system/recipes/aeon-button-group.d.ts +39 -0
- package/packages/panda/styled-system/recipes/aeon-button-group.mjs +37 -0
- package/packages/panda/styled-system/recipes/aeon-button.d.ts +39 -0
- package/packages/panda/styled-system/recipes/aeon-button.mjs +39 -0
- package/packages/panda/styled-system/recipes/aeon-checkbox.d.ts +28 -0
- package/packages/panda/styled-system/recipes/aeon-checkbox.mjs +48 -0
- package/packages/panda/styled-system/recipes/aeon-combobox.d.ts +32 -0
- package/packages/panda/styled-system/recipes/aeon-combobox.mjs +52 -0
- package/packages/panda/styled-system/recipes/aeon-dialog.d.ts +28 -0
- package/packages/panda/styled-system/recipes/aeon-dialog.mjs +60 -0
- package/packages/panda/styled-system/recipes/aeon-field.d.ts +32 -0
- package/packages/panda/styled-system/recipes/aeon-field.mjs +52 -0
- package/packages/panda/styled-system/recipes/aeon-menu.d.ts +28 -0
- package/packages/panda/styled-system/recipes/aeon-menu.mjs +52 -0
- package/packages/panda/styled-system/recipes/aeon-popover.d.ts +28 -0
- package/packages/panda/styled-system/recipes/aeon-popover.mjs +52 -0
- package/packages/panda/styled-system/recipes/aeon-scroll.d.ts +43 -0
- package/packages/panda/styled-system/recipes/aeon-scroll.mjs +63 -0
- package/packages/panda/styled-system/recipes/aeon-select.d.ts +32 -0
- package/packages/panda/styled-system/recipes/aeon-select.mjs +56 -0
- package/packages/panda/styled-system/recipes/aeon-switch.d.ts +28 -0
- package/packages/panda/styled-system/recipes/aeon-switch.mjs +48 -0
- package/packages/panda/styled-system/recipes/aeon-tabs.d.ts +28 -0
- package/packages/panda/styled-system/recipes/aeon-tabs.mjs +48 -0
- package/packages/panda/styled-system/recipes/aeon-toast.d.ts +28 -0
- package/packages/panda/styled-system/recipes/aeon-toast.mjs +48 -0
- package/packages/panda/styled-system/recipes/aeon-tooltip.d.ts +28 -0
- package/packages/panda/styled-system/recipes/aeon-tooltip.mjs +48 -0
- package/packages/panda/styled-system/recipes/create-recipe.mjs +82 -0
- package/packages/panda/styled-system/recipes/index.d.ts +18 -0
- package/packages/panda/styled-system/recipes/index.mjs +17 -0
- package/packages/panda/styled-system/styles.css +2157 -0
- package/packages/panda/styled-system/tokens/index.d.ts +9 -0
- package/packages/panda/styled-system/tokens/index.mjs +2156 -0
- package/packages/panda/styled-system/tokens/tokens.d.ts +60 -0
- package/packages/panda/styled-system/types/composition.d.ts +164 -0
- package/packages/panda/styled-system/types/conditions.d.ts +322 -0
- package/packages/panda/styled-system/types/csstype.d.ts +21298 -0
- package/packages/panda/styled-system/types/global.d.ts +20 -0
- package/packages/panda/styled-system/types/index.d.ts +8 -0
- package/packages/panda/styled-system/types/jsx.d.ts +52 -0
- package/packages/panda/styled-system/types/parts.d.ts +8 -0
- package/packages/panda/styled-system/types/pattern.d.ts +78 -0
- package/packages/panda/styled-system/types/prop-type.d.ts +240 -0
- package/packages/panda/styled-system/types/recipe.d.ts +181 -0
- package/packages/panda/styled-system/types/selectors.d.ts +59 -0
- package/packages/panda/styled-system/types/static-css.d.ts +56 -0
- package/packages/panda/styled-system/types/style-props.d.ts +7491 -0
- package/packages/panda/styled-system/types/system-types.d.ts +193 -0
- package/packages/panda/theme-runtime.css +842 -0
- package/packages/panda/tsconfig.json +8 -0
- package/packages/primitives/README.md +54 -0
- package/packages/primitives/package.json +41 -0
- package/packages/primitives/src/__tests__/floating-surface.test.ts +29 -0
- package/packages/primitives/src/index.ts +9 -0
- package/packages/primitives/src/machines/accordion.ts +56 -0
- package/packages/primitives/src/machines/async.ts +108 -0
- package/packages/primitives/src/machines/button.ts +66 -0
- package/packages/primitives/src/machines/dialog.ts +61 -0
- package/packages/primitives/src/machines/field.ts +85 -0
- package/packages/primitives/src/machines/popover.ts +52 -0
- package/packages/primitives/src/machines/tabs.ts +46 -0
- package/packages/primitives/src/machines/toast.ts +48 -0
- package/packages/primitives/src/machines/toggle.ts +61 -0
- package/packages/primitives/tsconfig.json +8 -0
- package/packages/primitives/vitest.config.ts +8 -0
- package/packages/react/README.md +65 -0
- package/packages/react/package.json +52 -0
- package/packages/react/src/accordion/index.tsx +179 -0
- package/packages/react/src/async/actions.tsx +22 -0
- package/packages/react/src/async/context.tsx +54 -0
- package/packages/react/src/async/index.tsx +21 -0
- package/packages/react/src/async/legacy-region.tsx +38 -0
- package/packages/react/src/async/readout.tsx +34 -0
- package/packages/react/src/async/root.tsx +39 -0
- package/packages/react/src/async/track.tsx +59 -0
- package/packages/react/src/avatar/avatar.test.tsx +27 -0
- package/packages/react/src/avatar/index.tsx +122 -0
- package/packages/react/src/button/index.tsx +70 -0
- package/packages/react/src/checkbox/index.tsx +180 -0
- package/packages/react/src/combobox/index.tsx +430 -0
- package/packages/react/src/dialog/dialog.test.tsx +50 -0
- package/packages/react/src/dialog/index.tsx +275 -0
- package/packages/react/src/field/index.tsx +172 -0
- package/packages/react/src/hooks/use-aeon-machine.ts +10 -0
- package/packages/react/src/hooks/use-anchor-position.ts +33 -0
- package/packages/react/src/hooks/use-focus-trap.ts +51 -0
- package/packages/react/src/hooks/use-layout-mode.ts +22 -0
- package/packages/react/src/hooks/use-outside-click.ts +19 -0
- package/packages/react/src/hooks/use-portalled.ts +16 -0
- package/packages/react/src/hooks/use-scroll-lock.ts +13 -0
- package/packages/react/src/index.ts +18 -0
- package/packages/react/src/menu/index.tsx +195 -0
- package/packages/react/src/popover/index.tsx +191 -0
- package/packages/react/src/scroll/index.tsx +98 -0
- package/packages/react/src/scroll/use-scroll-state.ts +30 -0
- package/packages/react/src/select/index.tsx +372 -0
- package/packages/react/src/select/select.test.tsx +60 -0
- package/packages/react/src/switch/index.tsx +215 -0
- package/packages/react/src/tabs/index.tsx +140 -0
- package/packages/react/src/toast/context.tsx +28 -0
- package/packages/react/src/toast/index.tsx +20 -0
- package/packages/react/src/toast/primitives.tsx +129 -0
- package/packages/react/src/toast/provider.tsx +111 -0
- package/packages/react/src/toast/toast-item.tsx +32 -0
- package/packages/react/src/tooltip/index.tsx +191 -0
- package/packages/react/src/utils/merge-props.ts +24 -0
- package/packages/react/tsconfig.json +8 -0
- package/packages/react/vitest.config.ts +9 -0
- package/packages/react/vitest.setup.ts +5 -0
- package/packages/react-scene/README.md +11 -0
- package/packages/react-scene/package.json +47 -0
- package/packages/react-scene/scene-3d.css +37 -0
- package/packages/react-scene/scene-room.css +95 -0
- package/packages/react-scene/src/index.ts +20 -0
- package/packages/react-scene/src/procedural-grid.tsx +35 -0
- package/packages/react-scene/src/scene-layer.tsx +38 -0
- package/packages/react-scene/src/scene-plane.tsx +69 -0
- package/packages/react-scene/src/scene-room.tsx +81 -0
- package/packages/react-scene/src/scene-root.tsx +49 -0
- package/packages/react-scene/src/scene-slot.tsx +41 -0
- package/packages/react-scene/src/scene-stage.tsx +37 -0
- package/packages/react-scene/src/scene-surface.tsx +20 -0
- package/packages/react-scene/src/signal-bars.tsx +57 -0
- package/packages/react-scene/src/use-signal-visualizer.ts +103 -0
- package/packages/react-scene/tsconfig.json +8 -0
- package/packages/scene/README.md +5 -0
- package/packages/scene/package.json +32 -0
- package/packages/scene/src/index.ts +2 -0
- package/packages/scene/src/room.ts +40 -0
- package/packages/scene/src/transform.ts +60 -0
- package/packages/scene/tsconfig.json +8 -0
- package/packages/signal/README.md +9 -0
- package/packages/signal/package.json +32 -0
- package/packages/signal/src/analyser.ts +113 -0
- package/packages/signal/src/bands.ts +33 -0
- package/packages/signal/src/index.ts +3 -0
- package/packages/signal/src/motion.ts +80 -0
- package/packages/signal/tsconfig.json +8 -0
- package/packages/site/README.md +19 -0
- package/packages/site/package.json +32 -0
- package/packages/site/src/index.ts +8 -0
- package/packages/site/src/open-graph.ts +90 -0
- package/packages/site/tsconfig.json +8 -0
- package/packages/solid/README.md +30 -0
- package/packages/solid/package.json +42 -0
- package/packages/solid/src/hooks/use-aeon-machine.ts +10 -0
- package/packages/solid/src/index.ts +2 -0
- package/packages/solid/src/switch/index.tsx +191 -0
- package/packages/solid/src/utils/merge-props.ts +3 -0
- package/packages/solid/tsconfig.json +10 -0
- package/packages/surface/README.md +10 -0
- package/packages/surface/package.json +33 -0
- package/packages/surface/src/index.ts +1 -0
- package/packages/surface/src/materials.ts +14 -0
- package/packages/surface/surface.css +113 -0
- package/packages/surface/tsconfig.json +8 -0
- package/packages/svelte/README.md +45 -0
- package/packages/svelte/package.json +49 -0
- package/packages/svelte/src/Switch.svelte +86 -0
- package/packages/svelte/src/SwitchControl.svelte +45 -0
- package/packages/svelte/src/SwitchHiddenInput.svelte +12 -0
- package/packages/svelte/src/SwitchLabel.svelte +9 -0
- package/packages/svelte/src/SwitchThumb.svelte +16 -0
- package/packages/svelte/src/hooks/use-aeon-machine.ts +23 -0
- package/packages/svelte/src/index.ts +2 -0
- package/packages/svelte/src/switch-context.ts +13 -0
- package/packages/svelte/tsconfig.json +8 -0
- package/packages/ui/README.md +63 -0
- package/packages/ui/package.json +45 -0
- package/packages/ui/src/accordion.tsx +27 -0
- package/packages/ui/src/async.tsx +43 -0
- package/packages/ui/src/badge.tsx +18 -0
- package/packages/ui/src/button.tsx +38 -0
- package/packages/ui/src/checkbox.tsx +24 -0
- package/packages/ui/src/cn.ts +1 -0
- package/packages/ui/src/combobox.tsx +29 -0
- package/packages/ui/src/dialog.tsx +32 -0
- package/packages/ui/src/field.tsx +33 -0
- package/packages/ui/src/index.ts +17 -0
- package/packages/ui/src/menu.tsx +25 -0
- package/packages/ui/src/popover.tsx +22 -0
- package/packages/ui/src/scroll.tsx +51 -0
- package/packages/ui/src/select.tsx +33 -0
- package/packages/ui/src/styles.css +2 -0
- package/packages/ui/src/switch.tsx +22 -0
- package/packages/ui/src/tabs.tsx +22 -0
- package/packages/ui/src/toast.tsx +36 -0
- package/packages/ui/src/tooltip.tsx +19 -0
- package/packages/ui/tsconfig.json +12 -0
- package/packages/vue/README.md +40 -0
- package/packages/vue/package.json +42 -0
- package/packages/vue/src/hooks/use-aeon-machine.ts +10 -0
- package/packages/vue/src/index.ts +2 -0
- package/packages/vue/src/switch/index.ts +208 -0
- package/packages/vue/src/utils/part-props.ts +8 -0
- package/packages/vue/tsconfig.json +8 -0
- package/pnpm-workspace.yaml +3 -0
- package/scripts/ensure-headless-built.mjs +25 -0
- package/tsconfig.base.json +21 -0
- package/vercel.json +12 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { ReactNode } from 'react'
|
|
2
|
+
import { Scroll } from '@aeon-ui/ui'
|
|
3
|
+
|
|
4
|
+
const verticalItems = Array.from({ length: 10 }, (_, i) => `Item ${i + 1}`)
|
|
5
|
+
const horizontalItems = Array.from({ length: 12 }, (_, i) => `Col ${i + 1}`)
|
|
6
|
+
const matrixCols = 5
|
|
7
|
+
const matrixRows = 4
|
|
8
|
+
const matrixItems = Array.from({ length: matrixCols * matrixRows }, (_, i) => {
|
|
9
|
+
const r = Math.floor(i / matrixCols) + 1
|
|
10
|
+
const c = (i % matrixCols) + 1
|
|
11
|
+
return `${r}·${c}`
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
function ScrollDemo({
|
|
15
|
+
label,
|
|
16
|
+
axis,
|
|
17
|
+
children,
|
|
18
|
+
}: {
|
|
19
|
+
label: string
|
|
20
|
+
axis: 'y' | 'x' | 'both'
|
|
21
|
+
children: ReactNode
|
|
22
|
+
}) {
|
|
23
|
+
return (
|
|
24
|
+
<div className="scroll-demo-cell">
|
|
25
|
+
<p className="scroll-demo-label">{label}</p>
|
|
26
|
+
<Scroll.Root axis={axis} maxH="sm" className="scroll-demo-scroll">
|
|
27
|
+
<Scroll.Viewport>
|
|
28
|
+
<Scroll.Content>{children}</Scroll.Content>
|
|
29
|
+
</Scroll.Viewport>
|
|
30
|
+
<div className="scroll-demo-meta">
|
|
31
|
+
<span className="scroll-demo-meta-label">data-aeon-state</span>
|
|
32
|
+
<Scroll.StateReadout className="scroll-demo-state" />
|
|
33
|
+
</div>
|
|
34
|
+
</Scroll.Root>
|
|
35
|
+
</div>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function ScrollRegionDemo() {
|
|
40
|
+
return (
|
|
41
|
+
<div className="scroll-demo">
|
|
42
|
+
<p className="scroll-demo-hint">Scroll inside each box — the state line updates at the edges.</p>
|
|
43
|
+
<div className="scroll-demo-grid">
|
|
44
|
+
<ScrollDemo label="Vertical" axis="y">
|
|
45
|
+
<ul className="scroll-demo-list">
|
|
46
|
+
{verticalItems.map((item) => (
|
|
47
|
+
<li key={item}>{item}</li>
|
|
48
|
+
))}
|
|
49
|
+
</ul>
|
|
50
|
+
</ScrollDemo>
|
|
51
|
+
|
|
52
|
+
<ScrollDemo label="Horizontal" axis="x">
|
|
53
|
+
<div className="scroll-demo-row">
|
|
54
|
+
{horizontalItems.map((cell) => (
|
|
55
|
+
<span key={cell} className="scroll-demo-chip">
|
|
56
|
+
{cell}
|
|
57
|
+
</span>
|
|
58
|
+
))}
|
|
59
|
+
</div>
|
|
60
|
+
</ScrollDemo>
|
|
61
|
+
|
|
62
|
+
<ScrollDemo label="Both axes" axis="both">
|
|
63
|
+
<div className="scroll-demo-matrix">
|
|
64
|
+
{matrixItems.map((cell) => (
|
|
65
|
+
<span key={cell} className="scroll-demo-chip">
|
|
66
|
+
{cell}
|
|
67
|
+
</span>
|
|
68
|
+
))}
|
|
69
|
+
</div>
|
|
70
|
+
</ScrollDemo>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AEON_THEME_MAP,
|
|
3
|
+
AEON_THEMES,
|
|
4
|
+
applyAeonTheme,
|
|
5
|
+
initAeonTheme,
|
|
6
|
+
isAeonThemeId,
|
|
7
|
+
type AeonMode,
|
|
8
|
+
type AeonThemeId,
|
|
9
|
+
} from '@aeon-ui/panda/themes'
|
|
10
|
+
import { Button, Select } from '@aeon-ui/ui'
|
|
11
|
+
import { useLayoutEffect, useState } from 'react'
|
|
12
|
+
|
|
13
|
+
export function ThemeSwitcher() {
|
|
14
|
+
const [themeId, setThemeId] = useState<AeonThemeId>('default')
|
|
15
|
+
const [mode, setMode] = useState<AeonMode>('dark')
|
|
16
|
+
|
|
17
|
+
useLayoutEffect(() => {
|
|
18
|
+
const { themeId: t, mode: m } = initAeonTheme()
|
|
19
|
+
setThemeId(t)
|
|
20
|
+
setMode(m)
|
|
21
|
+
}, [])
|
|
22
|
+
|
|
23
|
+
const setTheme = (nextTheme: AeonThemeId) => {
|
|
24
|
+
setThemeId(nextTheme)
|
|
25
|
+
applyAeonTheme(nextTheme, mode)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const setModeOnly = (nextMode: AeonMode) => {
|
|
29
|
+
setMode(nextMode)
|
|
30
|
+
applyAeonTheme(themeId, nextMode)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<div
|
|
35
|
+
className="theme-switcher"
|
|
36
|
+
data-aeon-scope="site"
|
|
37
|
+
data-aeon-part="theme"
|
|
38
|
+
aria-label="Site theme"
|
|
39
|
+
>
|
|
40
|
+
<div className="theme-switcher__modes" role="group" aria-label="Color mode">
|
|
41
|
+
{(['light', 'dark'] as const).map((m) => (
|
|
42
|
+
<Button.Root
|
|
43
|
+
key={m}
|
|
44
|
+
type="button"
|
|
45
|
+
size="xs"
|
|
46
|
+
variant={mode === m ? 'solid' : 'ghost'}
|
|
47
|
+
aria-pressed={mode === m}
|
|
48
|
+
className="theme-switcher__mode-btn"
|
|
49
|
+
onClick={() => setModeOnly(m)}
|
|
50
|
+
>
|
|
51
|
+
{m === 'light' ? 'Light' : 'Dark'}
|
|
52
|
+
</Button.Root>
|
|
53
|
+
))}
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<Select.Root
|
|
57
|
+
className="theme-switcher__theme-select"
|
|
58
|
+
value={themeId}
|
|
59
|
+
onValueChange={(v) => {
|
|
60
|
+
if (isAeonThemeId(v)) setTheme(v)
|
|
61
|
+
}}
|
|
62
|
+
>
|
|
63
|
+
<Select.Trigger aria-label="Theme preset">
|
|
64
|
+
{AEON_THEME_MAP[themeId].label}
|
|
65
|
+
</Select.Trigger>
|
|
66
|
+
<Select.Content>
|
|
67
|
+
{AEON_THEMES.map((t) => (
|
|
68
|
+
<Select.Item key={t.id} value={t.id}>
|
|
69
|
+
{t.label}
|
|
70
|
+
</Select.Item>
|
|
71
|
+
))}
|
|
72
|
+
</Select.Content>
|
|
73
|
+
</Select.Root>
|
|
74
|
+
</div>
|
|
75
|
+
)
|
|
76
|
+
}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/* App shell layout — explicit CSS (do not rely on removed Tailwind utilities). */
|
|
2
|
+
|
|
3
|
+
.demo-row {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-wrap: wrap;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: var(--aeon-gap-sm);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.demo-row--loose {
|
|
11
|
+
gap: var(--aeon-gap);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.demo-stack {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
align-items: flex-start;
|
|
18
|
+
gap: var(--aeon-gap);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.demo-stack--tight {
|
|
22
|
+
gap: var(--aeon-gap-sm);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.demo-combobox {
|
|
26
|
+
width: 100%;
|
|
27
|
+
max-width: 16rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.demo-overlay-row {
|
|
31
|
+
flex-direction: row;
|
|
32
|
+
flex-wrap: wrap;
|
|
33
|
+
align-items: center;
|
|
34
|
+
gap: var(--aeon-gap-lg);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.demo-tooltip-anchor {
|
|
38
|
+
text-decoration: underline dotted;
|
|
39
|
+
text-underline-offset: 3px;
|
|
40
|
+
cursor: help;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.demo-spaced-top {
|
|
44
|
+
margin-top: var(--aeon-gap);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.demo-spaced-bottom {
|
|
48
|
+
margin-bottom: var(--aeon-pad-md);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Machine console — track, readout, and actions as one rhythm */
|
|
52
|
+
.machine-console {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
gap: var(--aeon-gap-lg);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.machine-console__actions {
|
|
59
|
+
align-self: flex-start;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Status readout — aliases for aeon-async readout parts (demo + hero) */
|
|
63
|
+
.live-status,
|
|
64
|
+
.aeon-async-readout {
|
|
65
|
+
width: 100%;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.live-status__rail,
|
|
69
|
+
.aeon-async-readout__rail {
|
|
70
|
+
flex: 0 0 4px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.live-status__body,
|
|
74
|
+
.aeon-async-readout__body {
|
|
75
|
+
flex: 1 1 auto;
|
|
76
|
+
min-width: 0;
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
padding: var(--aeon-pad-md);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.live-status__text {
|
|
83
|
+
margin: 0;
|
|
84
|
+
max-width: 100%;
|
|
85
|
+
font-size: 0.875rem;
|
|
86
|
+
line-height: 1.5;
|
|
87
|
+
color: var(--aeon-muted);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.live-status--idle .live-status__rail,
|
|
91
|
+
.live-status--idle .aeon-async-readout__rail {
|
|
92
|
+
background: color-mix(in srgb, var(--aeon-muted) 55%, var(--aeon-border));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.live-status--loading .live-status__rail,
|
|
96
|
+
.live-status--loading .aeon-async-readout__rail {
|
|
97
|
+
background: linear-gradient(
|
|
98
|
+
180deg,
|
|
99
|
+
var(--aeon-accent),
|
|
100
|
+
color-mix(in srgb, var(--aeon-accent) 40%, var(--aeon-surface))
|
|
101
|
+
);
|
|
102
|
+
background-size: 100% 200%;
|
|
103
|
+
animation: live-status-rail 1.8s ease-in-out infinite;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.live-status--loading .live-status__text {
|
|
107
|
+
color: var(--aeon-accent);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.live-status--success .live-status__rail,
|
|
111
|
+
.live-status--success .aeon-async-readout__rail {
|
|
112
|
+
background: var(--aeon-accent);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.live-status--success .live-status__text {
|
|
116
|
+
color: var(--aeon-text);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.live-status--failure .live-status__rail,
|
|
120
|
+
.live-status--failure .aeon-async-readout__rail {
|
|
121
|
+
background: var(--aeon-danger);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.live-status--failure .live-status__text {
|
|
125
|
+
color: var(--aeon-danger);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.live-status--empty .live-status__rail,
|
|
129
|
+
.live-status--empty .aeon-async-readout__rail {
|
|
130
|
+
background: color-mix(in srgb, var(--aeon-muted) 45%, var(--aeon-border));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.live-status--empty .live-status__text {
|
|
134
|
+
color: var(--aeon-muted);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@keyframes live-status-rail {
|
|
138
|
+
0%,
|
|
139
|
+
100% {
|
|
140
|
+
background-position: 0% 0%;
|
|
141
|
+
}
|
|
142
|
+
50% {
|
|
143
|
+
background-position: 0% 100%;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@media (prefers-reduced-motion: reduce) {
|
|
148
|
+
.live-status--loading .live-status__rail {
|
|
149
|
+
animation: none;
|
|
150
|
+
background: var(--aeon-accent);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.playground-button-row {
|
|
155
|
+
display: inline-flex;
|
|
156
|
+
align-items: center;
|
|
157
|
+
max-width: 24rem;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* State track — equal columns; scales type to container (no clipped labels) */
|
|
161
|
+
.state-track {
|
|
162
|
+
--aeon-state-track-count: 5;
|
|
163
|
+
container-type: inline-size;
|
|
164
|
+
display: grid;
|
|
165
|
+
grid-template-columns: repeat(var(--aeon-state-track-count), minmax(0, 1fr));
|
|
166
|
+
align-items: stretch;
|
|
167
|
+
width: 100%;
|
|
168
|
+
max-width: 100%;
|
|
169
|
+
border: 1px solid var(--aeon-border);
|
|
170
|
+
border-radius: var(--aeon-radius-lg);
|
|
171
|
+
overflow: hidden;
|
|
172
|
+
background: var(--aeon-bg);
|
|
173
|
+
font-family: var(--aeon-mono);
|
|
174
|
+
font-size: clamp(0.5rem, 3cqi, 0.6875rem);
|
|
175
|
+
font-weight: 600;
|
|
176
|
+
letter-spacing: clamp(0.02em, 0.12cqi, 0.06em);
|
|
177
|
+
text-transform: uppercase;
|
|
178
|
+
line-height: 1.2;
|
|
179
|
+
box-shadow: inset 0 1px 0 color-mix(in srgb, var(--aeon-text) 4%, transparent);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.state-track__seg {
|
|
183
|
+
min-width: 0;
|
|
184
|
+
display: flex;
|
|
185
|
+
align-items: center;
|
|
186
|
+
justify-content: center;
|
|
187
|
+
padding: 0.65rem clamp(0.15rem, 2.5cqi, 0.85rem);
|
|
188
|
+
color: var(--aeon-muted);
|
|
189
|
+
background: var(--aeon-surface);
|
|
190
|
+
border-right: 1px solid var(--aeon-border);
|
|
191
|
+
white-space: nowrap;
|
|
192
|
+
transition:
|
|
193
|
+
background 0.22s ease,
|
|
194
|
+
color 0.22s ease,
|
|
195
|
+
box-shadow 0.22s ease;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.state-track__seg:last-child {
|
|
199
|
+
border-right: none;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* Completed steps — subtle lift, still on the rail */
|
|
203
|
+
.state-track__seg--past {
|
|
204
|
+
color: color-mix(in srgb, var(--aeon-text) 72%, var(--aeon-muted));
|
|
205
|
+
background: var(--aeon-surface-raised);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.state-track__seg--past.state-track__seg--success {
|
|
209
|
+
color: color-mix(in srgb, var(--aeon-accent) 55%, var(--aeon-text));
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/* Upcoming */
|
|
213
|
+
.state-track__seg--future {
|
|
214
|
+
color: color-mix(in srgb, var(--aeon-muted) 85%, transparent);
|
|
215
|
+
background: var(--aeon-bg);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* Active — fills the segment, flat joins to neighbors */
|
|
219
|
+
.state-track__seg--active {
|
|
220
|
+
color: var(--aeon-bg);
|
|
221
|
+
background: var(--aeon-accent);
|
|
222
|
+
box-shadow:
|
|
223
|
+
inset 0 1px 0 color-mix(in srgb, white 22%, transparent),
|
|
224
|
+
inset 0 -1px 0 color-mix(in srgb, black 12%, transparent);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.state-track__seg--active.state-track__seg--loading {
|
|
228
|
+
background: linear-gradient(
|
|
229
|
+
110deg,
|
|
230
|
+
var(--aeon-accent) 0%,
|
|
231
|
+
color-mix(in srgb, var(--aeon-accent) 65%, var(--aeon-surface-raised)) 48%,
|
|
232
|
+
var(--aeon-accent) 100%
|
|
233
|
+
);
|
|
234
|
+
background-size: 200% 100%;
|
|
235
|
+
animation: state-track-flow 2.4s ease-in-out infinite;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.state-track__seg--active.state-track__seg--success {
|
|
239
|
+
background: var(--aeon-accent);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.state-track__seg--active.state-track__seg--failure {
|
|
243
|
+
background: var(--aeon-danger);
|
|
244
|
+
box-shadow:
|
|
245
|
+
inset 0 1px 0 color-mix(in srgb, white 18%, transparent),
|
|
246
|
+
inset 0 -1px 0 color-mix(in srgb, black 18%, transparent);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
@keyframes state-track-flow {
|
|
250
|
+
0%,
|
|
251
|
+
100% {
|
|
252
|
+
background-position: 100% 0;
|
|
253
|
+
}
|
|
254
|
+
50% {
|
|
255
|
+
background-position: 0% 0;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@media (prefers-reduced-motion: reduce) {
|
|
260
|
+
.state-track__seg--active.state-track__seg--loading {
|
|
261
|
+
animation: none;
|
|
262
|
+
background: var(--aeon-accent);
|
|
263
|
+
}
|
|
264
|
+
}
|