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,20 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
import type * as Panda from '@pandacss/dev'
|
|
4
|
+
import type { RecipeVariantRecord, RecipeConfig, SlotRecipeVariantRecord, SlotRecipeConfig } from './recipe';
|
|
5
|
+
import type { Parts } from './parts';
|
|
6
|
+
import type { PatternConfig, PatternProperties } from './pattern';
|
|
7
|
+
import type { GlobalStyleObject, SystemStyleObject } from './system-types';
|
|
8
|
+
import type { CompositionStyles } from './composition';
|
|
9
|
+
|
|
10
|
+
declare module '@pandacss/dev' {
|
|
11
|
+
export function defineRecipe<V extends RecipeVariantRecord>(config: RecipeConfig<V>): Panda.RecipeConfig
|
|
12
|
+
export function defineSlotRecipe<S extends string, V extends SlotRecipeVariantRecord<S>>(config: SlotRecipeConfig<S, V>): Panda.SlotRecipeConfig
|
|
13
|
+
export function defineStyles(definition: SystemStyleObject): SystemStyleObject
|
|
14
|
+
export function defineGlobalStyles(definition: GlobalStyleObject): Panda.GlobalStyleObject
|
|
15
|
+
export function defineTextStyles(definition: CompositionStyles['textStyles']): Panda.TextStyles
|
|
16
|
+
export function defineAnimationStyles(definition: CompositionStyles['animationStyles']): Panda.AnimationStyles
|
|
17
|
+
export function defineLayerStyles(definition: CompositionStyles['layerStyles']): Panda.LayerStyles
|
|
18
|
+
export function definePattern<T extends PatternProperties>(config: PatternConfig<T>): Panda.PatternConfig
|
|
19
|
+
export function defineParts<T extends Parts>(parts: T): (config: Partial<Record<keyof T, SystemStyleObject>>) => Partial<Record<keyof T, SystemStyleObject>>
|
|
20
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ComponentPropsWithoutRef, ElementType, ElementRef, JSX, Ref } from 'react'
|
|
3
|
+
import type { RecipeDefinition, RecipeSelection, RecipeVariantRecord } from './recipe';
|
|
4
|
+
import type { Assign, DistributiveOmit, DistributiveUnion, JsxHTMLProps, JsxStyleProps, Pretty } from './system-types';
|
|
5
|
+
|
|
6
|
+
interface Dict {
|
|
7
|
+
[k: string]: unknown
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type ComponentProps<T extends ElementType> = DistributiveOmit<ComponentPropsWithoutRef<T>, 'ref'> & {
|
|
11
|
+
ref?: Ref<ElementRef<T>>
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface StyledComponent<T extends ElementType, P extends Dict = {}> {
|
|
15
|
+
(props: JsxHTMLProps<ComponentProps<T>, Assign<JsxStyleProps, P>>): JSX.Element
|
|
16
|
+
displayName?: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface RecipeFn {
|
|
20
|
+
__type: any
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface JsxFactoryOptions<TProps extends Dict> {
|
|
24
|
+
dataAttr?: boolean
|
|
25
|
+
defaultProps?: TProps
|
|
26
|
+
shouldForwardProp?(prop: string, variantKeys: string[]): boolean
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type JsxRecipeProps<T extends ElementType, P extends Dict> = JsxHTMLProps<ComponentProps<T>, P>;
|
|
30
|
+
|
|
31
|
+
export type JsxElement<T extends ElementType, P extends Dict> = T extends StyledComponent<infer A, infer B>
|
|
32
|
+
? StyledComponent<A, Pretty<DistributiveUnion<P, B>>>
|
|
33
|
+
: StyledComponent<T, P>
|
|
34
|
+
|
|
35
|
+
export interface JsxFactory {
|
|
36
|
+
<T extends ElementType>(component: T): StyledComponent<T, {}>
|
|
37
|
+
<T extends ElementType, P extends RecipeVariantRecord>(component: T, recipe: RecipeDefinition<P>, options?: JsxFactoryOptions<JsxRecipeProps<T, RecipeSelection<P>>>): JsxElement<
|
|
38
|
+
T,
|
|
39
|
+
RecipeSelection<P>
|
|
40
|
+
>
|
|
41
|
+
<T extends ElementType, P extends RecipeFn>(component: T, recipeFn: P, options?: JsxFactoryOptions<JsxRecipeProps<T, P['__type']>>): JsxElement<T, P['__type']>
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type JsxElements = {
|
|
45
|
+
[K in keyof JSX.IntrinsicElements]: StyledComponent<K, {}>
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type Styled = JsxFactory & JsxElements
|
|
49
|
+
|
|
50
|
+
export type HTMLStyledProps<T extends ElementType> = JsxHTMLProps<ComponentProps<T>, JsxStyleProps>
|
|
51
|
+
|
|
52
|
+
export type StyledVariantProps<T extends StyledComponent<any, any>> = T extends StyledComponent<any, infer Props> ? Props : never
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { CssProperty, SystemStyleObject } from './system-types';
|
|
3
|
+
import type { TokenCategory } from '../tokens/index';
|
|
4
|
+
|
|
5
|
+
type Primitive = string | number | boolean | null | undefined
|
|
6
|
+
type LiteralUnion<T, K extends Primitive = string> = T | (K & Record<never, never>)
|
|
7
|
+
|
|
8
|
+
export type PatternProperty =
|
|
9
|
+
| { type: 'property'; value: CssProperty }
|
|
10
|
+
| { type: 'enum'; value: string[] }
|
|
11
|
+
| { type: 'token'; value: TokenCategory; property?: CssProperty }
|
|
12
|
+
| { type: 'string' | 'boolean' | 'number' }
|
|
13
|
+
|
|
14
|
+
export interface PatternHelpers {
|
|
15
|
+
map: (value: any, fn: (value: string) => string | undefined) => any
|
|
16
|
+
isCssUnit: (value: any) => boolean
|
|
17
|
+
isCssVar: (value: any) => boolean
|
|
18
|
+
isCssFunction: (value: any) => boolean
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface PatternProperties {
|
|
22
|
+
[key: string]: PatternProperty
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
type InferProps<T> = Record<LiteralUnion<keyof T>, any>
|
|
26
|
+
|
|
27
|
+
export type PatternDefaultValue<T> = Partial<InferProps<T>>
|
|
28
|
+
|
|
29
|
+
export type PatternDefaultValueFn<T> = (props: InferProps<T>) => PatternDefaultValue<T>
|
|
30
|
+
|
|
31
|
+
export interface PatternConfig<T extends PatternProperties = PatternProperties> {
|
|
32
|
+
/**
|
|
33
|
+
* The description of the pattern. This will be used in the JSDoc comment.
|
|
34
|
+
*/
|
|
35
|
+
description?: string
|
|
36
|
+
/**
|
|
37
|
+
* The JSX element rendered by the pattern
|
|
38
|
+
* @default 'div'
|
|
39
|
+
*/
|
|
40
|
+
jsxElement?: string
|
|
41
|
+
/**
|
|
42
|
+
* The properties of the pattern.
|
|
43
|
+
*/
|
|
44
|
+
properties?: T
|
|
45
|
+
/**
|
|
46
|
+
* The default values of the pattern.
|
|
47
|
+
*/
|
|
48
|
+
defaultValues?: PatternDefaultValue<T> | PatternDefaultValueFn<T>
|
|
49
|
+
/**
|
|
50
|
+
* The css object this pattern will generate.
|
|
51
|
+
*/
|
|
52
|
+
transform?: (props: InferProps<T>, helpers: PatternHelpers) => SystemStyleObject
|
|
53
|
+
/**
|
|
54
|
+
* Whether the pattern is deprecated.
|
|
55
|
+
*/
|
|
56
|
+
deprecated?: boolean | string
|
|
57
|
+
/**
|
|
58
|
+
* The jsx element name this pattern will generate.
|
|
59
|
+
*/
|
|
60
|
+
jsxName?: string
|
|
61
|
+
/**
|
|
62
|
+
* The jsx elements to track for this pattern. Can be string or Regexp.
|
|
63
|
+
*
|
|
64
|
+
* @default capitalize(pattern.name)
|
|
65
|
+
* @example ['Button', 'Link', /Button$/]
|
|
66
|
+
*/
|
|
67
|
+
jsx?: Array<string | RegExp>
|
|
68
|
+
/**
|
|
69
|
+
* Whether to only generate types for the specified properties.
|
|
70
|
+
* This will disallow css properties
|
|
71
|
+
*/
|
|
72
|
+
strict?: boolean
|
|
73
|
+
/**
|
|
74
|
+
* @experimental
|
|
75
|
+
* Disallow certain css properties for this pattern
|
|
76
|
+
*/
|
|
77
|
+
blocklist?: LiteralUnion<CssProperty>[]
|
|
78
|
+
}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from './conditions';
|
|
3
|
+
import type { CssProperties } from './system-types';
|
|
4
|
+
import type { Tokens } from '../tokens/index';
|
|
5
|
+
|
|
6
|
+
export interface UtilityValues {
|
|
7
|
+
aspectRatio: Tokens["aspectRatios"];
|
|
8
|
+
top: Tokens["spacing"];
|
|
9
|
+
left: Tokens["spacing"];
|
|
10
|
+
inset: "auto" | Tokens["spacing"];
|
|
11
|
+
insetInline: Tokens["spacing"];
|
|
12
|
+
insetBlock: Tokens["spacing"];
|
|
13
|
+
insetBlockEnd: Tokens["spacing"];
|
|
14
|
+
insetBlockStart: Tokens["spacing"];
|
|
15
|
+
insetInlineEnd: Tokens["spacing"];
|
|
16
|
+
insetInlineStart: Tokens["spacing"];
|
|
17
|
+
right: Tokens["spacing"];
|
|
18
|
+
bottom: Tokens["spacing"];
|
|
19
|
+
float: "start" | "end" | CssProperties["float"];
|
|
20
|
+
hideFrom: Tokens["breakpoints"];
|
|
21
|
+
hideBelow: Tokens["breakpoints"];
|
|
22
|
+
flexBasis: Tokens["sizes"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "full";
|
|
23
|
+
flex: "1" | "auto" | "initial" | "none";
|
|
24
|
+
gridAutoColumns: "min" | "max" | "fr";
|
|
25
|
+
gridAutoRows: "min" | "max" | "fr";
|
|
26
|
+
gap: Tokens["spacing"];
|
|
27
|
+
gridGap: Tokens["spacing"];
|
|
28
|
+
gridRowGap: Tokens["spacing"];
|
|
29
|
+
gridColumnGap: Tokens["spacing"];
|
|
30
|
+
rowGap: Tokens["spacing"];
|
|
31
|
+
columnGap: Tokens["spacing"];
|
|
32
|
+
padding: Tokens["spacing"];
|
|
33
|
+
paddingLeft: Tokens["spacing"];
|
|
34
|
+
paddingRight: Tokens["spacing"];
|
|
35
|
+
paddingTop: Tokens["spacing"];
|
|
36
|
+
paddingBottom: Tokens["spacing"];
|
|
37
|
+
paddingBlock: Tokens["spacing"];
|
|
38
|
+
paddingBlockEnd: Tokens["spacing"];
|
|
39
|
+
paddingBlockStart: Tokens["spacing"];
|
|
40
|
+
paddingInline: Tokens["spacing"];
|
|
41
|
+
paddingInlineEnd: Tokens["spacing"];
|
|
42
|
+
paddingInlineStart: Tokens["spacing"];
|
|
43
|
+
marginLeft: "auto" | Tokens["spacing"];
|
|
44
|
+
marginRight: "auto" | Tokens["spacing"];
|
|
45
|
+
marginTop: "auto" | Tokens["spacing"];
|
|
46
|
+
marginBottom: "auto" | Tokens["spacing"];
|
|
47
|
+
margin: "auto" | Tokens["spacing"];
|
|
48
|
+
marginBlock: "auto" | Tokens["spacing"];
|
|
49
|
+
marginBlockEnd: "auto" | Tokens["spacing"];
|
|
50
|
+
marginBlockStart: "auto" | Tokens["spacing"];
|
|
51
|
+
marginInline: "auto" | Tokens["spacing"];
|
|
52
|
+
marginInlineEnd: "auto" | Tokens["spacing"];
|
|
53
|
+
marginInlineStart: "auto" | Tokens["spacing"];
|
|
54
|
+
spaceX: "auto" | Tokens["spacing"] | CssProperties["marginInlineStart"];
|
|
55
|
+
spaceY: "auto" | Tokens["spacing"] | CssProperties["marginBlockStart"];
|
|
56
|
+
outlineColor: Tokens["colors"];
|
|
57
|
+
outline: Tokens["borders"];
|
|
58
|
+
outlineOffset: Tokens["spacing"];
|
|
59
|
+
divideColor: Tokens["colors"];
|
|
60
|
+
divideStyle: CssProperties["borderStyle"];
|
|
61
|
+
width: "auto" | Tokens["sizes"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "screen";
|
|
62
|
+
inlineSize: "auto" | Tokens["sizes"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "screen";
|
|
63
|
+
minWidth: "auto" | Tokens["sizes"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "screen";
|
|
64
|
+
minInlineSize: "auto" | Tokens["sizes"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "screen";
|
|
65
|
+
maxWidth: "auto" | Tokens["sizes"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "screen";
|
|
66
|
+
maxInlineSize: "auto" | Tokens["sizes"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "screen";
|
|
67
|
+
height: "auto" | Tokens["sizes"] | "svh" | "lvh" | "dvh" | "screen" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6";
|
|
68
|
+
blockSize: "auto" | Tokens["sizes"] | "svh" | "lvh" | "dvh" | "screen" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6";
|
|
69
|
+
minHeight: "auto" | Tokens["sizes"] | "svh" | "lvh" | "dvh" | "screen" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6";
|
|
70
|
+
minBlockSize: "auto" | Tokens["sizes"] | "svh" | "lvh" | "dvh" | "screen" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6";
|
|
71
|
+
maxHeight: "auto" | Tokens["sizes"] | "svh" | "lvh" | "dvh" | "screen" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6";
|
|
72
|
+
maxBlockSize: "auto" | Tokens["sizes"] | "svh" | "lvh" | "dvh" | "screen" | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6";
|
|
73
|
+
color: Tokens["colors"];
|
|
74
|
+
fontFamily: Tokens["fonts"];
|
|
75
|
+
fontSize: Tokens["fontSizes"];
|
|
76
|
+
fontWeight: Tokens["fontWeights"];
|
|
77
|
+
fontSmoothing: "antialiased" | "subpixel-antialiased";
|
|
78
|
+
letterSpacing: Tokens["letterSpacings"];
|
|
79
|
+
lineHeight: Tokens["lineHeights"];
|
|
80
|
+
textDecorationColor: Tokens["colors"];
|
|
81
|
+
textEmphasisColor: Tokens["colors"];
|
|
82
|
+
textIndent: Tokens["spacing"];
|
|
83
|
+
textShadow: Tokens["shadows"];
|
|
84
|
+
textShadowColor: Tokens["colors"];
|
|
85
|
+
textWrap: "wrap" | "balance" | "nowrap";
|
|
86
|
+
truncate: boolean;
|
|
87
|
+
background: Tokens["colors"];
|
|
88
|
+
backgroundColor: Tokens["colors"];
|
|
89
|
+
backgroundGradient: "to-t" | "to-tr" | "to-r" | "to-br" | "to-b" | "to-bl" | "to-l" | "to-tl";
|
|
90
|
+
textGradient: "to-t" | "to-tr" | "to-r" | "to-br" | "to-b" | "to-bl" | "to-l" | "to-tl";
|
|
91
|
+
gradientFrom: Tokens["colors"];
|
|
92
|
+
gradientTo: Tokens["colors"];
|
|
93
|
+
gradientVia: Tokens["colors"];
|
|
94
|
+
borderRadius: Tokens["radii"];
|
|
95
|
+
borderTopLeftRadius: Tokens["radii"];
|
|
96
|
+
borderTopRightRadius: Tokens["radii"];
|
|
97
|
+
borderBottomRightRadius: Tokens["radii"];
|
|
98
|
+
borderBottomLeftRadius: Tokens["radii"];
|
|
99
|
+
borderTopRadius: Tokens["radii"] | CssProperties["borderRadius"];
|
|
100
|
+
borderRightRadius: Tokens["radii"] | CssProperties["borderRadius"];
|
|
101
|
+
borderBottomRadius: Tokens["radii"] | CssProperties["borderRadius"];
|
|
102
|
+
borderLeftRadius: Tokens["radii"] | CssProperties["borderRadius"];
|
|
103
|
+
borderStartStartRadius: Tokens["radii"];
|
|
104
|
+
borderStartEndRadius: Tokens["radii"];
|
|
105
|
+
borderStartRadius: Tokens["radii"] | CssProperties["borderRadius"];
|
|
106
|
+
borderEndStartRadius: Tokens["radii"];
|
|
107
|
+
borderEndEndRadius: Tokens["radii"];
|
|
108
|
+
borderEndRadius: Tokens["radii"] | CssProperties["borderRadius"];
|
|
109
|
+
border: Tokens["borders"];
|
|
110
|
+
borderColor: Tokens["colors"];
|
|
111
|
+
borderInline: Tokens["borders"];
|
|
112
|
+
borderInlineColor: Tokens["colors"];
|
|
113
|
+
borderBlock: Tokens["borders"];
|
|
114
|
+
borderBlockColor: Tokens["colors"];
|
|
115
|
+
borderLeft: Tokens["borders"];
|
|
116
|
+
borderLeftColor: Tokens["colors"];
|
|
117
|
+
borderInlineStart: Tokens["borders"];
|
|
118
|
+
borderInlineStartColor: Tokens["colors"];
|
|
119
|
+
borderRight: Tokens["borders"];
|
|
120
|
+
borderRightColor: Tokens["colors"];
|
|
121
|
+
borderInlineEnd: Tokens["borders"];
|
|
122
|
+
borderInlineEndColor: Tokens["colors"];
|
|
123
|
+
borderTop: Tokens["borders"];
|
|
124
|
+
borderTopColor: Tokens["colors"];
|
|
125
|
+
borderBottom: Tokens["borders"];
|
|
126
|
+
borderBottomColor: Tokens["colors"];
|
|
127
|
+
borderBlockEnd: Tokens["borders"];
|
|
128
|
+
borderBlockEndColor: Tokens["colors"];
|
|
129
|
+
borderBlockStart: Tokens["borders"];
|
|
130
|
+
borderBlockStartColor: Tokens["colors"];
|
|
131
|
+
boxShadow: Tokens["shadows"];
|
|
132
|
+
boxShadowColor: Tokens["colors"];
|
|
133
|
+
filter: "auto";
|
|
134
|
+
blur: Tokens["blurs"];
|
|
135
|
+
backdropFilter: "auto";
|
|
136
|
+
backdropBlur: Tokens["blurs"];
|
|
137
|
+
borderSpacing: Tokens["spacing"] | "auto";
|
|
138
|
+
borderSpacingX: Tokens["spacing"];
|
|
139
|
+
borderSpacingY: Tokens["spacing"];
|
|
140
|
+
transitionTimingFunction: Tokens["easings"];
|
|
141
|
+
transitionDelay: Tokens["durations"];
|
|
142
|
+
transitionDuration: Tokens["durations"];
|
|
143
|
+
transition: "all" | "common" | "background" | "colors" | "opacity" | "shadow" | "transform";
|
|
144
|
+
animation: Tokens["animations"];
|
|
145
|
+
animationName: "spin" | "ping" | "pulse" | "bounce";
|
|
146
|
+
animationTimingFunction: Tokens["easings"];
|
|
147
|
+
animationDuration: Tokens["durations"];
|
|
148
|
+
animationDelay: Tokens["durations"];
|
|
149
|
+
rotate: "auto" | "auto-3d" | CssProperties["rotate"];
|
|
150
|
+
rotateX: CssProperties["rotate"];
|
|
151
|
+
rotateY: CssProperties["rotate"];
|
|
152
|
+
rotateZ: CssProperties["rotate"];
|
|
153
|
+
scale: "auto" | CssProperties["scale"];
|
|
154
|
+
translate: "auto" | "auto-3d" | CssProperties["translate"];
|
|
155
|
+
translateX: Tokens["spacing"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "full" | "-1/2" | "-1/3" | "-2/3" | "-1/4" | "-2/4" | "-3/4" | "-full";
|
|
156
|
+
translateY: Tokens["spacing"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "full" | "-1/2" | "-1/3" | "-2/3" | "-1/4" | "-2/4" | "-3/4" | "-full";
|
|
157
|
+
translateZ: Tokens["spacing"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "full" | "-1/2" | "-1/3" | "-2/3" | "-1/4" | "-2/4" | "-3/4" | "-full";
|
|
158
|
+
accentColor: Tokens["colors"];
|
|
159
|
+
caretColor: Tokens["colors"];
|
|
160
|
+
scrollbar: "visible" | "hidden";
|
|
161
|
+
scrollbarColor: Tokens["colors"];
|
|
162
|
+
scrollbarWidth: Tokens["sizes"];
|
|
163
|
+
scrollMargin: Tokens["spacing"];
|
|
164
|
+
scrollMarginLeft: Tokens["spacing"];
|
|
165
|
+
scrollMarginRight: Tokens["spacing"];
|
|
166
|
+
scrollMarginTop: Tokens["spacing"];
|
|
167
|
+
scrollMarginBottom: Tokens["spacing"];
|
|
168
|
+
scrollMarginBlock: Tokens["spacing"];
|
|
169
|
+
scrollMarginBlockEnd: Tokens["spacing"];
|
|
170
|
+
scrollMarginBlockStart: Tokens["spacing"];
|
|
171
|
+
scrollMarginInline: Tokens["spacing"];
|
|
172
|
+
scrollMarginInlineEnd: Tokens["spacing"];
|
|
173
|
+
scrollMarginInlineStart: Tokens["spacing"];
|
|
174
|
+
scrollPadding: Tokens["spacing"];
|
|
175
|
+
scrollPaddingBlock: Tokens["spacing"];
|
|
176
|
+
scrollPaddingBlockStart: Tokens["spacing"];
|
|
177
|
+
scrollPaddingBlockEnd: Tokens["spacing"];
|
|
178
|
+
scrollPaddingInline: Tokens["spacing"];
|
|
179
|
+
scrollPaddingInlineEnd: Tokens["spacing"];
|
|
180
|
+
scrollPaddingInlineStart: Tokens["spacing"];
|
|
181
|
+
scrollPaddingLeft: Tokens["spacing"];
|
|
182
|
+
scrollPaddingRight: Tokens["spacing"];
|
|
183
|
+
scrollPaddingTop: Tokens["spacing"];
|
|
184
|
+
scrollPaddingBottom: Tokens["spacing"];
|
|
185
|
+
scrollSnapType: "none" | "x" | "y" | "both";
|
|
186
|
+
scrollSnapStrictness: "mandatory" | "proximity";
|
|
187
|
+
scrollSnapMargin: Tokens["spacing"];
|
|
188
|
+
scrollSnapMarginTop: Tokens["spacing"];
|
|
189
|
+
scrollSnapMarginBottom: Tokens["spacing"];
|
|
190
|
+
scrollSnapMarginLeft: Tokens["spacing"];
|
|
191
|
+
scrollSnapMarginRight: Tokens["spacing"];
|
|
192
|
+
fill: Tokens["colors"];
|
|
193
|
+
stroke: Tokens["colors"];
|
|
194
|
+
srOnly: boolean;
|
|
195
|
+
debug: boolean;
|
|
196
|
+
containerName: CssProperties["containerName"];
|
|
197
|
+
colorPalette: "current" | "black" | "white" | "transparent" | "rose" | "pink" | "fuchsia" | "purple" | "violet" | "indigo" | "blue" | "sky" | "cyan" | "teal" | "emerald" | "green" | "lime" | "yellow" | "amber" | "orange" | "red" | "neutral" | "stone" | "zinc" | "gray" | "slate" | "bg" | "surface" | "surfaceRaised" | "border" | "fg" | "muted" | "accent" | "accentDim" | "danger" | "dangerDim";
|
|
198
|
+
textStyle: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl";
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
type WithColorOpacityModifier<T> = [T] extends [string] ? `${T}/${string}` & { __colorOpacityModifier?: true } : never
|
|
204
|
+
|
|
205
|
+
type ImportantMark = "!" | "!important"
|
|
206
|
+
type WhitespaceImportant = ` ${ImportantMark}`
|
|
207
|
+
type Important = ImportantMark | WhitespaceImportant
|
|
208
|
+
type WithImportant<T> = [T] extends [string] ? `${T}${Important}` & { __important?: true } : never
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Only relevant when using `strictTokens` or `strictPropertyValues` in your config.
|
|
212
|
+
* - Allows you to use an escape hatch (e.g. `[123px]`) to use any string as a value.
|
|
213
|
+
* - Allows you to use a color opacity modifier (e.g. `red/300`) with known color values.
|
|
214
|
+
* - Allows you to use an important mark (e.g. `!` or `!important`) in the value.
|
|
215
|
+
*
|
|
216
|
+
* This is useful when you want to use a value that is not defined in the config or want to opt-out of the defaults.
|
|
217
|
+
*
|
|
218
|
+
* @example
|
|
219
|
+
* css({
|
|
220
|
+
* fontSize: '[123px]', // ⚠️ will not throw even if you haven't defined 123px as a token
|
|
221
|
+
* })
|
|
222
|
+
*
|
|
223
|
+
* @see https://panda-css.com/docs/concepts/writing-styles#stricttokens
|
|
224
|
+
* @see https://panda-css.com/docs/concepts/writing-styles#strictpropertyvalues
|
|
225
|
+
*/
|
|
226
|
+
export type WithEscapeHatch<T> = T | `[${string}]` | WithColorOpacityModifier<T> | WithImportant<T>
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* Will restrict the value of properties that have predefined values to those values only.
|
|
230
|
+
*
|
|
231
|
+
* @example
|
|
232
|
+
* css({
|
|
233
|
+
* display: 'abc', // ❌ will throw
|
|
234
|
+
* })
|
|
235
|
+
*
|
|
236
|
+
* @see https://panda-css.com/docs/concepts/writing-styles#strictpropertyvalues
|
|
237
|
+
*/
|
|
238
|
+
export type OnlyKnown<Key, Value> = Value extends boolean
|
|
239
|
+
? Value
|
|
240
|
+
: Value extends `${infer _}` ? Value : never
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { RecipeRule } from './static-css';
|
|
3
|
+
import type { SystemStyleObject, DistributiveOmit, Pretty } from './system-types';
|
|
4
|
+
|
|
5
|
+
type StringToBoolean<T> = T extends 'true' | 'false' ? boolean : T
|
|
6
|
+
|
|
7
|
+
export type RecipeVariantRecord = Record<any, Record<any, SystemStyleObject>>
|
|
8
|
+
|
|
9
|
+
export type RecipeSelection<T extends RecipeVariantRecord> = keyof any extends keyof T
|
|
10
|
+
? {}
|
|
11
|
+
: {
|
|
12
|
+
[K in keyof T]?: StringToBoolean<keyof T[K]> | undefined
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type RecipeVariantFn<T extends RecipeVariantRecord> = (props?: RecipeSelection<T>) => string
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Extract the variant as optional props from a `cva` function.
|
|
19
|
+
* Intended to be used with a JSX component, prefer `RecipeVariant` for a more strict type.
|
|
20
|
+
*/
|
|
21
|
+
export type RecipeVariantProps<
|
|
22
|
+
T extends RecipeVariantFn<RecipeVariantRecord> | SlotRecipeVariantFn<string, SlotRecipeVariantRecord<string>>,
|
|
23
|
+
> = Pretty<Parameters<T>[0]>
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Extract the variants from a `cva` function.
|
|
27
|
+
*/
|
|
28
|
+
export type RecipeVariant<
|
|
29
|
+
T extends RecipeVariantFn<RecipeVariantRecord> | SlotRecipeVariantFn<string, SlotRecipeVariantRecord<string>>,
|
|
30
|
+
> = Exclude<Pretty<Required<RecipeVariantProps<T>>>, undefined>
|
|
31
|
+
|
|
32
|
+
type RecipeVariantMap<T extends RecipeVariantRecord> = {
|
|
33
|
+
[K in keyof T]: Array<keyof T[K]>
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* -----------------------------------------------------------------------------
|
|
37
|
+
* Recipe / Standard
|
|
38
|
+
* -----------------------------------------------------------------------------*/
|
|
39
|
+
|
|
40
|
+
export interface RecipeRuntimeFn<T extends RecipeVariantRecord> extends RecipeVariantFn<T> {
|
|
41
|
+
__type: RecipeSelection<T>
|
|
42
|
+
variantKeys: (keyof T)[]
|
|
43
|
+
variantMap: RecipeVariantMap<T>
|
|
44
|
+
raw: (props?: RecipeSelection<T>) => SystemStyleObject
|
|
45
|
+
config: RecipeConfig<T>
|
|
46
|
+
splitVariantProps<Props extends RecipeSelection<T>>(
|
|
47
|
+
props: Props,
|
|
48
|
+
): [RecipeSelection<T>, Pretty<DistributiveOmit<Props, keyof T>>]
|
|
49
|
+
getVariantProps: (props?: RecipeSelection<T>) => RecipeSelection<T>
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
type OneOrMore<T> = T | Array<T>
|
|
53
|
+
|
|
54
|
+
export type RecipeCompoundSelection<T> = {
|
|
55
|
+
[K in keyof T]?: OneOrMore<StringToBoolean<keyof T[K]>> | undefined
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export type RecipeCompoundVariant<T> = T & {
|
|
59
|
+
css: SystemStyleObject
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface RecipeDefinition<T extends RecipeVariantRecord = RecipeVariantRecord> {
|
|
63
|
+
/**
|
|
64
|
+
* The base styles of the recipe.
|
|
65
|
+
*/
|
|
66
|
+
base?: SystemStyleObject
|
|
67
|
+
/**
|
|
68
|
+
* Whether the recipe is deprecated.
|
|
69
|
+
*/
|
|
70
|
+
deprecated?: boolean | string
|
|
71
|
+
/**
|
|
72
|
+
* The multi-variant styles of the recipe.
|
|
73
|
+
*/
|
|
74
|
+
variants?: T
|
|
75
|
+
/**
|
|
76
|
+
* The default variants of the recipe.
|
|
77
|
+
*/
|
|
78
|
+
defaultVariants?: RecipeSelection<T>
|
|
79
|
+
/**
|
|
80
|
+
* The styles to apply when a combination of variants is selected.
|
|
81
|
+
*/
|
|
82
|
+
compoundVariants?: Pretty<RecipeCompoundVariant<RecipeCompoundSelection<T>>>[]
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export type RecipeCreatorFn = <T extends RecipeVariantRecord>(config: RecipeDefinition<T>) => RecipeRuntimeFn<T>
|
|
86
|
+
|
|
87
|
+
interface RecipeConfigMeta {
|
|
88
|
+
/**
|
|
89
|
+
* The class name of the recipe.
|
|
90
|
+
*/
|
|
91
|
+
className: string
|
|
92
|
+
/**
|
|
93
|
+
* The description of the recipe. This will be used in the JSDoc comment.
|
|
94
|
+
*/
|
|
95
|
+
description?: string
|
|
96
|
+
/**
|
|
97
|
+
* The jsx elements to track for this recipe. Can be string or Regexp.
|
|
98
|
+
*
|
|
99
|
+
* @default capitalize(recipe.name)
|
|
100
|
+
* @example ['Button', 'Link', /Button$/]
|
|
101
|
+
*/
|
|
102
|
+
jsx?: Array<string | RegExp>
|
|
103
|
+
/**
|
|
104
|
+
* Variants to pre-generate, will be include in the final `config.staticCss`
|
|
105
|
+
*/
|
|
106
|
+
staticCss?: RecipeRule[]
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export interface RecipeConfig<T extends RecipeVariantRecord = RecipeVariantRecord>
|
|
110
|
+
extends RecipeDefinition<T>,
|
|
111
|
+
RecipeConfigMeta {}
|
|
112
|
+
|
|
113
|
+
/* -----------------------------------------------------------------------------
|
|
114
|
+
* Recipe / Slot
|
|
115
|
+
* -----------------------------------------------------------------------------*/
|
|
116
|
+
|
|
117
|
+
type SlotRecord<S extends string, T> = Partial<Record<S, T>>
|
|
118
|
+
|
|
119
|
+
export type SlotRecipeVariantRecord<S extends string> = Record<any, Record<any, SlotRecord<S, SystemStyleObject>>>
|
|
120
|
+
|
|
121
|
+
export type SlotRecipeVariantFn<S extends string, T extends RecipeVariantRecord> = (
|
|
122
|
+
props?: RecipeSelection<T>,
|
|
123
|
+
) => SlotRecord<S, string>
|
|
124
|
+
|
|
125
|
+
export interface SlotRecipeRuntimeFn<S extends string, T extends SlotRecipeVariantRecord<S>>
|
|
126
|
+
extends SlotRecipeVariantFn<S, T> {
|
|
127
|
+
raw: (props?: RecipeSelection<T>) => Record<S, SystemStyleObject>
|
|
128
|
+
variantKeys: (keyof T)[]
|
|
129
|
+
variantMap: RecipeVariantMap<T>
|
|
130
|
+
splitVariantProps<Props extends RecipeSelection<T>>(
|
|
131
|
+
props: Props,
|
|
132
|
+
): [RecipeSelection<T>, Pretty<DistributiveOmit<Props, keyof T>>]
|
|
133
|
+
getVariantProps: (props?: RecipeSelection<T>) => RecipeSelection<T>
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export type SlotRecipeCompoundVariant<S extends string, T> = T & {
|
|
137
|
+
css: SlotRecord<S, SystemStyleObject>
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface SlotRecipeDefinition<
|
|
141
|
+
S extends string = string,
|
|
142
|
+
T extends SlotRecipeVariantRecord<S> = SlotRecipeVariantRecord<S>,
|
|
143
|
+
> {
|
|
144
|
+
/**
|
|
145
|
+
* An optional class name that can be used to target slots in the DOM.
|
|
146
|
+
*/
|
|
147
|
+
className?: string
|
|
148
|
+
/**
|
|
149
|
+
* Whether the recipe is deprecated.
|
|
150
|
+
*/
|
|
151
|
+
deprecated?: boolean | string
|
|
152
|
+
/**
|
|
153
|
+
* The parts/slots of the recipe.
|
|
154
|
+
*/
|
|
155
|
+
slots: S[] | Readonly<S[]>
|
|
156
|
+
/**
|
|
157
|
+
* The base styles of the recipe.
|
|
158
|
+
*/
|
|
159
|
+
base?: SlotRecord<S, SystemStyleObject>
|
|
160
|
+
/**
|
|
161
|
+
* The multi-variant styles of the recipe.
|
|
162
|
+
*/
|
|
163
|
+
variants?: T
|
|
164
|
+
/**
|
|
165
|
+
* The default variants of the recipe.
|
|
166
|
+
*/
|
|
167
|
+
defaultVariants?: RecipeSelection<T>
|
|
168
|
+
/**
|
|
169
|
+
* The styles to apply when a combination of variants is selected.
|
|
170
|
+
*/
|
|
171
|
+
compoundVariants?: Pretty<SlotRecipeCompoundVariant<S, RecipeCompoundSelection<T>>>[]
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export type SlotRecipeCreatorFn = <S extends string, T extends SlotRecipeVariantRecord<S>>(
|
|
175
|
+
config: SlotRecipeDefinition<S, T>,
|
|
176
|
+
) => SlotRecipeRuntimeFn<S, T>
|
|
177
|
+
|
|
178
|
+
export type SlotRecipeConfig<
|
|
179
|
+
S extends string = string,
|
|
180
|
+
T extends SlotRecipeVariantRecord<S> = SlotRecipeVariantRecord<S>,
|
|
181
|
+
> = SlotRecipeDefinition<S, T> & RecipeConfigMeta
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { Pseudos } from './csstype';
|
|
3
|
+
|
|
4
|
+
type AriaAttributes =
|
|
5
|
+
| '[aria-disabled]'
|
|
6
|
+
| '[aria-hidden]'
|
|
7
|
+
| '[aria-invalid]'
|
|
8
|
+
| '[aria-readonly]'
|
|
9
|
+
| '[aria-required]'
|
|
10
|
+
| '[aria-selected]'
|
|
11
|
+
| '[aria-checked]'
|
|
12
|
+
| '[aria-expanded]'
|
|
13
|
+
| '[aria-pressed]'
|
|
14
|
+
| `[aria-current=${'page' | 'step' | 'location' | 'date' | 'time'}]`
|
|
15
|
+
| '[aria-invalid]'
|
|
16
|
+
| `[aria-sort=${'ascending' | 'descending'}]`
|
|
17
|
+
|
|
18
|
+
type DataAttributes =
|
|
19
|
+
| '[data-selected]'
|
|
20
|
+
| '[data-highlighted]'
|
|
21
|
+
| '[data-hover]'
|
|
22
|
+
| '[data-active]'
|
|
23
|
+
| '[data-checked]'
|
|
24
|
+
| '[data-disabled]'
|
|
25
|
+
| '[data-readonly]'
|
|
26
|
+
| '[data-focus]'
|
|
27
|
+
| '[data-focus-visible]'
|
|
28
|
+
| '[data-focus-visible-added]'
|
|
29
|
+
| '[data-invalid]'
|
|
30
|
+
| '[data-pressed]'
|
|
31
|
+
| '[data-expanded]'
|
|
32
|
+
| '[data-grabbed]'
|
|
33
|
+
| '[data-dragged]'
|
|
34
|
+
| '[data-orientation=horizontal]'
|
|
35
|
+
| '[data-orientation=vertical]'
|
|
36
|
+
| '[data-in-range]'
|
|
37
|
+
| '[data-out-of-range]'
|
|
38
|
+
| '[data-placeholder-shown]'
|
|
39
|
+
| `[data-part=${string}]`
|
|
40
|
+
| `[data-attr=${string}]`
|
|
41
|
+
| `[data-placement=${string}]`
|
|
42
|
+
| `[data-theme=${string}]`
|
|
43
|
+
| `[data-size=${string}]`
|
|
44
|
+
| `[data-state=${string}]`
|
|
45
|
+
| '[data-empty]'
|
|
46
|
+
| '[data-loading]'
|
|
47
|
+
| '[data-loaded]'
|
|
48
|
+
| '[data-enter]'
|
|
49
|
+
| '[data-entering]'
|
|
50
|
+
| '[data-exited]'
|
|
51
|
+
| '[data-exiting]'
|
|
52
|
+
|
|
53
|
+
type AttributeSelector = `&${Pseudos | DataAttributes | AriaAttributes}`
|
|
54
|
+
type ParentSelector = `${DataAttributes | AriaAttributes} &`
|
|
55
|
+
|
|
56
|
+
type AtRuleType = 'media' | 'layer' | 'container' | 'supports' | 'page' | 'scope' | 'starting-style'
|
|
57
|
+
|
|
58
|
+
export type AnySelector = `${string}&` | `&${string}` | `@${AtRuleType}${string}`
|
|
59
|
+
export type Selectors = AttributeSelector | ParentSelector
|