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
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
// src/assert.ts
|
|
2
|
-
function isObject(value) {
|
|
3
|
-
return typeof value === "object" && value != null && !Array.isArray(value);
|
|
4
|
-
}
|
|
5
|
-
var isObjectOrArray = (obj) => typeof obj === "object" && obj !== null;
|
|
6
|
-
|
|
7
|
-
// src/compact.ts
|
|
8
|
-
function compact(value) {
|
|
9
|
-
return Object.fromEntries(Object.entries(value ?? {}).filter(([_, value2]) => value2 !== void 0));
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// src/condition.ts
|
|
13
|
-
var isBaseCondition = (v) => v === "base";
|
|
14
|
-
function filterBaseConditions(c) {
|
|
15
|
-
return c.slice().filter((v) => !isBaseCondition(v));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// src/hash.ts
|
|
19
|
-
function toChar(code) {
|
|
20
|
-
return String.fromCharCode(code + (code > 25 ? 39 : 97));
|
|
21
|
-
}
|
|
22
|
-
function toName(code) {
|
|
23
|
-
let name = "";
|
|
24
|
-
let x;
|
|
25
|
-
for (x = Math.abs(code); x > 52; x = x / 52 | 0) name = toChar(x % 52) + name;
|
|
26
|
-
return toChar(x % 52) + name;
|
|
27
|
-
}
|
|
28
|
-
function toPhash(h, x) {
|
|
29
|
-
let i = x.length;
|
|
30
|
-
while (i) h = h * 33 ^ x.charCodeAt(--i);
|
|
31
|
-
return h;
|
|
32
|
-
}
|
|
33
|
-
function toHash(value) {
|
|
34
|
-
return toName(toPhash(5381, value) >>> 0);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// src/important.ts
|
|
38
|
-
var importantRegex = /\s*!(important)?/i;
|
|
39
|
-
function isImportant(value) {
|
|
40
|
-
return typeof value === "string" ? importantRegex.test(value) : false;
|
|
41
|
-
}
|
|
42
|
-
function withoutImportant(value) {
|
|
43
|
-
return typeof value === "string" ? value.replace(importantRegex, "").trim() : value;
|
|
44
|
-
}
|
|
45
|
-
function withoutSpace(str) {
|
|
46
|
-
return typeof str === "string" ? str.replaceAll(" ", "_") : str;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// src/memo.ts
|
|
50
|
-
var memo = (fn) => {
|
|
51
|
-
const cache = /* @__PURE__ */ new Map();
|
|
52
|
-
const get = (...args) => {
|
|
53
|
-
const key = JSON.stringify(args);
|
|
54
|
-
if (cache.has(key)) {
|
|
55
|
-
return cache.get(key);
|
|
56
|
-
}
|
|
57
|
-
const result = fn(...args);
|
|
58
|
-
cache.set(key, result);
|
|
59
|
-
return result;
|
|
60
|
-
};
|
|
61
|
-
return get;
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
// src/merge-props.ts
|
|
65
|
-
var MERGE_OMIT = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
66
|
-
function mergeProps(...sources) {
|
|
67
|
-
return sources.reduce((prev, obj) => {
|
|
68
|
-
if (!obj) return prev;
|
|
69
|
-
Object.keys(obj).forEach((key) => {
|
|
70
|
-
if (MERGE_OMIT.has(key)) return;
|
|
71
|
-
const prevValue = prev[key];
|
|
72
|
-
const value = obj[key];
|
|
73
|
-
if (isObject(prevValue) && isObject(value)) {
|
|
74
|
-
prev[key] = mergeProps(prevValue, value);
|
|
75
|
-
} else {
|
|
76
|
-
prev[key] = value;
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
return prev;
|
|
80
|
-
}, {});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
// src/walk-object.ts
|
|
84
|
-
var isNotNullish = (element) => element != null;
|
|
85
|
-
function walkObject(target, predicate, options = {}) {
|
|
86
|
-
const { stop, getKey } = options;
|
|
87
|
-
function inner(value, path = []) {
|
|
88
|
-
if (isObjectOrArray(value)) {
|
|
89
|
-
const result = {};
|
|
90
|
-
for (const [prop, child] of Object.entries(value)) {
|
|
91
|
-
const key = getKey?.(prop, child) ?? prop;
|
|
92
|
-
const childPath = [...path, key];
|
|
93
|
-
if (stop?.(value, childPath)) {
|
|
94
|
-
return predicate(value, path);
|
|
95
|
-
}
|
|
96
|
-
const next = inner(child, childPath);
|
|
97
|
-
if (isNotNullish(next)) {
|
|
98
|
-
result[key] = next;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return result;
|
|
102
|
-
}
|
|
103
|
-
return predicate(value, path);
|
|
104
|
-
}
|
|
105
|
-
return inner(target);
|
|
106
|
-
}
|
|
107
|
-
function mapObject(obj, fn) {
|
|
108
|
-
if (Array.isArray(obj)) return obj.map((value) => fn(value));
|
|
109
|
-
if (!isObject(obj)) return fn(obj);
|
|
110
|
-
return walkObject(obj, (value) => fn(value));
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// src/normalize-style-object.ts
|
|
114
|
-
function toResponsiveObject(values, breakpoints) {
|
|
115
|
-
return values.reduce(
|
|
116
|
-
(acc, current, index) => {
|
|
117
|
-
const key = breakpoints[index];
|
|
118
|
-
if (current != null) {
|
|
119
|
-
acc[key] = current;
|
|
120
|
-
}
|
|
121
|
-
return acc;
|
|
122
|
-
},
|
|
123
|
-
{}
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
function normalizeStyleObject(styles, context, shorthand = true) {
|
|
127
|
-
const { utility, conditions } = context;
|
|
128
|
-
const { hasShorthand, resolveShorthand } = utility;
|
|
129
|
-
return walkObject(
|
|
130
|
-
styles,
|
|
131
|
-
(value) => {
|
|
132
|
-
return Array.isArray(value) ? toResponsiveObject(value, conditions.breakpoints.keys) : value;
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
stop: (value) => Array.isArray(value),
|
|
136
|
-
getKey: shorthand ? (prop) => hasShorthand ? resolveShorthand(prop) : prop : void 0
|
|
137
|
-
}
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// src/classname.ts
|
|
142
|
-
var fallbackCondition = {
|
|
143
|
-
shift: (v) => v,
|
|
144
|
-
finalize: (v) => v,
|
|
145
|
-
breakpoints: { keys: [] }
|
|
146
|
-
};
|
|
147
|
-
var sanitize = (value) => typeof value === "string" ? value.replaceAll(/[\n\s]+/g, " ") : value;
|
|
148
|
-
function createCss(context) {
|
|
149
|
-
const { utility, hash, conditions: conds = fallbackCondition } = context;
|
|
150
|
-
const formatClassName = (str) => [utility.prefix, str].filter(Boolean).join("-");
|
|
151
|
-
const hashFn = (conditions, className) => {
|
|
152
|
-
let result;
|
|
153
|
-
if (hash) {
|
|
154
|
-
const baseArray = [...conds.finalize(conditions), className];
|
|
155
|
-
result = formatClassName(utility.toHash(baseArray, toHash));
|
|
156
|
-
} else {
|
|
157
|
-
const baseArray = [...conds.finalize(conditions), formatClassName(className)];
|
|
158
|
-
result = baseArray.join(":");
|
|
159
|
-
}
|
|
160
|
-
return result;
|
|
161
|
-
};
|
|
162
|
-
return memo(({ base, ...styles } = {}) => {
|
|
163
|
-
const styleObject = Object.assign(styles, base);
|
|
164
|
-
const normalizedObject = normalizeStyleObject(styleObject, context);
|
|
165
|
-
const classNames = /* @__PURE__ */ new Set();
|
|
166
|
-
walkObject(normalizedObject, (value, paths) => {
|
|
167
|
-
if (value == null) return;
|
|
168
|
-
const important = isImportant(value);
|
|
169
|
-
const [prop, ...allConditions] = conds.shift(paths);
|
|
170
|
-
const conditions = filterBaseConditions(allConditions);
|
|
171
|
-
const transformed = utility.transform(prop, withoutImportant(sanitize(value)));
|
|
172
|
-
let className = hashFn(conditions, transformed.className);
|
|
173
|
-
if (important) className = `${className}!`;
|
|
174
|
-
classNames.add(className);
|
|
175
|
-
});
|
|
176
|
-
return Array.from(classNames).join(" ");
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
function compactStyles(...styles) {
|
|
180
|
-
return styles.flat().filter((style) => isObject(style) && Object.keys(compact(style)).length > 0);
|
|
181
|
-
}
|
|
182
|
-
function createMergeCss(context) {
|
|
183
|
-
function resolve(styles) {
|
|
184
|
-
const allStyles = compactStyles(...styles);
|
|
185
|
-
if (allStyles.length === 1) return allStyles;
|
|
186
|
-
return allStyles.map((style) => normalizeStyleObject(style, context));
|
|
187
|
-
}
|
|
188
|
-
function mergeCss(...styles) {
|
|
189
|
-
return mergeProps(...resolve(styles));
|
|
190
|
-
}
|
|
191
|
-
function assignCss(...styles) {
|
|
192
|
-
return Object.assign({}, ...resolve(styles));
|
|
193
|
-
}
|
|
194
|
-
return { mergeCss: memo(mergeCss), assignCss };
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
// src/hypenate-property.ts
|
|
198
|
-
var wordRegex = /([A-Z])/g;
|
|
199
|
-
var msRegex = /^ms-/;
|
|
200
|
-
var hypenateProperty = memo((property) => {
|
|
201
|
-
if (property.startsWith("--")) return property;
|
|
202
|
-
return property.replace(wordRegex, "-$1").replace(msRegex, "-ms-").toLowerCase();
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
// src/is-css-function.ts
|
|
206
|
-
var fns = ["min", "max", "clamp", "calc"];
|
|
207
|
-
var fnRegExp = new RegExp(`^(${fns.join("|")})\\(.*\\)`);
|
|
208
|
-
var isCssFunction = (v) => typeof v === "string" && fnRegExp.test(v);
|
|
209
|
-
|
|
210
|
-
// src/is-css-unit.ts
|
|
211
|
-
var lengthUnits = "cm,mm,Q,in,pc,pt,px,em,ex,ch,rem,lh,rlh,vw,vh,vmin,vmax,vb,vi,svw,svh,lvw,lvh,dvw,dvh,cqw,cqh,cqi,cqb,cqmin,cqmax,%";
|
|
212
|
-
var lengthUnitsPattern = `(?:${lengthUnits.split(",").join("|")})`;
|
|
213
|
-
var lengthRegExp = new RegExp(`^[+-]?[0-9]*.?[0-9]+(?:[eE][+-]?[0-9]+)?${lengthUnitsPattern}$`);
|
|
214
|
-
var isCssUnit = (v) => typeof v === "string" && lengthRegExp.test(v);
|
|
215
|
-
|
|
216
|
-
// src/is-css-var.ts
|
|
217
|
-
var isCssVar = (v) => typeof v === "string" && /^var\(--.+\)$/.test(v);
|
|
218
|
-
|
|
219
|
-
// src/pattern-fns.ts
|
|
220
|
-
var patternFns = {
|
|
221
|
-
map: mapObject,
|
|
222
|
-
isCssFunction,
|
|
223
|
-
isCssVar,
|
|
224
|
-
isCssUnit
|
|
225
|
-
};
|
|
226
|
-
var getPatternStyles = (pattern, styles) => {
|
|
227
|
-
if (!pattern?.defaultValues) return styles;
|
|
228
|
-
const defaults = typeof pattern.defaultValues === "function" ? pattern.defaultValues(styles) : pattern.defaultValues;
|
|
229
|
-
return Object.assign({}, defaults, compact(styles));
|
|
230
|
-
};
|
|
231
|
-
|
|
232
|
-
// src/slot.ts
|
|
233
|
-
var getSlotRecipes = (recipe = {}) => {
|
|
234
|
-
const init = (slot) => ({
|
|
235
|
-
className: [recipe.className, slot].filter(Boolean).join("__"),
|
|
236
|
-
base: recipe.base?.[slot] ?? {},
|
|
237
|
-
variants: {},
|
|
238
|
-
defaultVariants: recipe.defaultVariants ?? {},
|
|
239
|
-
compoundVariants: recipe.compoundVariants ? getSlotCompoundVariant(recipe.compoundVariants, slot) : []
|
|
240
|
-
});
|
|
241
|
-
const slots = recipe.slots ?? [];
|
|
242
|
-
const recipeParts = slots.map((slot) => [slot, init(slot)]);
|
|
243
|
-
for (const [variantsKey, variantsSpec] of Object.entries(recipe.variants ?? {})) {
|
|
244
|
-
for (const [variantKey, variantSpec] of Object.entries(variantsSpec)) {
|
|
245
|
-
recipeParts.forEach(([slot, slotRecipe]) => {
|
|
246
|
-
slotRecipe.variants[variantsKey] ??= {};
|
|
247
|
-
slotRecipe.variants[variantsKey][variantKey] = variantSpec[slot] ?? {};
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
return Object.fromEntries(recipeParts);
|
|
252
|
-
};
|
|
253
|
-
var getSlotCompoundVariant = (compoundVariants, slotName) => compoundVariants.filter((compoundVariant) => compoundVariant.css[slotName]).map((compoundVariant) => ({ ...compoundVariant, css: compoundVariant.css[slotName] }));
|
|
254
|
-
|
|
255
|
-
// src/split-props.ts
|
|
256
|
-
function splitProps(props, ...keys) {
|
|
257
|
-
const descriptors = Object.getOwnPropertyDescriptors(props);
|
|
258
|
-
const dKeys = Object.keys(descriptors);
|
|
259
|
-
const split = (k) => {
|
|
260
|
-
const clone = {};
|
|
261
|
-
for (let i = 0; i < k.length; i++) {
|
|
262
|
-
const key = k[i];
|
|
263
|
-
if (descriptors[key]) {
|
|
264
|
-
Object.defineProperty(clone, key, descriptors[key]);
|
|
265
|
-
delete descriptors[key];
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
return clone;
|
|
269
|
-
};
|
|
270
|
-
const fn = (key) => split(Array.isArray(key) ? key : dKeys.filter(key));
|
|
271
|
-
return keys.map(fn).concat(split(dKeys));
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
// src/uniq.ts
|
|
275
|
-
var uniq = (...items) => {
|
|
276
|
-
const set = items.reduce((acc, currItems) => {
|
|
277
|
-
if (currItems) {
|
|
278
|
-
currItems.forEach((item) => acc.add(item));
|
|
279
|
-
}
|
|
280
|
-
return acc;
|
|
281
|
-
}, /* @__PURE__ */ new Set([]));
|
|
282
|
-
return Array.from(set);
|
|
283
|
-
};
|
|
284
|
-
export {
|
|
285
|
-
compact,
|
|
286
|
-
createCss,
|
|
287
|
-
createMergeCss,
|
|
288
|
-
filterBaseConditions,
|
|
289
|
-
getPatternStyles,
|
|
290
|
-
getSlotCompoundVariant,
|
|
291
|
-
getSlotRecipes,
|
|
292
|
-
hypenateProperty,
|
|
293
|
-
isBaseCondition,
|
|
294
|
-
isObject,
|
|
295
|
-
mapObject,
|
|
296
|
-
memo,
|
|
297
|
-
mergeProps,
|
|
298
|
-
patternFns,
|
|
299
|
-
splitProps,
|
|
300
|
-
toHash,
|
|
301
|
-
uniq,
|
|
302
|
-
walkObject,
|
|
303
|
-
withoutSpace
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
// src/normalize-html.ts
|
|
309
|
-
var htmlProps = ["htmlSize", "htmlTranslate", "htmlWidth", "htmlHeight"];
|
|
310
|
-
function convert(key) {
|
|
311
|
-
return htmlProps.includes(key) ? key.replace("html", "").toLowerCase() : key;
|
|
312
|
-
}
|
|
313
|
-
function normalizeHTMLProps(props) {
|
|
314
|
-
return Object.fromEntries(Object.entries(props).map(([key, value]) => [convert(key), value]));
|
|
315
|
-
}
|
|
316
|
-
normalizeHTMLProps.keys = htmlProps;
|
|
317
|
-
export {
|
|
318
|
-
normalizeHTMLProps
|
|
319
|
-
};
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
export function __spreadValues(a, b) {
|
|
323
|
-
return { ...a, ...b }
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
export function __objRest(source, exclude) {
|
|
327
|
-
return Object.fromEntries(Object.entries(source).filter(([key]) => !exclude.includes(key)))
|
|
328
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getAspectRatioStyle } from '../patterns/aspect-ratio.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const AspectRatio = /* @__PURE__ */ forwardRef(function AspectRatio(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, ["ratio"])
|
|
9
|
-
|
|
10
|
-
const styleProps = getAspectRatioStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getBleedStyle } from '../patterns/bleed.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Bleed = /* @__PURE__ */ forwardRef(function Bleed(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, ["inline","block"])
|
|
9
|
-
|
|
10
|
-
const styleProps = getBleedStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getBoxStyle } from '../patterns/box.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Box = /* @__PURE__ */ forwardRef(function Box(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, [])
|
|
9
|
-
|
|
10
|
-
const styleProps = getBoxStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getCenterStyle } from '../patterns/center.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Center = /* @__PURE__ */ forwardRef(function Center(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, ["inline"])
|
|
9
|
-
|
|
10
|
-
const styleProps = getCenterStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getCircleStyle } from '../patterns/circle.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Circle = /* @__PURE__ */ forwardRef(function Circle(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, ["size"])
|
|
9
|
-
|
|
10
|
-
const styleProps = getCircleStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getContainerStyle } from '../patterns/container.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Container = /* @__PURE__ */ forwardRef(function Container(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, [])
|
|
9
|
-
|
|
10
|
-
const styleProps = getContainerStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getCqStyle } from '../patterns/cq.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Cq = /* @__PURE__ */ forwardRef(function Cq(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, ["name","type"])
|
|
9
|
-
|
|
10
|
-
const styleProps = getCqStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import type { SlotRecipeRuntimeFn, RecipeVariantProps } from '../types/recipe';
|
|
3
|
-
import type { JsxHTMLProps, JsxStyleProps, Assign } from '../types/system-types';
|
|
4
|
-
import type { JsxFactoryOptions, ComponentProps, DataAttrs, AsProps } from '../types/jsx';
|
|
5
|
-
import type { ComponentType, ElementType } from 'react'
|
|
6
|
-
|
|
7
|
-
interface UnstyledProps {
|
|
8
|
-
unstyled?: boolean | undefined
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
type SvaFn<S extends string = any> = SlotRecipeRuntimeFn<S, any>
|
|
12
|
-
interface SlotRecipeFn {
|
|
13
|
-
__type: any
|
|
14
|
-
__slot: string
|
|
15
|
-
(props?: any): any
|
|
16
|
-
}
|
|
17
|
-
type SlotRecipe = SvaFn | SlotRecipeFn
|
|
18
|
-
|
|
19
|
-
type InferSlot<R extends SlotRecipe> = R extends SlotRecipeFn ? R['__slot'] : R extends SvaFn<infer S> ? S : never
|
|
20
|
-
|
|
21
|
-
interface WithProviderOptions<P = {}> {
|
|
22
|
-
defaultProps?: (Partial<P> & DataAttrs) | undefined
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
type StyleContextProvider<T extends ElementType, R extends SlotRecipe> = ComponentType<
|
|
26
|
-
JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, Assign<RecipeVariantProps<R>, JsxStyleProps>>
|
|
27
|
-
>
|
|
28
|
-
|
|
29
|
-
type StyleContextRootProvider<T extends ElementType, R extends SlotRecipe> = ComponentType<
|
|
30
|
-
ComponentProps<T> & UnstyledProps & RecipeVariantProps<R>
|
|
31
|
-
>
|
|
32
|
-
|
|
33
|
-
type StyleContextConsumer<T extends ElementType> = ComponentType<
|
|
34
|
-
JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, JsxStyleProps>
|
|
35
|
-
>
|
|
36
|
-
|
|
37
|
-
export interface StyleContext<R extends SlotRecipe> {
|
|
38
|
-
withRootProvider: <T extends ElementType>(
|
|
39
|
-
Component: T,
|
|
40
|
-
options?: WithProviderOptions<ComponentProps<T>> | undefined
|
|
41
|
-
) => StyleContextRootProvider<T, R>
|
|
42
|
-
withProvider: <T extends ElementType>(
|
|
43
|
-
Component: T,
|
|
44
|
-
slot: InferSlot<R>,
|
|
45
|
-
options?: JsxFactoryOptions<ComponentProps<T>> | undefined
|
|
46
|
-
) => StyleContextProvider<T, R>
|
|
47
|
-
withContext: <T extends ElementType>(
|
|
48
|
-
Component: T,
|
|
49
|
-
slot: InferSlot<R>,
|
|
50
|
-
options?: JsxFactoryOptions<ComponentProps<T>> | undefined
|
|
51
|
-
) => StyleContextConsumer<T>
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export declare function createStyleContext<R extends SlotRecipe>(recipe: R): StyleContext<R>
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { cx, css, sva } from '../css/index.mjs';
|
|
4
|
-
import { styled } from './factory.mjs';
|
|
5
|
-
import { getDisplayName } from './factory-helper.mjs';
|
|
6
|
-
import { createContext, useContext, createElement, forwardRef } from 'react'
|
|
7
|
-
|
|
8
|
-
function createSafeContext(contextName) {
|
|
9
|
-
const Context = createContext(undefined)
|
|
10
|
-
const useStyleContext = (componentName, slot) => {
|
|
11
|
-
const context = useContext(Context)
|
|
12
|
-
if (context === undefined) {
|
|
13
|
-
const componentInfo = componentName ? `Component "${componentName}"` : 'A component'
|
|
14
|
-
const slotInfo = slot ? ` (slot: "${slot}")` : ''
|
|
15
|
-
|
|
16
|
-
throw new Error(
|
|
17
|
-
`${componentInfo}${slotInfo} cannot access ${contextName} because it's missing its Provider.`
|
|
18
|
-
)
|
|
19
|
-
}
|
|
20
|
-
return context
|
|
21
|
-
}
|
|
22
|
-
return [Context, useStyleContext]
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export function createStyleContext(recipe) {
|
|
26
|
-
const isConfigRecipe = '__recipe__' in recipe
|
|
27
|
-
const recipeName = isConfigRecipe && recipe.__name__ ? recipe.__name__ : undefined
|
|
28
|
-
const contextName = recipeName ? `createStyleContext("${recipeName}")` : 'createStyleContext'
|
|
29
|
-
|
|
30
|
-
const [StyleContext, useStyleContext] = createSafeContext(contextName)
|
|
31
|
-
const svaFn = isConfigRecipe ? recipe : sva(recipe.config)
|
|
32
|
-
|
|
33
|
-
const getResolvedProps = (props, slotStyles) => {
|
|
34
|
-
const { unstyled, ...restProps } = props
|
|
35
|
-
if (unstyled) return restProps
|
|
36
|
-
if (isConfigRecipe) {
|
|
37
|
-
return { ...restProps, className: cx(slotStyles, restProps.className) }
|
|
38
|
-
}
|
|
39
|
-
return { ...slotStyles, ...restProps }
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const withRootProvider = (Component, options) => {
|
|
43
|
-
const WithRootProvider = (props) => {
|
|
44
|
-
const [variantProps, otherProps] = svaFn.splitVariantProps(props)
|
|
45
|
-
|
|
46
|
-
const slotStyles = isConfigRecipe ? svaFn(variantProps) : svaFn.raw(variantProps)
|
|
47
|
-
slotStyles._classNameMap = svaFn.classNameMap
|
|
48
|
-
|
|
49
|
-
const mergedProps = options?.defaultProps
|
|
50
|
-
? { ...options.defaultProps, ...otherProps }
|
|
51
|
-
: otherProps
|
|
52
|
-
|
|
53
|
-
return createElement(StyleContext.Provider, {
|
|
54
|
-
value: slotStyles,
|
|
55
|
-
children: createElement(Component, mergedProps)
|
|
56
|
-
})
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const componentName = getDisplayName(Component)
|
|
60
|
-
WithRootProvider.displayName = `withRootProvider(${componentName})`
|
|
61
|
-
|
|
62
|
-
return WithRootProvider
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const withProvider = (Component, slot, options) => {
|
|
66
|
-
const StyledComponent = styled(Component, {}, options)
|
|
67
|
-
|
|
68
|
-
const WithProvider = forwardRef((props, ref) => {
|
|
69
|
-
const [variantProps, restProps] = svaFn.splitVariantProps(props)
|
|
70
|
-
options?.forwardProps?.forEach((key) => {
|
|
71
|
-
if (key in variantProps) restProps[key] = variantProps[key]
|
|
72
|
-
})
|
|
73
|
-
|
|
74
|
-
const slotStyles = isConfigRecipe ? svaFn(variantProps) : svaFn.raw(variantProps)
|
|
75
|
-
slotStyles._classNameMap = svaFn.classNameMap
|
|
76
|
-
|
|
77
|
-
const propsWithClass = { ...restProps, className: restProps.className ?? options?.defaultProps?.className }
|
|
78
|
-
const resolvedProps = getResolvedProps(propsWithClass, slotStyles[slot])
|
|
79
|
-
return createElement(StyleContext.Provider, {
|
|
80
|
-
value: slotStyles,
|
|
81
|
-
children: createElement(StyledComponent, {
|
|
82
|
-
...resolvedProps,
|
|
83
|
-
className: cx(resolvedProps.className, slotStyles._classNameMap[slot]),
|
|
84
|
-
ref,
|
|
85
|
-
})
|
|
86
|
-
})
|
|
87
|
-
})
|
|
88
|
-
|
|
89
|
-
const componentName = getDisplayName(Component)
|
|
90
|
-
WithProvider.displayName = `withProvider(${componentName})`
|
|
91
|
-
|
|
92
|
-
return WithProvider
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const withContext = (Component, slot, options) => {
|
|
96
|
-
const StyledComponent = styled(Component, {}, options)
|
|
97
|
-
const componentName = getDisplayName(Component)
|
|
98
|
-
|
|
99
|
-
const WithContext = forwardRef((props, ref) => {
|
|
100
|
-
const slotStyles = useStyleContext(componentName, slot)
|
|
101
|
-
|
|
102
|
-
const propsWithClass = { ...props, className: props.className ?? options?.defaultProps?.className }
|
|
103
|
-
const resolvedProps = getResolvedProps(propsWithClass, slotStyles[slot])
|
|
104
|
-
return createElement(StyledComponent, {
|
|
105
|
-
...resolvedProps,
|
|
106
|
-
className: cx(resolvedProps.className, slotStyles._classNameMap[slot]),
|
|
107
|
-
ref,
|
|
108
|
-
})
|
|
109
|
-
})
|
|
110
|
-
|
|
111
|
-
WithContext.displayName = `withContext(${componentName})`
|
|
112
|
-
|
|
113
|
-
return WithContext
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
return {
|
|
117
|
-
withRootProvider,
|
|
118
|
-
withProvider,
|
|
119
|
-
withContext,
|
|
120
|
-
}
|
|
121
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
3
|
-
import { splitProps } from '../helpers.mjs';
|
|
4
|
-
import { getDividerStyle } from '../patterns/divider.mjs';
|
|
5
|
-
import { styled } from './factory.mjs';
|
|
6
|
-
|
|
7
|
-
export const Divider = /* @__PURE__ */ forwardRef(function Divider(props, ref) {
|
|
8
|
-
const [patternProps, restProps] = splitProps(props, ["orientation","thickness","color"])
|
|
9
|
-
|
|
10
|
-
const styleProps = getDividerStyle(patternProps)
|
|
11
|
-
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
12
|
-
|
|
13
|
-
return createElement(styled.div, mergedProps)
|
|
14
|
-
})
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { isCssProperty } from './is-valid-prop.mjs';
|
|
2
|
-
|
|
3
|
-
export const defaultShouldForwardProp = (prop, variantKeys) => !variantKeys.includes(prop) && !isCssProperty(prop)
|
|
4
|
-
|
|
5
|
-
export const composeShouldForwardProps = (tag, shouldForwardProp) =>
|
|
6
|
-
tag.__shouldForwardProps__ && shouldForwardProp
|
|
7
|
-
? (propName) => tag.__shouldForwardProps__(propName) && shouldForwardProp(propName)
|
|
8
|
-
: shouldForwardProp
|
|
9
|
-
|
|
10
|
-
export const composeCvaFn = (cvaA, cvaB) => {
|
|
11
|
-
if (cvaA && !cvaB) return cvaA
|
|
12
|
-
if (!cvaA && cvaB) return cvaB
|
|
13
|
-
if ((cvaA.__cva__ && cvaB.__cva__) || (cvaA.__recipe__ && cvaB.__recipe__)) return cvaA.merge(cvaB)
|
|
14
|
-
const error = new TypeError('Cannot merge cva with recipe. Please use either cva or recipe.')
|
|
15
|
-
TypeError.captureStackTrace?.(error)
|
|
16
|
-
throw error
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const getDisplayName = (Component) => {
|
|
20
|
-
if (typeof Component === 'string') return Component
|
|
21
|
-
return Component?.displayName || Component?.name || 'Component'
|
|
22
|
-
}
|