aeon-ui-engine 1.5.1 → 1.9.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/CHANGELOG.md +140 -0
- package/package.json +6 -3
- package/packages/core/dist/index.d.ts +116 -1
- package/packages/core/dist/index.js +202 -1
- package/packages/core/src/anatomy.ts +13 -1
- package/packages/core/src/index.ts +2 -0
- package/packages/core/src/list-window.ts +149 -0
- package/packages/core/src/sound.ts +154 -0
- package/packages/panda/package.json +6 -3
- package/packages/panda/panda.config.ts +12 -0
- package/packages/panda/src/recipes/clipboard.ts +40 -0
- package/packages/panda/src/recipes/composer.ts +4 -3
- package/packages/panda/src/recipes/index.ts +4 -0
- package/packages/panda/src/recipes/prose.ts +110 -0
- package/packages/panda/src/recipes/segment-group.ts +50 -0
- package/packages/panda/src/recipes/textarea.ts +60 -0
- package/packages/panda/styled-system/css/conditions.d.ts +7 -0
- package/packages/panda/styled-system/css/conditions.js +32 -0
- package/packages/panda/styled-system/css/css.d.ts +6 -6
- package/packages/panda/styled-system/css/css.js +63 -0
- package/packages/panda/styled-system/css/cva.d.ts +2 -3
- package/packages/panda/styled-system/css/cva.js +51 -0
- package/packages/panda/styled-system/css/cx.d.ts +5 -4
- package/packages/panda/styled-system/css/{cx.mjs → cx.js} +5 -4
- package/packages/panda/styled-system/css/first-that-works.d.ts +22 -0
- package/packages/panda/styled-system/css/first-that-works.js +1 -0
- package/packages/panda/styled-system/css/index.d.ts +6 -3
- package/packages/panda/styled-system/css/index.js +8 -0
- package/packages/panda/styled-system/css/keyframes.d.ts +5 -0
- package/packages/panda/styled-system/css/keyframes.js +8 -0
- package/packages/panda/styled-system/css/position-try.d.ts +5 -0
- package/packages/panda/styled-system/css/position-try.js +11 -0
- package/packages/panda/styled-system/css/sva.d.ts +1 -2
- package/packages/panda/styled-system/css/sva.js +49 -0
- package/packages/panda/styled-system/css/view-transition.d.ts +7 -0
- package/packages/panda/styled-system/css/view-transition.js +18 -0
- package/packages/panda/styled-system/helpers.d.ts +67 -0
- package/packages/panda/styled-system/helpers.js +624 -0
- package/packages/panda/styled-system/jsx/aspect-ratio.d.ts +3 -6
- package/packages/panda/styled-system/jsx/aspect-ratio.js +11 -0
- package/packages/panda/styled-system/jsx/bleed.d.ts +4 -7
- package/packages/panda/styled-system/jsx/bleed.js +11 -0
- package/packages/panda/styled-system/jsx/box.d.ts +4 -7
- package/packages/panda/styled-system/jsx/box.js +11 -0
- package/packages/panda/styled-system/jsx/center.d.ts +4 -7
- package/packages/panda/styled-system/jsx/center.js +11 -0
- package/packages/panda/styled-system/jsx/circle.d.ts +4 -7
- package/packages/panda/styled-system/jsx/circle.js +11 -0
- package/packages/panda/styled-system/jsx/container.d.ts +4 -7
- package/packages/panda/styled-system/jsx/container.js +11 -0
- package/packages/panda/styled-system/jsx/cq.d.ts +4 -7
- package/packages/panda/styled-system/jsx/cq.js +11 -0
- package/packages/panda/styled-system/jsx/create-recipe-context.d.ts +31 -0
- package/packages/panda/styled-system/jsx/create-recipe-context.js +38 -0
- package/packages/panda/styled-system/jsx/create-slot-recipe-context.d.ts +49 -0
- package/packages/panda/styled-system/jsx/create-slot-recipe-context.js +124 -0
- package/packages/panda/styled-system/jsx/divider.d.ts +4 -7
- package/packages/panda/styled-system/jsx/divider.js +11 -0
- package/packages/panda/styled-system/jsx/factory.d.ts +2 -2
- package/packages/panda/styled-system/jsx/factory.js +91 -0
- package/packages/panda/styled-system/jsx/flex.d.ts +4 -7
- package/packages/panda/styled-system/jsx/flex.js +11 -0
- package/packages/panda/styled-system/jsx/float.d.ts +4 -7
- package/packages/panda/styled-system/jsx/float.js +11 -0
- package/packages/panda/styled-system/jsx/grid-item.d.ts +4 -7
- package/packages/panda/styled-system/jsx/grid-item.js +11 -0
- package/packages/panda/styled-system/jsx/grid.d.ts +4 -7
- package/packages/panda/styled-system/jsx/grid.js +11 -0
- package/packages/panda/styled-system/jsx/helper.d.ts +34 -0
- package/packages/panda/styled-system/jsx/helper.js +92 -0
- package/packages/panda/styled-system/jsx/hstack.d.ts +4 -7
- package/packages/panda/styled-system/jsx/hstack.js +11 -0
- package/packages/panda/styled-system/jsx/index.d.ts +17 -17
- package/packages/panda/styled-system/jsx/index.js +24 -0
- package/packages/panda/styled-system/jsx/is-valid-prop.d.ts +5 -10
- package/packages/panda/styled-system/jsx/is-valid-prop.js +12 -0
- package/packages/panda/styled-system/jsx/link-overlay.d.ts +4 -7
- package/packages/panda/styled-system/jsx/link-overlay.js +11 -0
- package/packages/panda/styled-system/jsx/spacer.d.ts +4 -7
- package/packages/panda/styled-system/jsx/spacer.js +11 -0
- package/packages/panda/styled-system/jsx/square.d.ts +4 -7
- package/packages/panda/styled-system/jsx/square.js +11 -0
- package/packages/panda/styled-system/jsx/stack.d.ts +4 -7
- package/packages/panda/styled-system/jsx/stack.js +11 -0
- package/packages/panda/styled-system/jsx/visually-hidden.d.ts +4 -7
- package/packages/panda/styled-system/jsx/visually-hidden.js +11 -0
- package/packages/panda/styled-system/jsx/vstack.d.ts +4 -7
- package/packages/panda/styled-system/jsx/vstack.js +11 -0
- package/packages/panda/styled-system/jsx/wrap.d.ts +4 -7
- package/packages/panda/styled-system/jsx/wrap.js +11 -0
- package/packages/panda/styled-system/patterns/aspect-ratio.d.ts +8 -9
- package/packages/panda/styled-system/patterns/aspect-ratio.js +37 -0
- package/packages/panda/styled-system/patterns/bleed.d.ts +9 -10
- package/packages/panda/styled-system/patterns/bleed.js +30 -0
- package/packages/panda/styled-system/patterns/box.d.ts +8 -11
- package/packages/panda/styled-system/patterns/box.js +16 -0
- package/packages/panda/styled-system/patterns/center.d.ts +8 -9
- package/packages/panda/styled-system/patterns/center.js +22 -0
- package/packages/panda/styled-system/patterns/circle.d.ts +8 -9
- package/packages/panda/styled-system/patterns/circle.js +26 -0
- package/packages/panda/styled-system/patterns/container.d.ts +8 -11
- package/packages/panda/styled-system/patterns/container.js +26 -0
- package/packages/panda/styled-system/patterns/cq.d.ts +10 -10
- package/packages/panda/styled-system/patterns/cq.js +24 -0
- package/packages/panda/styled-system/patterns/divider.d.ts +11 -11
- package/packages/panda/styled-system/patterns/divider.js +31 -0
- package/packages/panda/styled-system/patterns/flex.d.ts +14 -15
- package/packages/panda/styled-system/patterns/flex.js +27 -0
- package/packages/panda/styled-system/patterns/float.d.ts +12 -12
- package/packages/panda/styled-system/patterns/float.js +84 -0
- package/packages/panda/styled-system/patterns/grid-item.d.ts +13 -14
- package/packages/panda/styled-system/patterns/grid-item.js +26 -0
- package/packages/panda/styled-system/patterns/grid.d.ts +13 -13
- package/packages/panda/styled-system/patterns/grid.js +30 -0
- package/packages/panda/styled-system/patterns/hstack.d.ts +9 -10
- package/packages/panda/styled-system/patterns/hstack.js +27 -0
- package/packages/panda/styled-system/patterns/index.d.ts +14 -15
- package/packages/panda/styled-system/patterns/index.js +20 -0
- package/packages/panda/styled-system/patterns/link-overlay.d.ts +8 -11
- package/packages/panda/styled-system/patterns/link-overlay.js +25 -0
- package/packages/panda/styled-system/patterns/runtime.js +25 -0
- package/packages/panda/styled-system/patterns/spacer.d.ts +9 -9
- package/packages/panda/styled-system/patterns/spacer.js +26 -0
- package/packages/panda/styled-system/patterns/square.d.ts +8 -9
- package/packages/panda/styled-system/patterns/square.js +25 -0
- package/packages/panda/styled-system/patterns/stack.d.ts +11 -12
- package/packages/panda/styled-system/patterns/stack.js +30 -0
- package/packages/panda/styled-system/patterns/visually-hidden.d.ts +8 -11
- package/packages/panda/styled-system/patterns/visually-hidden.js +19 -0
- package/packages/panda/styled-system/patterns/vstack.d.ts +9 -10
- package/packages/panda/styled-system/patterns/vstack.js +27 -0
- package/packages/panda/styled-system/patterns/wrap.d.ts +12 -13
- package/packages/panda/styled-system/patterns/wrap.js +26 -0
- package/packages/panda/styled-system/recipes/aeon-accordion.d.ts +9 -26
- package/packages/panda/styled-system/recipes/aeon-accordion.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-app-shell.d.ts +10 -26
- package/packages/panda/styled-system/recipes/aeon-app-shell.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-async.d.ts +9 -26
- package/packages/panda/styled-system/recipes/aeon-async.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-avatar.d.ts +10 -28
- package/packages/panda/styled-system/recipes/aeon-avatar.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-badge.d.ts +8 -26
- package/packages/panda/styled-system/recipes/aeon-badge.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-bar.d.ts +13 -32
- package/packages/panda/styled-system/recipes/aeon-bar.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-button-group.d.ts +10 -33
- package/packages/panda/styled-system/recipes/aeon-button-group.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-button.d.ts +10 -33
- package/packages/panda/styled-system/recipes/aeon-button.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-checkbox.d.ts +9 -24
- package/packages/panda/styled-system/recipes/aeon-checkbox.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-clipboard.d.ts +16 -0
- package/packages/panda/styled-system/recipes/aeon-clipboard.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-combobox.d.ts +9 -26
- package/packages/panda/styled-system/recipes/aeon-combobox.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-composer.d.ts +9 -24
- package/packages/panda/styled-system/recipes/aeon-composer.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-content.d.ts +10 -26
- package/packages/panda/styled-system/recipes/aeon-content.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-conversation.d.ts +9 -24
- package/packages/panda/styled-system/recipes/aeon-conversation.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-dialog.d.ts +9 -24
- package/packages/panda/styled-system/recipes/aeon-dialog.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-entry.d.ts +11 -30
- package/packages/panda/styled-system/recipes/aeon-entry.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-field.d.ts +9 -26
- package/packages/panda/styled-system/recipes/aeon-field.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-file-upload.d.ts +9 -24
- package/packages/panda/styled-system/recipes/aeon-file-upload.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-identity.d.ts +10 -28
- package/packages/panda/styled-system/recipes/aeon-identity.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-list-row.d.ts +9 -26
- package/packages/panda/styled-system/recipes/aeon-list-row.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-menu.d.ts +9 -24
- package/packages/panda/styled-system/recipes/aeon-menu.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-metric-strip.d.ts +10 -28
- package/packages/panda/styled-system/recipes/aeon-metric-strip.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-nav.d.ts +11 -30
- package/packages/panda/styled-system/recipes/aeon-nav.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-panel.d.ts +10 -26
- package/packages/panda/styled-system/recipes/aeon-panel.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-pin-input.d.ts +9 -24
- package/packages/panda/styled-system/recipes/aeon-pin-input.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-popover.d.ts +9 -24
- package/packages/panda/styled-system/recipes/aeon-popover.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-profile-header.d.ts +10 -28
- package/packages/panda/styled-system/recipes/aeon-profile-header.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-progress.d.ts +9 -24
- package/packages/panda/styled-system/recipes/aeon-progress.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-prose.d.ts +16 -0
- package/packages/panda/styled-system/recipes/aeon-prose.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-radio-group.d.ts +9 -24
- package/packages/panda/styled-system/recipes/aeon-radio-group.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-range-slider.d.ts +9 -24
- package/packages/panda/styled-system/recipes/aeon-range-slider.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-scroll.d.ts +12 -36
- package/packages/panda/styled-system/recipes/aeon-scroll.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-segment-group.d.ts +18 -0
- package/packages/panda/styled-system/recipes/aeon-segment-group.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-select.d.ts +9 -26
- package/packages/panda/styled-system/recipes/aeon-select.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-separator.d.ts +10 -26
- package/packages/panda/styled-system/recipes/aeon-separator.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-slider.d.ts +9 -24
- package/packages/panda/styled-system/recipes/aeon-slider.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-switch.d.ts +9 -24
- package/packages/panda/styled-system/recipes/aeon-switch.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-tabs.d.ts +9 -24
- package/packages/panda/styled-system/recipes/aeon-tabs.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-textarea.d.ts +18 -0
- package/packages/panda/styled-system/recipes/aeon-textarea.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-theme-switcher.d.ts +10 -26
- package/packages/panda/styled-system/recipes/aeon-theme-switcher.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-thread.d.ts +9 -24
- package/packages/panda/styled-system/recipes/aeon-thread.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-toast.d.ts +9 -24
- package/packages/panda/styled-system/recipes/aeon-toast.js +5 -0
- package/packages/panda/styled-system/recipes/aeon-tooltip.d.ts +9 -24
- package/packages/panda/styled-system/recipes/aeon-tooltip.js +5 -0
- package/packages/panda/styled-system/recipes/index.d.ts +31 -28
- package/packages/panda/styled-system/recipes/index.js +43 -0
- package/packages/panda/styled-system/recipes/runtime.js +133 -0
- package/packages/panda/styled-system/styles.css +1899 -2110
- package/packages/panda/styled-system/tokens/index.d.ts +4 -5
- package/packages/panda/styled-system/tokens/index.js +18 -0
- package/packages/panda/styled-system/types/index.d.ts +3 -6
- package/packages/panda/styled-system/types/jsx.d.ts +36 -27
- package/packages/panda/styled-system/types/pattern.d.ts +18 -70
- package/packages/panda/styled-system/types/recipe.d.ts +50 -154
- package/packages/panda/styled-system/types/system.d.ts +1826 -0
- package/packages/panda/styled-system/types/tokens.d.ts +65 -0
- package/packages/panda/tsconfig.json +3 -1
- package/packages/primitives/dist/chunk-5BNAV4S2.js +258 -0
- package/packages/primitives/dist/chunk-HYHCIMHC.js +45 -0
- package/packages/primitives/dist/index.d.ts +2 -0
- package/packages/primitives/dist/index.js +30 -12
- package/packages/primitives/dist/machines/app-nav.d.ts +3 -3
- package/packages/primitives/dist/machines/cache.d.ts +223 -0
- package/packages/primitives/dist/machines/cache.js +14 -0
- package/packages/primitives/dist/machines/clipboard.d.ts +46 -0
- package/packages/primitives/dist/machines/clipboard.js +8 -0
- package/packages/primitives/dist/machines/tabs.d.ts +2 -2
- package/packages/primitives/src/index.ts +2 -0
- package/packages/primitives/src/machines/cache.ts +395 -0
- package/packages/primitives/src/machines/clipboard.ts +56 -0
- package/packages/react/dist/index.d.ts +134 -13
- package/packages/react/dist/index.js +1429 -1016
- package/packages/react/src/clipboard/index.tsx +117 -0
- package/packages/react/src/composer/index.tsx +14 -5
- package/packages/react/src/dialog/index.tsx +11 -3
- package/packages/react/src/floating/FloatingPositioner.tsx +11 -1
- package/packages/react/src/index.ts +4 -0
- package/packages/react/src/menu/index.tsx +8 -3
- package/packages/react/src/popover/index.tsx +25 -4
- package/packages/react/src/prose/index.tsx +11 -0
- package/packages/react/src/radio-group/index.tsx +2 -1
- package/packages/react/src/scroll/index.tsx +1 -0
- package/packages/react/src/scroll/use-windowed-range.ts +118 -0
- package/packages/react/src/segment-group/index.tsx +171 -0
- package/packages/react/src/select/index.tsx +11 -2
- package/packages/react/src/slider/index.tsx +13 -6
- package/packages/react/src/tabs/index.tsx +19 -7
- package/packages/react/src/textarea/index.tsx +75 -0
- package/packages/react/src/utils/assign-ref.ts +7 -0
- package/packages/schemas/dist/index.d.ts +8 -0
- package/packages/schemas/dist/index.js +62 -1
- package/packages/schemas/json/catalog.json +493 -0
- package/packages/schemas/json/clipboard.json +136 -0
- package/packages/schemas/json/prose.json +103 -0
- package/packages/schemas/json/segmentGroup.json +131 -0
- package/packages/schemas/json/textarea.json +119 -0
- package/packages/schemas/prompts/statecharts.md +1 -1
- package/packages/schemas/registry/catalog.json +34 -0
- package/packages/schemas/registry/components/clipboard.json +136 -0
- package/packages/schemas/registry/components/prose.json +103 -0
- package/packages/schemas/registry/components/segmentGroup.json +131 -0
- package/packages/schemas/registry/components/textarea.json +119 -0
- package/packages/schemas/registry/machines/clipboard.json +110 -0
- package/packages/schemas/registry/machines/slider.json +18 -1
- package/packages/schemas/scripts/emit.ts +2 -0
- package/packages/schemas/src/components.ts +63 -0
- package/packages/tree/README.md +29 -0
- package/packages/tree/dist/index.d.ts +97 -0
- package/packages/tree/dist/index.js +107 -0
- package/packages/tree/package.json +42 -0
- package/packages/tree/src/exclusive-action.ts +104 -0
- package/packages/tree/src/index.ts +7 -0
- package/packages/tree/src/interpret.tsx +45 -0
- package/packages/tree/src/totality.ts +20 -0
- package/packages/tree/src/widget.ts +31 -0
- package/packages/tree/tsconfig.json +8 -0
- package/packages/tree/vitest.config.ts +8 -0
- package/packages/ui/dist/index.d.ts +27 -3
- package/packages/ui/dist/index.js +232 -165
- package/packages/ui/src/clipboard.tsx +51 -0
- package/packages/ui/src/index.ts +4 -0
- package/packages/ui/src/prose.tsx +15 -0
- package/packages/ui/src/segment-group.tsx +28 -0
- package/packages/ui/src/textarea.tsx +17 -0
- package/scripts/vite-aliases.mjs +5 -2
- package/packages/cli/node_modules/.bin/esbuild +0 -21
- package/packages/cli/node_modules/.bin/jiti +0 -21
- package/packages/cli/node_modules/.bin/tsc +0 -21
- package/packages/cli/node_modules/.bin/tsserver +0 -21
- package/packages/cli/node_modules/.bin/tsup +0 -21
- package/packages/cli/node_modules/.bin/tsup-node +0 -21
- package/packages/cli/node_modules/.bin/tsx +0 -21
- package/packages/cli/node_modules/.bin/vite +0 -21
- package/packages/cli/node_modules/.bin/vitest +0 -21
- package/packages/core/node_modules/.bin/esbuild +0 -21
- package/packages/core/node_modules/.bin/jiti +0 -21
- package/packages/core/node_modules/.bin/tsc +0 -21
- package/packages/core/node_modules/.bin/tsserver +0 -21
- package/packages/core/node_modules/.bin/tsup +0 -21
- package/packages/core/node_modules/.bin/tsup-node +0 -21
- package/packages/core/node_modules/.bin/tsx +0 -21
- package/packages/core/node_modules/.bin/vite +0 -21
- package/packages/core/node_modules/.bin/vitest +0 -21
- package/packages/core/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
- package/packages/core/src/identicon.test.ts +0 -39
- package/packages/core/src/machine.test.ts +0 -79
- package/packages/core/src/theme.test.ts +0 -14
- package/packages/geometry/node_modules/.bin/esbuild +0 -21
- package/packages/geometry/node_modules/.bin/jiti +0 -21
- package/packages/geometry/node_modules/.bin/tsc +0 -21
- package/packages/geometry/node_modules/.bin/tsserver +0 -21
- package/packages/geometry/node_modules/.bin/tsup +0 -21
- package/packages/geometry/node_modules/.bin/tsup-node +0 -21
- package/packages/geometry/node_modules/.bin/tsx +0 -21
- package/packages/panda/styled-system/css/conditions.mjs +0 -36
- package/packages/panda/styled-system/css/css.mjs +0 -45
- package/packages/panda/styled-system/css/cva.mjs +0 -87
- package/packages/panda/styled-system/css/index.mjs +0 -4
- package/packages/panda/styled-system/css/sva.mjs +0 -46
- package/packages/panda/styled-system/helpers.mjs +0 -328
- package/packages/panda/styled-system/jsx/aspect-ratio.mjs +0 -14
- package/packages/panda/styled-system/jsx/bleed.mjs +0 -14
- package/packages/panda/styled-system/jsx/box.mjs +0 -14
- package/packages/panda/styled-system/jsx/center.mjs +0 -14
- package/packages/panda/styled-system/jsx/circle.mjs +0 -14
- package/packages/panda/styled-system/jsx/container.mjs +0 -14
- package/packages/panda/styled-system/jsx/cq.mjs +0 -14
- package/packages/panda/styled-system/jsx/create-style-context.d.ts +0 -54
- package/packages/panda/styled-system/jsx/create-style-context.mjs +0 -121
- package/packages/panda/styled-system/jsx/divider.mjs +0 -14
- package/packages/panda/styled-system/jsx/factory-helper.mjs +0 -22
- package/packages/panda/styled-system/jsx/factory.mjs +0 -89
- package/packages/panda/styled-system/jsx/flex.mjs +0 -14
- package/packages/panda/styled-system/jsx/float.mjs +0 -14
- package/packages/panda/styled-system/jsx/grid-item.mjs +0 -14
- package/packages/panda/styled-system/jsx/grid.mjs +0 -14
- package/packages/panda/styled-system/jsx/hstack.mjs +0 -14
- package/packages/panda/styled-system/jsx/index.mjs +0 -23
- package/packages/panda/styled-system/jsx/is-valid-prop.mjs +0 -17
- package/packages/panda/styled-system/jsx/link-overlay.mjs +0 -14
- package/packages/panda/styled-system/jsx/spacer.mjs +0 -14
- package/packages/panda/styled-system/jsx/square.mjs +0 -14
- package/packages/panda/styled-system/jsx/stack.mjs +0 -14
- package/packages/panda/styled-system/jsx/visually-hidden.mjs +0 -14
- package/packages/panda/styled-system/jsx/vstack.mjs +0 -14
- package/packages/panda/styled-system/jsx/wrap.mjs +0 -14
- package/packages/panda/styled-system/patterns/aspect-ratio.mjs +0 -38
- package/packages/panda/styled-system/patterns/bleed.mjs +0 -24
- package/packages/panda/styled-system/patterns/box.mjs +0 -15
- package/packages/panda/styled-system/patterns/center.mjs +0 -21
- package/packages/panda/styled-system/patterns/circle.mjs +0 -25
- package/packages/panda/styled-system/patterns/container.mjs +0 -21
- package/packages/panda/styled-system/patterns/cq.mjs +0 -21
- package/packages/panda/styled-system/patterns/divider.mjs +0 -25
- package/packages/panda/styled-system/patterns/flex.mjs +0 -26
- package/packages/panda/styled-system/patterns/float.mjs +0 -52
- package/packages/panda/styled-system/patterns/grid-item.mjs +0 -25
- package/packages/panda/styled-system/patterns/grid.mjs +0 -27
- package/packages/panda/styled-system/patterns/hstack.mjs +0 -24
- package/packages/panda/styled-system/patterns/index.mjs +0 -20
- package/packages/panda/styled-system/patterns/link-overlay.mjs +0 -24
- package/packages/panda/styled-system/patterns/spacer.mjs +0 -25
- package/packages/panda/styled-system/patterns/square.mjs +0 -24
- package/packages/panda/styled-system/patterns/stack.mjs +0 -24
- package/packages/panda/styled-system/patterns/visually-hidden.mjs +0 -18
- package/packages/panda/styled-system/patterns/vstack.mjs +0 -24
- package/packages/panda/styled-system/patterns/wrap.mjs +0 -25
- package/packages/panda/styled-system/recipes/aeon-accordion.mjs +0 -49
- package/packages/panda/styled-system/recipes/aeon-app-shell.mjs +0 -70
- package/packages/panda/styled-system/recipes/aeon-async.mjs +0 -57
- package/packages/panda/styled-system/recipes/aeon-avatar.mjs +0 -57
- package/packages/panda/styled-system/recipes/aeon-badge.mjs +0 -32
- package/packages/panda/styled-system/recipes/aeon-bar.mjs +0 -77
- package/packages/panda/styled-system/recipes/aeon-button-group.mjs +0 -37
- package/packages/panda/styled-system/recipes/aeon-button.mjs +0 -39
- package/packages/panda/styled-system/recipes/aeon-checkbox.mjs +0 -49
- package/packages/panda/styled-system/recipes/aeon-combobox.mjs +0 -53
- package/packages/panda/styled-system/recipes/aeon-composer.mjs +0 -57
- package/packages/panda/styled-system/recipes/aeon-content.mjs +0 -70
- package/packages/panda/styled-system/recipes/aeon-conversation.mjs +0 -61
- package/packages/panda/styled-system/recipes/aeon-dialog.mjs +0 -61
- package/packages/panda/styled-system/recipes/aeon-entry.mjs +0 -100
- package/packages/panda/styled-system/recipes/aeon-field.mjs +0 -53
- package/packages/panda/styled-system/recipes/aeon-file-upload.mjs +0 -61
- package/packages/panda/styled-system/recipes/aeon-identity.mjs +0 -63
- package/packages/panda/styled-system/recipes/aeon-list-row.mjs +0 -49
- package/packages/panda/styled-system/recipes/aeon-menu.mjs +0 -53
- package/packages/panda/styled-system/recipes/aeon-metric-strip.mjs +0 -54
- package/packages/panda/styled-system/recipes/aeon-nav.mjs +0 -69
- package/packages/panda/styled-system/recipes/aeon-panel.mjs +0 -58
- package/packages/panda/styled-system/recipes/aeon-pin-input.mjs +0 -37
- package/packages/panda/styled-system/recipes/aeon-popover.mjs +0 -53
- package/packages/panda/styled-system/recipes/aeon-profile-header.mjs +0 -62
- package/packages/panda/styled-system/recipes/aeon-progress.mjs +0 -45
- package/packages/panda/styled-system/recipes/aeon-radio-group.mjs +0 -49
- package/packages/panda/styled-system/recipes/aeon-range-slider.mjs +0 -49
- package/packages/panda/styled-system/recipes/aeon-scroll.mjs +0 -64
- package/packages/panda/styled-system/recipes/aeon-select.mjs +0 -57
- package/packages/panda/styled-system/recipes/aeon-separator.mjs +0 -42
- package/packages/panda/styled-system/recipes/aeon-slider.mjs +0 -49
- package/packages/panda/styled-system/recipes/aeon-switch.mjs +0 -49
- package/packages/panda/styled-system/recipes/aeon-tabs.mjs +0 -49
- package/packages/panda/styled-system/recipes/aeon-theme-switcher.mjs +0 -59
- package/packages/panda/styled-system/recipes/aeon-thread.mjs +0 -73
- package/packages/panda/styled-system/recipes/aeon-toast.mjs +0 -49
- package/packages/panda/styled-system/recipes/aeon-tooltip.mjs +0 -49
- package/packages/panda/styled-system/recipes/create-recipe.mjs +0 -82
- package/packages/panda/styled-system/recipes/index.mjs +0 -39
- package/packages/panda/styled-system/tokens/index.mjs +0 -2224
- package/packages/panda/styled-system/tokens/tokens.d.ts +0 -60
- package/packages/panda/styled-system/types/composition.d.ts +0 -227
- package/packages/panda/styled-system/types/conditions.d.ts +0 -346
- package/packages/panda/styled-system/types/csstype.d.ts +0 -22570
- package/packages/panda/styled-system/types/global.d.ts +0 -20
- package/packages/panda/styled-system/types/parts.d.ts +0 -8
- package/packages/panda/styled-system/types/prop-type.d.ts +0 -250
- package/packages/panda/styled-system/types/selectors.d.ts +0 -59
- package/packages/panda/styled-system/types/static-css.d.ts +0 -56
- package/packages/panda/styled-system/types/style-props.d.ts +0 -8089
- package/packages/panda/styled-system/types/system-types.d.ts +0 -151
- package/packages/primitives/node_modules/.bin/esbuild +0 -21
- package/packages/primitives/node_modules/.bin/jiti +0 -21
- package/packages/primitives/node_modules/.bin/tsc +0 -21
- package/packages/primitives/node_modules/.bin/tsserver +0 -21
- package/packages/primitives/node_modules/.bin/tsup +0 -21
- package/packages/primitives/node_modules/.bin/tsup-node +0 -21
- package/packages/primitives/node_modules/.bin/tsx +0 -21
- package/packages/primitives/node_modules/.bin/vite +0 -21
- package/packages/primitives/node_modules/.bin/vitest +0 -21
- package/packages/primitives/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
- package/packages/primitives/src/__tests__/app-nav.test.ts +0 -30
- package/packages/primitives/src/__tests__/file-upload.test.ts +0 -25
- package/packages/primitives/src/__tests__/floating-surface.test.ts +0 -29
- package/packages/primitives/src/__tests__/range-slider.test.ts +0 -39
- package/packages/react/node_modules/.bin/esbuild +0 -21
- package/packages/react/node_modules/.bin/jiti +0 -21
- package/packages/react/node_modules/.bin/tsc +0 -21
- package/packages/react/node_modules/.bin/tsserver +0 -21
- package/packages/react/node_modules/.bin/tsup +0 -21
- package/packages/react/node_modules/.bin/tsup-node +0 -21
- package/packages/react/node_modules/.bin/tsx +0 -21
- package/packages/react/node_modules/.bin/vite +0 -21
- package/packages/react/node_modules/.bin/vitest +0 -21
- package/packages/react/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
- package/packages/react/src/avatar/avatar.test.tsx +0 -27
- package/packages/react/src/dialog/dialog.test.tsx +0 -50
- package/packages/react/src/select/select.test.tsx +0 -81
- package/packages/react/src/toast/toast.test.tsx +0 -40
- package/packages/react/src/tooltip/tooltip.test.tsx +0 -122
- package/packages/react-scene/node_modules/.bin/jiti +0 -21
- package/packages/react-scene/node_modules/.bin/tsc +0 -21
- package/packages/react-scene/node_modules/.bin/tsserver +0 -21
- package/packages/react-scene/node_modules/.bin/tsup +0 -21
- package/packages/react-scene/node_modules/.bin/tsup-node +0 -21
- package/packages/react-scene/node_modules/.bin/tsx +0 -21
- package/packages/scene/node_modules/.bin/jiti +0 -21
- package/packages/scene/node_modules/.bin/tsc +0 -21
- package/packages/scene/node_modules/.bin/tsserver +0 -21
- package/packages/scene/node_modules/.bin/tsup +0 -21
- package/packages/scene/node_modules/.bin/tsup-node +0 -21
- package/packages/scene/node_modules/.bin/tsx +0 -21
- package/packages/schemas/node_modules/.bin/esbuild +0 -21
- package/packages/schemas/node_modules/.bin/jiti +0 -21
- package/packages/schemas/node_modules/.bin/tsc +0 -21
- package/packages/schemas/node_modules/.bin/tsserver +0 -21
- package/packages/schemas/node_modules/.bin/tsup +0 -21
- package/packages/schemas/node_modules/.bin/tsup-node +0 -21
- package/packages/schemas/node_modules/.bin/tsx +0 -21
- package/packages/schemas/node_modules/.bin/vite +0 -21
- package/packages/schemas/node_modules/.bin/vitest +0 -21
- package/packages/schemas/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
- package/packages/schemas/src/aeon-to-schema.test.ts +0 -70
- package/packages/schemas/src/index.test.ts +0 -108
- package/packages/signal/node_modules/.bin/jiti +0 -21
- package/packages/signal/node_modules/.bin/tsc +0 -21
- package/packages/signal/node_modules/.bin/tsserver +0 -21
- package/packages/signal/node_modules/.bin/tsup +0 -21
- package/packages/signal/node_modules/.bin/tsup-node +0 -21
- package/packages/signal/node_modules/.bin/tsx +0 -21
- package/packages/site/node_modules/.bin/jiti +0 -21
- package/packages/site/node_modules/.bin/tsc +0 -21
- package/packages/site/node_modules/.bin/tsserver +0 -21
- package/packages/site/node_modules/.bin/tsup +0 -21
- package/packages/site/node_modules/.bin/tsup-node +0 -21
- package/packages/site/node_modules/.bin/tsx +0 -21
- package/packages/solid/node_modules/.bin/jiti +0 -21
- package/packages/solid/node_modules/.bin/tsc +0 -21
- package/packages/solid/node_modules/.bin/tsserver +0 -21
- package/packages/solid/node_modules/.bin/tsup +0 -21
- package/packages/solid/node_modules/.bin/tsup-node +0 -21
- package/packages/solid/node_modules/.bin/tsx +0 -21
- package/packages/surface/node_modules/.bin/jiti +0 -21
- package/packages/surface/node_modules/.bin/tsc +0 -21
- package/packages/surface/node_modules/.bin/tsserver +0 -21
- package/packages/surface/node_modules/.bin/tsup +0 -21
- package/packages/surface/node_modules/.bin/tsup-node +0 -21
- package/packages/surface/node_modules/.bin/tsx +0 -21
- package/packages/svelte/node_modules/.bin/acorn +0 -21
- package/packages/svelte/node_modules/.bin/esbuild +0 -21
- package/packages/svelte/node_modules/.bin/jiti +0 -21
- package/packages/svelte/node_modules/.bin/svelte-check +0 -21
- package/packages/svelte/node_modules/.bin/tsc +0 -21
- package/packages/svelte/node_modules/.bin/tsserver +0 -21
- package/packages/svelte/node_modules/.bin/tsup +0 -21
- package/packages/svelte/node_modules/.bin/tsup-node +0 -21
- package/packages/svelte/node_modules/.bin/tsx +0 -21
- package/packages/svelte/node_modules/.bin/vite +0 -21
- package/packages/ui/node_modules/.bin/jiti +0 -21
- package/packages/ui/node_modules/.bin/tsc +0 -21
- package/packages/ui/node_modules/.bin/tsserver +0 -21
- package/packages/ui/node_modules/.bin/tsup +0 -21
- package/packages/ui/node_modules/.bin/tsup-node +0 -21
- package/packages/ui/node_modules/.bin/tsx +0 -21
- package/packages/vue/node_modules/.bin/jiti +0 -21
- package/packages/vue/node_modules/.bin/tsc +0 -21
- package/packages/vue/node_modules/.bin/tsserver +0 -21
- package/packages/vue/node_modules/.bin/tsup +0 -21
- package/packages/vue/node_modules/.bin/tsup-node +0 -21
- package/packages/vue/node_modules/.bin/tsx +0 -21
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { css, cva } from '../css/index';
|
|
2
|
+
|
|
3
|
+
export const composeShouldForwardProps = (tag, shouldForwardProp) => {
|
|
4
|
+
if (!tag.__shouldForwardProps__ || !shouldForwardProp) return shouldForwardProp
|
|
5
|
+
return (prop) => tag.__shouldForwardProps__(prop) && shouldForwardProp(prop)
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const composeCvaFn = (cvaA, cvaB) => {
|
|
9
|
+
if (cvaA && !cvaB) return cvaA
|
|
10
|
+
if (!cvaA && cvaB) return cvaB
|
|
11
|
+
if ((cvaA.__cva__ && cvaB.__cva__) || (cvaA.__recipe__ && cvaB.__recipe__)) return cvaA.merge(cvaB, cva)
|
|
12
|
+
const error = new TypeError('Cannot merge cva with recipe. Please use either cva or recipe.')
|
|
13
|
+
TypeError.captureStackTrace?.(error)
|
|
14
|
+
throw error
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Like React's defaultProps: an explicit `undefined` keeps the default.
|
|
18
|
+
export function mergeDefaultProps(defaultProps, props) {
|
|
19
|
+
const merged = Object.assign({}, defaultProps)
|
|
20
|
+
for (const key in props) {
|
|
21
|
+
if (props[key] !== undefined) merged[key] = props[key]
|
|
22
|
+
}
|
|
23
|
+
return merged
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const getDisplayName = (Component) => {
|
|
27
|
+
if (typeof Component === 'string') return Component
|
|
28
|
+
return Component?.displayName || Component?.name || 'Component'
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const htmlPropsMap = {
|
|
32
|
+
htmlWidth: 'width',
|
|
33
|
+
htmlHeight: 'height',
|
|
34
|
+
htmlTranslate: 'translate',
|
|
35
|
+
htmlContent: 'content',
|
|
36
|
+
}
|
|
37
|
+
const hasOwn = Object.prototype.hasOwnProperty
|
|
38
|
+
|
|
39
|
+
export function splitJsxProps(props, shouldForwardProp, variantSet, isCssProperty, skipClass) {
|
|
40
|
+
let htmlProps
|
|
41
|
+
let forwardedProps
|
|
42
|
+
let variantProps
|
|
43
|
+
let propStyles
|
|
44
|
+
let cssStyles
|
|
45
|
+
let elementProps
|
|
46
|
+
const keys = Object.keys(props)
|
|
47
|
+
for (let i = 0; i < keys.length; i++) {
|
|
48
|
+
const key = keys[i]
|
|
49
|
+
const value = props[key]
|
|
50
|
+
if (value === void 0) continue
|
|
51
|
+
if (key === 'className' || (skipClass && key === 'class') || key === 'as' || key === 'unstyled' || key === 'children') continue
|
|
52
|
+
if (hasOwn.call(htmlPropsMap, key)) {
|
|
53
|
+
htmlProps ||= Object.create(null)
|
|
54
|
+
htmlProps[htmlPropsMap[key]] = value
|
|
55
|
+
} else if (shouldForwardProp(key)) {
|
|
56
|
+
forwardedProps ||= Object.create(null)
|
|
57
|
+
forwardedProps[key] = value
|
|
58
|
+
} else if (variantSet.has(key)) {
|
|
59
|
+
variantProps ||= Object.create(null)
|
|
60
|
+
variantProps[key] = value
|
|
61
|
+
} else if (key === 'css') {
|
|
62
|
+
cssStyles = value
|
|
63
|
+
} else if (isCssProperty(key)) {
|
|
64
|
+
(propStyles ||= {})[key] = value
|
|
65
|
+
} else {
|
|
66
|
+
elementProps ||= Object.create(null)
|
|
67
|
+
elementProps[key] = value
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return [htmlProps, forwardedProps, variantProps || {}, propStyles, cssStyles, elementProps]
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function serializeSplitStyles(propStyles, cssStyles, baseStyles) {
|
|
74
|
+
if (baseStyles !== void 0) {
|
|
75
|
+
return propStyles ? cssStyles !== void 0 ? css(baseStyles, propStyles, cssStyles) : css(baseStyles, propStyles) : css(baseStyles, cssStyles)
|
|
76
|
+
}
|
|
77
|
+
return propStyles ? cssStyles !== void 0 ? css(propStyles, cssStyles) : css(propStyles) : css(cssStyles)
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function splitStyleProps(styleProps) {
|
|
81
|
+
let propStyles
|
|
82
|
+
let cssStyles
|
|
83
|
+
const keys = Object.keys(styleProps)
|
|
84
|
+
for (let i = 0; i < keys.length; i++) {
|
|
85
|
+
const key = keys[i]
|
|
86
|
+
const value = styleProps[key]
|
|
87
|
+
if (value === void 0) continue
|
|
88
|
+
if (key === 'css') cssStyles = value
|
|
89
|
+
else (propStyles ||= {})[key] = value
|
|
90
|
+
}
|
|
91
|
+
return [propStyles, cssStyles]
|
|
92
|
+
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type { FunctionComponent } from 'react'
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
3
2
|
import type { HstackProperties } from '../patterns/hstack';
|
|
4
3
|
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
-
import type { DistributiveOmit } from '../types/system
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
6
5
|
|
|
7
|
-
export interface HstackProps extends HstackProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof HstackProperties
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare const HStack: FunctionComponent<HstackProps>
|
|
6
|
+
export interface HstackProps extends HstackProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof HstackProperties> {}
|
|
7
|
+
export declare const HStack: FunctionComponent<HstackProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { hstack } from '../patterns/hstack';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { styled } from './factory';
|
|
5
|
+
|
|
6
|
+
export const HStack = /* @__PURE__ */ forwardRef(function HStack(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, hstack.propKeys)
|
|
8
|
+
const styleProps = hstack.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
10
|
+
return createElement(styled["div"], mergedProps)
|
|
11
|
+
})
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
1
|
export * from './factory';
|
|
3
2
|
export * from './is-valid-prop';
|
|
4
|
-
export * from './create-
|
|
3
|
+
export * from './create-recipe-context';
|
|
4
|
+
export * from './create-slot-recipe-context';
|
|
5
|
+
export * from './aspect-ratio';
|
|
6
|
+
export * from './bleed';
|
|
5
7
|
export * from './box';
|
|
6
|
-
export * from './flex';
|
|
7
|
-
export * from './stack';
|
|
8
|
-
export * from './vstack';
|
|
9
|
-
export * from './hstack';
|
|
10
|
-
export * from './spacer';
|
|
11
|
-
export * from './square';
|
|
12
|
-
export * from './circle';
|
|
13
8
|
export * from './center';
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './aspect-ratio';
|
|
16
|
-
export * from './grid';
|
|
17
|
-
export * from './grid-item';
|
|
18
|
-
export * from './wrap';
|
|
9
|
+
export * from './circle';
|
|
19
10
|
export * from './container';
|
|
11
|
+
export * from './cq';
|
|
20
12
|
export * from './divider';
|
|
13
|
+
export * from './flex';
|
|
21
14
|
export * from './float';
|
|
22
|
-
export * from './
|
|
15
|
+
export * from './grid';
|
|
16
|
+
export * from './grid-item';
|
|
17
|
+
export * from './hstack';
|
|
18
|
+
export * from './link-overlay';
|
|
19
|
+
export * from './spacer';
|
|
20
|
+
export * from './square';
|
|
21
|
+
export * from './stack';
|
|
23
22
|
export * from './visually-hidden';
|
|
24
|
-
export * from './
|
|
25
|
-
export
|
|
23
|
+
export * from './vstack';
|
|
24
|
+
export * from './wrap';
|
|
25
|
+
export { HTMLStyledProps, StyledComponent, Styled, StyledVariantProps, JsxFactoryOptions, ComponentProps, DataAttrs, AsProps } from '../types/jsx';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export * from './factory';
|
|
2
|
+
export * from './is-valid-prop';
|
|
3
|
+
export * from './create-recipe-context';
|
|
4
|
+
export * from './create-slot-recipe-context';
|
|
5
|
+
export * from './aspect-ratio';
|
|
6
|
+
export * from './bleed';
|
|
7
|
+
export * from './box';
|
|
8
|
+
export * from './center';
|
|
9
|
+
export * from './circle';
|
|
10
|
+
export * from './container';
|
|
11
|
+
export * from './cq';
|
|
12
|
+
export * from './divider';
|
|
13
|
+
export * from './flex';
|
|
14
|
+
export * from './float';
|
|
15
|
+
export * from './grid';
|
|
16
|
+
export * from './grid-item';
|
|
17
|
+
export * from './hstack';
|
|
18
|
+
export * from './link-overlay';
|
|
19
|
+
export * from './spacer';
|
|
20
|
+
export * from './square';
|
|
21
|
+
export * from './stack';
|
|
22
|
+
export * from './visually-hidden';
|
|
23
|
+
export * from './vstack';
|
|
24
|
+
export * from './wrap';
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import type { DistributiveOmit, HTMLPandaProps, JsxStyleProps, Pretty } from '../types';
|
|
1
|
+
import type { DistributiveOmit, JsxStyleProps } from '../types/system';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
declare const splitCssProps: <T>(props: T) => [JsxStyleProps, OmittedCssProps<T>]
|
|
10
|
-
|
|
11
|
-
export { isCssProperty, splitCssProps };
|
|
3
|
+
export type CssPropKey = keyof JsxStyleProps;
|
|
4
|
+
export type OmittedCssProps<T> = DistributiveOmit<T, CssPropKey>;
|
|
5
|
+
export declare function isCssProperty(value: string): boolean;
|
|
6
|
+
export declare function splitCssProps<T>(props: T): [JsxStyleProps, OmittedCssProps<T>];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { splitProps } from '../helpers';
|
|
2
|
+
|
|
3
|
+
const cssPropertySet = new Set(["2xl","2xlDown","2xlOnly","@/2xl","@/2xlDown","@/2xlOnly","@/2xlTo3xl","@/2xlTo4xl","@/2xlTo5xl","@/2xlTo6xl","@/2xlTo7xl","@/2xlTo8xl","@/2xs","@/2xsDown","@/2xsOnly","@/2xsTo2xl","@/2xsTo3xl","@/2xsTo4xl","@/2xsTo5xl","@/2xsTo6xl","@/2xsTo7xl","@/2xsTo8xl","@/2xsToLg","@/2xsToMd","@/2xsToSm","@/2xsToXl","@/2xsToXs","@/3xl","@/3xlDown","@/3xlOnly","@/3xlTo4xl","@/3xlTo5xl","@/3xlTo6xl","@/3xlTo7xl","@/3xlTo8xl","@/3xs","@/3xsDown","@/3xsOnly","@/3xsTo2xl","@/3xsTo2xs","@/3xsTo3xl","@/3xsTo4xl","@/3xsTo5xl","@/3xsTo6xl","@/3xsTo7xl","@/3xsTo8xl","@/3xsToLg","@/3xsToMd","@/3xsToSm","@/3xsToXl","@/3xsToXs","@/4xl","@/4xlDown","@/4xlOnly","@/4xlTo5xl","@/4xlTo6xl","@/4xlTo7xl","@/4xlTo8xl","@/5xl","@/5xlDown","@/5xlOnly","@/5xlTo6xl","@/5xlTo7xl","@/5xlTo8xl","@/6xl","@/6xlDown","@/6xlOnly","@/6xlTo7xl","@/6xlTo8xl","@/7xl","@/7xlDown","@/7xlOnly","@/7xlTo8xl","@/8xl","@/8xlDown","@/8xlOnly","@/lg","@/lgDown","@/lgOnly","@/lgTo2xl","@/lgTo3xl","@/lgTo4xl","@/lgTo5xl","@/lgTo6xl","@/lgTo7xl","@/lgTo8xl","@/lgToXl","@/md","@/mdDown","@/mdOnly","@/mdTo2xl","@/mdTo3xl","@/mdTo4xl","@/mdTo5xl","@/mdTo6xl","@/mdTo7xl","@/mdTo8xl","@/mdToLg","@/mdToXl","@/sm","@/smDown","@/smOnly","@/smTo2xl","@/smTo3xl","@/smTo4xl","@/smTo5xl","@/smTo6xl","@/smTo7xl","@/smTo8xl","@/smToLg","@/smToMd","@/smToXl","@/xl","@/xlDown","@/xlOnly","@/xlTo2xl","@/xlTo3xl","@/xlTo4xl","@/xlTo5xl","@/xlTo6xl","@/xlTo7xl","@/xlTo8xl","@/xs","@/xsDown","@/xsOnly","@/xsTo2xl","@/xsTo3xl","@/xsTo4xl","@/xsTo5xl","@/xsTo6xl","@/xsTo7xl","@/xsTo8xl","@/xsToLg","@/xsToMd","@/xsToSm","@/xsToXl","WebkitAppearance","WebkitBorderBefore","WebkitBorderBeforeColor","WebkitBorderBeforeStyle","WebkitBorderBeforeWidth","WebkitBoxReflect","WebkitLineClamp","WebkitMask","WebkitMaskAttachment","WebkitMaskClip","WebkitMaskComposite","WebkitMaskImage","WebkitMaskOrigin","WebkitMaskPosition","WebkitMaskPositionX","WebkitMaskPositionY","WebkitMaskRepeat","WebkitMaskRepeatX","WebkitMaskRepeatY","WebkitMaskSize","WebkitOverflowScrolling","WebkitTapHighlightColor","WebkitTextFillColor","WebkitTextStroke","WebkitTextStrokeColor","WebkitTextStrokeWidth","WebkitTouchCallout","WebkitUserModify","WebkitUserSelect","_active","_aeonActive","_aeonChecked","_aeonClosed","_aeonCollapsed","_aeonDocked","_aeonEmpty","_aeonExpanded","_aeonFailure","_aeonFloating","_aeonHidden","_aeonInactive","_aeonInvalid","_aeonOpen","_aeonOverlayOpen","_aeonPending","_aeonReady","_aeonSelected","_aeonSuccess","_after","_anyPointerCoarse","_anyPointerFine","_anyPointerNone","_atValue","_autofill","_backdrop","_before","_checked","_closed","_complete","_current","_currentPage","_currentStep","_dark","_default","_disabled","_dragging","_empty","_enabled","_even","_expanded","_file","_first","_firstLetter","_firstLine","_firstOfType","_focus","_focusVisible","_focusWithin","_fullscreen","_grabbed","_groupActive","_groupChecked","_groupDisabled","_groupExpanded","_groupFocus","_groupFocusVisible","_groupFocusWithin","_groupHover","_groupInvalid","_hidden","_highContrast","_highlighted","_horizontal","_hover","_icon","_inRange","_incomplete","_indeterminate","_inert","_invalid","_invertedColors","_landscape","_last","_lastOfType","_lessContrast","_light","_loading","_ltr","_marker","_moreContrast","_motionReduce","_motionSafe","_noscript","_now","_odd","_only","_onlyOfType","_open","_optional","_osDark","_osLight","_outOfRange","_overValue","_peerActive","_peerChecked","_peerDisabled","_peerExpanded","_peerFocus","_peerFocusVisible","_peerFocusWithin","_peerHover","_peerInvalid","_peerPlaceholderShown","_placeholder","_placeholderShown","_pointerCoarse","_pointerFine","_pointerNone","_portrait","_pressed","_print","_rangeEnd","_rangeStart","_readOnly","_readWrite","_required","_rtl","_scrollbar","_scrollbarThumb","_scrollbarTrack","_selected","_selection","_starting","_target","_today","_topmost","_unavailable","_underValue","_userInvalid","_userValid","_valid","_vertical","_visited","accentColor","alignContent","alignItems","alignSelf","alignTracks","alignmentBaseline","all","anchorName","anchorScope","animation","animationComposition","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationRange","animationRangeEnd","animationRangeStart","animationState","animationTimeline","animationTimingFunction","appearance","aspectRatio","backdropBlur","backdropBrightness","backdropContrast","backdropFilter","backdropGrayscale","backdropHueRotate","backdropInvert","backdropOpacity","backdropSaturate","backdropSepia","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundConic","backgroundGradient","backgroundImage","backgroundLinear","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRadial","backgroundRepeat","backgroundSize","base","baselineShift","bg","bgAttachment","bgBlendMode","bgClip","bgColor","bgConic","bgGradient","bgImage","bgLinear","bgOrigin","bgPosition","bgPositionX","bgPositionY","bgRadial","bgRepeat","bgSize","blockSize","blur","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderEnd","borderEndColor","borderEndEndRadius","borderEndRadius","borderEndStartRadius","borderEndWidth","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderInline","borderInlineColor","borderInlineEnd","borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth","borderInlineStart","borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth","borderInlineStyle","borderInlineWidth","borderLeft","borderLeftColor","borderLeftRadius","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightRadius","borderRightStyle","borderRightWidth","borderSpacing","borderSpacingX","borderSpacingY","borderStart","borderStartColor","borderStartEndRadius","borderStartRadius","borderStartStartRadius","borderStartWidth","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","borderX","borderXColor","borderXWidth","borderY","borderYColor","borderYWidth","bottom","boxAlign","boxDecorationBreak","boxDirection","boxFlex","boxFlexGroup","boxLines","boxOrdinalGroup","boxOrient","boxPack","boxShadow","boxShadowColor","boxSize","boxSizing","breakAfter","breakBefore","breakInside","brightness","captionSide","caret","caretColor","caretShape","clear","clip","clipPath","clipRule","color","colorInterpolation","colorInterpolationFilters","colorPalette","colorRendering","colorScheme","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","containIntrinsicBlockSize","containIntrinsicHeight","containIntrinsicInlineSize","containIntrinsicSize","containIntrinsicWidth","container","containerName","containerType","content","contentVisibility","contrast","counterIncrement","counterReset","counterSet","css","cursor","cx","cy","d","debug","direction","display","divideColor","divideStyle","divideX","divideY","dominantBaseline","dropShadow","emptyCells","end","fieldSizing","fill","fillOpacity","fillRule","filter","flex","flexBasis","flexDir","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","floodColor","floodOpacity","focusRing","focusRingColor","focusRingOffset","focusRingStyle","focusRingWidth","focusVisibleRing","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontOpticalSizing","fontPalette","fontSize","fontSizeAdjust","fontSmooth","fontSmoothing","fontStretch","fontStyle","fontSynthesis","fontSynthesisPosition","fontSynthesisSmallCaps","fontSynthesisStyle","fontSynthesisWeight","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantEmoji","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontVariationSettings","fontWeight","fontWidth","forcedColorAdjust","gap","glyphOrientationVertical","gradientFrom","gradientFromPosition","gradientTo","gradientToPosition","gradientVia","gradientViaPosition","grayscale","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","h","hangingPunctuation","height","hideBelow","hideFrom","hueRotate","hyphenateCharacter","hyphenateLimitChars","hyphens","imageOrientation","imageRendering","imageResolution","imeMode","initialLetter","initialLetterAlign","inlineSize","inset","insetBlock","insetBlockEnd","insetBlockStart","insetEnd","insetInline","insetInlineEnd","insetInlineStart","insetStart","insetX","insetY","interpolateSize","invert","isolation","justifyContent","justifyItems","justifySelf","justifyTracks","left","letterSpacing","lg","lgDown","lgOnly","lgTo2xl","lgToXl","lightingColor","lineBreak","lineClamp","lineHeight","lineHeightStep","listStyle","listStyleImage","listStylePosition","listStyleType","m","margin","marginBlock","marginBlockEnd","marginBlockStart","marginBottom","marginEnd","marginInline","marginInlineEnd","marginInlineStart","marginLeft","marginRight","marginStart","marginTop","marginTrim","marginX","marginY","marker","markerEnd","markerMid","markerStart","mask","maskBorder","maskBorderMode","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskBottomFrom","maskBottomFromColor","maskBottomTo","maskBottomToColor","maskClip","maskComposite","maskConic","maskConicFrom","maskConicFromColor","maskConicTo","maskConicToColor","maskImage","maskLeftFrom","maskLeftFromColor","maskLeftTo","maskLeftToColor","maskLinear","maskLinearFrom","maskLinearFromColor","maskLinearTo","maskLinearToColor","maskMode","maskOrigin","maskPosition","maskRadial","maskRadialAt","maskRadialFrom","maskRadialFromColor","maskRadialShape","maskRadialSize","maskRadialTo","maskRadialToColor","maskRepeat","maskRightFrom","maskRightFromColor","maskRightTo","maskRightToColor","maskSize","maskTopFrom","maskTopFromColor","maskTopTo","maskTopToColor","maskType","maskXFrom","maskXFromColor","maskXTo","maskXToColor","maskYFrom","maskYFromColor","maskYTo","maskYToColor","masonryAutoFlow","mathDepth","mathShift","mathStyle","maxBlockSize","maxH","maxHeight","maxInlineSize","maxLines","maxW","maxWidth","mb","md","mdDown","mdOnly","mdTo2xl","mdToLg","mdToXl","me","minBlockSize","minH","minHeight","minInlineSize","minW","minWidth","mixBlendMode","ml","mr","ms","mt","mx","my","objectFit","objectPosition","objectViewBox","offset","offsetAnchor","offsetDistance","offsetPath","offsetPosition","offsetRotate","opacity","order","orphans","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowBlock","overflowClipBox","overflowClipMargin","overflowInline","overflowWrap","overflowX","overflowY","overlay","overscrollBehavior","overscrollBehaviorBlock","overscrollBehaviorInline","overscrollBehaviorX","overscrollBehaviorY","p","padding","paddingBlock","paddingBlockEnd","paddingBlockStart","paddingBottom","paddingEnd","paddingInline","paddingInlineEnd","paddingInlineStart","paddingLeft","paddingRight","paddingStart","paddingTop","paddingX","paddingY","page","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","pb","pe","perspective","perspectiveOrigin","pl","placeContent","placeItems","placeSelf","pointerEvents","pos","position","positionAnchor","positionArea","positionTry","positionTryFallbacks","positionTryOrder","positionVisibility","pr","printColorAdjust","ps","pt","px","py","quotes","r","resize","right","ring","ringColor","ringOffset","ringWidth","rotate","rotateX","rotateY","rotateZ","rounded","roundedBottom","roundedBottomLeft","roundedBottomRight","roundedEnd","roundedEndEnd","roundedEndStart","roundedLeft","roundedRight","roundedStart","roundedStartEnd","roundedStartStart","roundedTop","roundedTopLeft","roundedTopRight","rowGap","rubyAlign","rubyMerge","rubyOverhang","rubyPosition","rx","ry","saturate","scale","scaleX","scaleY","scrollBehavior","scrollInitialTarget","scrollMargin","scrollMarginBlock","scrollMarginBlockEnd","scrollMarginBlockStart","scrollMarginBottom","scrollMarginInline","scrollMarginInlineEnd","scrollMarginInlineStart","scrollMarginLeft","scrollMarginRight","scrollMarginTop","scrollMarginX","scrollMarginY","scrollPadding","scrollPaddingBlock","scrollPaddingBlockEnd","scrollPaddingBlockStart","scrollPaddingBottom","scrollPaddingInline","scrollPaddingInlineEnd","scrollPaddingInlineStart","scrollPaddingLeft","scrollPaddingRight","scrollPaddingTop","scrollPaddingX","scrollPaddingY","scrollSnapAlign","scrollSnapCoordinate","scrollSnapDestination","scrollSnapMargin","scrollSnapMarginBottom","scrollSnapMarginLeft","scrollSnapMarginRight","scrollSnapMarginTop","scrollSnapPointsX","scrollSnapPointsY","scrollSnapStop","scrollSnapStrictness","scrollSnapType","scrollSnapTypeX","scrollSnapTypeY","scrollTimeline","scrollTimelineAxis","scrollTimelineName","scrollbar","scrollbarColor","scrollbarGutter","scrollbarThumb","scrollbarTrack","scrollbarWidth","sepia","shadow","shadowColor","shapeImageThreshold","shapeMargin","shapeOutside","shapeRendering","sm","smDown","smOnly","smTo2xl","smToLg","smToMd","smToXl","spaceX","spaceY","speakAs","srOnly","start","stopColor","stopOpacity","stroke","strokeColor","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","tableLayout","textAlign","textAlignLast","textAnchor","textAutospace","textBox","textBoxEdge","textBoxTrim","textCombineUpright","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkip","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textEmphasis","textEmphasisColor","textEmphasisPosition","textEmphasisStyle","textGradient","textIndent","textJustify","textOrientation","textOverflow","textRendering","textShadow","textShadowColor","textSizeAdjust","textSpacingTrim","textStyle","textTransform","textUnderlineOffset","textUnderlinePosition","textWrap","textWrapMode","textWrapStyle","timelineScope","top","touchAction","transform","transformBox","transformOrigin","transformStyle","transition","transitionBehavior","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","truncate","unicodeBidi","userSelect","vectorEffect","verticalAlign","viewTimeline","viewTimelineAxis","viewTimelineInset","viewTimelineName","viewTransitionClass","viewTransitionName","visibility","w","whiteSpace","whiteSpaceCollapse","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","x","xl","xlDown","xlOnly","xlTo2xl","y","z","zIndex","zoom"])
|
|
4
|
+
const cssPropertySelectorRe = /&|@/
|
|
5
|
+
|
|
6
|
+
export function isCssProperty(value) {
|
|
7
|
+
return cssPropertySet.has(value) || value.startsWith("--") || cssPropertySelectorRe.test(value)
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function splitCssProps(props) {
|
|
11
|
+
return splitProps(props, isCssProperty)
|
|
12
|
+
}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type { FunctionComponent } from 'react'
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
3
2
|
import type { LinkOverlayProperties } from '../patterns/link-overlay';
|
|
4
3
|
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
-
import type { DistributiveOmit } from '../types/system
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
6
5
|
|
|
7
|
-
export interface LinkOverlayProps extends LinkOverlayProperties, DistributiveOmit<HTMLStyledProps<'a'>, keyof LinkOverlayProperties
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare const LinkOverlay: FunctionComponent<LinkOverlayProps>
|
|
6
|
+
export interface LinkOverlayProps extends LinkOverlayProperties, DistributiveOmit<HTMLStyledProps<'a'>, keyof LinkOverlayProperties> {}
|
|
7
|
+
export declare const LinkOverlay: FunctionComponent<LinkOverlayProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { linkOverlay } from '../patterns/link-overlay';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { styled } from './factory';
|
|
5
|
+
|
|
6
|
+
export const LinkOverlay = /* @__PURE__ */ forwardRef(function LinkOverlay(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, linkOverlay.propKeys)
|
|
8
|
+
const styleProps = linkOverlay.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
10
|
+
return createElement(styled["a"], mergedProps)
|
|
11
|
+
})
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type { FunctionComponent } from 'react'
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
3
2
|
import type { SpacerProperties } from '../patterns/spacer';
|
|
4
3
|
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
-
import type { DistributiveOmit } from '../types/system
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
6
5
|
|
|
7
|
-
export interface SpacerProps extends SpacerProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof SpacerProperties
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare const Spacer: FunctionComponent<SpacerProps>
|
|
6
|
+
export interface SpacerProps extends SpacerProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof SpacerProperties> {}
|
|
7
|
+
export declare const Spacer: FunctionComponent<SpacerProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { spacer } from '../patterns/spacer';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { styled } from './factory';
|
|
5
|
+
|
|
6
|
+
export const Spacer = /* @__PURE__ */ forwardRef(function Spacer(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, spacer.propKeys)
|
|
8
|
+
const styleProps = spacer.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
10
|
+
return createElement(styled["div"], mergedProps)
|
|
11
|
+
})
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type { FunctionComponent } from 'react'
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
3
2
|
import type { SquareProperties } from '../patterns/square';
|
|
4
3
|
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
-
import type { DistributiveOmit } from '../types/system
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
6
5
|
|
|
7
|
-
export interface SquareProps extends SquareProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof SquareProperties
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare const Square: FunctionComponent<SquareProps>
|
|
6
|
+
export interface SquareProps extends SquareProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof SquareProperties> {}
|
|
7
|
+
export declare const Square: FunctionComponent<SquareProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { square } from '../patterns/square';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { styled } from './factory';
|
|
5
|
+
|
|
6
|
+
export const Square = /* @__PURE__ */ forwardRef(function Square(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, square.propKeys)
|
|
8
|
+
const styleProps = square.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
10
|
+
return createElement(styled["div"], mergedProps)
|
|
11
|
+
})
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type { FunctionComponent } from 'react'
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
3
2
|
import type { StackProperties } from '../patterns/stack';
|
|
4
3
|
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
-
import type { DistributiveOmit } from '../types/system
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
6
5
|
|
|
7
|
-
export interface StackProps extends StackProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof StackProperties
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare const Stack: FunctionComponent<StackProps>
|
|
6
|
+
export interface StackProps extends StackProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof StackProperties> {}
|
|
7
|
+
export declare const Stack: FunctionComponent<StackProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { stack } from '../patterns/stack';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { styled } from './factory';
|
|
5
|
+
|
|
6
|
+
export const Stack = /* @__PURE__ */ forwardRef(function Stack(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, stack.propKeys)
|
|
8
|
+
const styleProps = stack.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
10
|
+
return createElement(styled["div"], mergedProps)
|
|
11
|
+
})
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type { FunctionComponent } from 'react'
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
3
2
|
import type { VisuallyHiddenProperties } from '../patterns/visually-hidden';
|
|
4
3
|
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
-
import type { DistributiveOmit } from '../types/system
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
6
5
|
|
|
7
|
-
export interface VisuallyHiddenProps extends VisuallyHiddenProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof VisuallyHiddenProperties
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare const VisuallyHidden: FunctionComponent<VisuallyHiddenProps>
|
|
6
|
+
export interface VisuallyHiddenProps extends VisuallyHiddenProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof VisuallyHiddenProperties> {}
|
|
7
|
+
export declare const VisuallyHidden: FunctionComponent<VisuallyHiddenProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { visuallyHidden } from '../patterns/visually-hidden';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { styled } from './factory';
|
|
5
|
+
|
|
6
|
+
export const VisuallyHidden = /* @__PURE__ */ forwardRef(function VisuallyHidden(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, visuallyHidden.propKeys)
|
|
8
|
+
const styleProps = visuallyHidden.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
10
|
+
return createElement(styled["div"], mergedProps)
|
|
11
|
+
})
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type { FunctionComponent } from 'react'
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
3
2
|
import type { VstackProperties } from '../patterns/vstack';
|
|
4
3
|
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
-
import type { DistributiveOmit } from '../types/system
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
6
5
|
|
|
7
|
-
export interface VstackProps extends VstackProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof VstackProperties
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare const VStack: FunctionComponent<VstackProps>
|
|
6
|
+
export interface VstackProps extends VstackProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof VstackProperties> {}
|
|
7
|
+
export declare const VStack: FunctionComponent<VstackProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { vstack } from '../patterns/vstack';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { styled } from './factory';
|
|
5
|
+
|
|
6
|
+
export const VStack = /* @__PURE__ */ forwardRef(function VStack(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, vstack.propKeys)
|
|
8
|
+
const styleProps = vstack.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
10
|
+
return createElement(styled["div"], mergedProps)
|
|
11
|
+
})
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type { FunctionComponent } from 'react'
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
3
2
|
import type { WrapProperties } from '../patterns/wrap';
|
|
4
3
|
import type { HTMLStyledProps } from '../types/jsx';
|
|
5
|
-
import type { DistributiveOmit } from '../types/system
|
|
4
|
+
import type { DistributiveOmit } from '../types/system';
|
|
6
5
|
|
|
7
|
-
export interface WrapProps extends WrapProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof WrapProperties
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare const Wrap: FunctionComponent<WrapProps>
|
|
6
|
+
export interface WrapProps extends WrapProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof WrapProperties> {}
|
|
7
|
+
export declare const Wrap: FunctionComponent<WrapProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { wrap } from '../patterns/wrap';
|
|
3
|
+
import { splitProps } from '../helpers';
|
|
4
|
+
import { styled } from './factory';
|
|
5
|
+
|
|
6
|
+
export const Wrap = /* @__PURE__ */ forwardRef(function Wrap(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, wrap.propKeys)
|
|
8
|
+
const styleProps = wrap.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
10
|
+
return createElement(styled["div"], mergedProps)
|
|
11
|
+
})
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
-
import type { Properties } from '../types/csstype';
|
|
4
|
-
import type { SystemProperties } from '../types/style-props';
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
-
import type { Tokens } from '../tokens/index';
|
|
1
|
+
import type { ConditionalValue, SystemStyleObject } from '../types/system';
|
|
7
2
|
|
|
8
3
|
export interface AspectRatioProperties {
|
|
9
|
-
|
|
4
|
+
ratio?: ConditionalValue<number>
|
|
10
5
|
}
|
|
11
6
|
|
|
12
|
-
|
|
7
|
+
type AspectRatioRestStyles = Omit<SystemStyleObject, keyof AspectRatioProperties | "aspectRatio">
|
|
8
|
+
|
|
9
|
+
interface AspectRatioStyles extends AspectRatioProperties, AspectRatioRestStyles {}
|
|
13
10
|
|
|
14
11
|
interface AspectRatioPatternFn {
|
|
15
12
|
(styles?: AspectRatioStyles): string
|
|
16
13
|
raw: (styles?: AspectRatioStyles) => SystemStyleObject
|
|
14
|
+
propKeys: Array<keyof AspectRatioProperties>
|
|
17
15
|
}
|
|
18
16
|
|
|
17
|
+
export declare function aspectRatioRaw(styles?: AspectRatioStyles): SystemStyleObject;
|
|
19
18
|
|
|
20
|
-
export declare const aspectRatio: AspectRatioPatternFn;
|
|
19
|
+
export declare const aspectRatio: AspectRatioPatternFn;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const aspectRatioConfig = { transform(props, { map }) {
|
|
6
|
+
const { ratio = 4 / 3, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
position: "relative",
|
|
9
|
+
_before: {
|
|
10
|
+
content: `""`,
|
|
11
|
+
display: "block",
|
|
12
|
+
height: "0",
|
|
13
|
+
paddingBottom: map(ratio, (r) => `${1 / r * 100}%`)
|
|
14
|
+
},
|
|
15
|
+
"&>*": {
|
|
16
|
+
display: "flex",
|
|
17
|
+
justifyContent: "center",
|
|
18
|
+
alignItems: "center",
|
|
19
|
+
overflow: "hidden",
|
|
20
|
+
position: "absolute",
|
|
21
|
+
inset: "0",
|
|
22
|
+
width: "100%",
|
|
23
|
+
height: "100%"
|
|
24
|
+
},
|
|
25
|
+
"&>img, &>video": { objectFit: "cover" },
|
|
26
|
+
...rest
|
|
27
|
+
};
|
|
28
|
+
} }
|
|
29
|
+
|
|
30
|
+
export function aspectRatioRaw(styles) {
|
|
31
|
+
const s = getPatternStyles(aspectRatioConfig, styles || {})
|
|
32
|
+
return aspectRatioConfig.transform(s, patternFns)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const aspectRatio = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function aspectRatio(styles = {}) {
|
|
36
|
+
return css(aspectRatioRaw(styles))
|
|
37
|
+
}), { raw: aspectRatioRaw, propKeys: ["ratio"] })
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
-
import type { Properties } from '../types/csstype';
|
|
4
|
-
import type { SystemProperties } from '../types/style-props';
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
-
import type { Tokens } from '../tokens/index';
|
|
1
|
+
import type { SystemProperties, SystemStyleObject } from '../types/system';
|
|
7
2
|
|
|
8
3
|
export interface BleedProperties {
|
|
9
|
-
|
|
10
|
-
|
|
4
|
+
block?: SystemProperties["marginBlock"]
|
|
5
|
+
inline?: SystemProperties["marginInline"]
|
|
11
6
|
}
|
|
12
7
|
|
|
13
|
-
|
|
8
|
+
type BleedRestStyles = Omit<SystemStyleObject, keyof BleedProperties>
|
|
9
|
+
|
|
10
|
+
interface BleedStyles extends BleedProperties, BleedRestStyles {}
|
|
14
11
|
|
|
15
12
|
interface BleedPatternFn {
|
|
16
13
|
(styles?: BleedStyles): string
|
|
17
14
|
raw: (styles?: BleedStyles) => SystemStyleObject
|
|
15
|
+
propKeys: Array<keyof BleedProperties>
|
|
18
16
|
}
|
|
19
17
|
|
|
18
|
+
export declare function bleedRaw(styles?: BleedStyles): SystemStyleObject;
|
|
20
19
|
|
|
21
|
-
export declare const bleed: BleedPatternFn;
|
|
20
|
+
export declare const bleed: BleedPatternFn;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from './runtime';
|
|
2
|
+
import { memo } from '../helpers';
|
|
3
|
+
import { css } from '../css/index';
|
|
4
|
+
|
|
5
|
+
const bleedConfig = {
|
|
6
|
+
transform(props, { map, isCssUnit, isCssVar }) {
|
|
7
|
+
const { inline, block, ...rest } = props;
|
|
8
|
+
const valueFn = (v) => isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`;
|
|
9
|
+
return {
|
|
10
|
+
"--bleed-x": map(inline, valueFn),
|
|
11
|
+
"--bleed-y": map(block, valueFn),
|
|
12
|
+
marginInline: "calc(var(--bleed-x, 0) * -1)",
|
|
13
|
+
marginBlock: "calc(var(--bleed-y, 0) * -1)",
|
|
14
|
+
...rest
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
defaultValues: {
|
|
18
|
+
inline: "0",
|
|
19
|
+
block: "0"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function bleedRaw(styles) {
|
|
24
|
+
const s = getPatternStyles(bleedConfig, styles || {})
|
|
25
|
+
return bleedConfig.transform(s, patternFns)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export const bleed = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function bleed(styles = {}) {
|
|
29
|
+
return css(bleedRaw(styles))
|
|
30
|
+
}), { raw: bleedRaw, propKeys: ["block","inline"] })
|