@stokelp/styled-system 2.126.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/conditions.d.ts +7 -0
- package/css/conditions.js +32 -0
- package/css/css.d.ts +6 -6
- package/css/css.js +63 -0
- package/css/cva.d.ts +3 -4
- package/css/cva.js +51 -0
- package/css/cx.d.ts +5 -4
- package/css/{cx.mjs → cx.js} +5 -4
- package/css/first-that-works.d.ts +22 -0
- package/css/first-that-works.js +1 -0
- package/css/index.d.ts +8 -5
- package/css/index.js +8 -0
- package/css/keyframes.d.ts +5 -0
- package/css/keyframes.js +8 -0
- package/css/position-try.d.ts +5 -0
- package/css/position-try.js +11 -0
- package/css/sva.d.ts +2 -3
- package/css/sva.js +49 -0
- package/css/view-transition.d.ts +7 -0
- package/css/view-transition.js +18 -0
- package/dist/panda/buildinfo.json +20580 -0
- package/dist/panda/lib.json +15 -0
- package/dist/panda/preset.mjs +9505 -0
- package/helpers.d.ts +67 -0
- package/helpers.js +624 -0
- package/jsx/aspect-ratio.d.ts +5 -8
- package/jsx/aspect-ratio.js +11 -0
- package/jsx/bleed.d.ts +6 -9
- package/jsx/bleed.js +11 -0
- package/jsx/box.d.ts +6 -9
- package/jsx/box.js +11 -0
- package/jsx/center.d.ts +6 -9
- package/jsx/center.js +11 -0
- package/jsx/circle.d.ts +6 -9
- package/jsx/circle.js +11 -0
- package/jsx/container.d.ts +6 -9
- package/jsx/container.js +11 -0
- package/jsx/cq.d.ts +6 -9
- package/jsx/cq.js +11 -0
- package/jsx/create-recipe-context.d.ts +31 -0
- package/jsx/create-recipe-context.js +38 -0
- package/jsx/create-slot-recipe-context.d.ts +49 -0
- package/jsx/create-slot-recipe-context.js +124 -0
- package/jsx/divider.d.ts +6 -9
- package/jsx/divider.js +11 -0
- package/jsx/factory.d.ts +3 -3
- package/jsx/factory.js +91 -0
- package/jsx/flex.d.ts +6 -9
- package/jsx/flex.js +11 -0
- package/jsx/float.d.ts +6 -9
- package/jsx/float.js +11 -0
- package/jsx/grid-item.d.ts +6 -9
- package/jsx/grid-item.js +11 -0
- package/jsx/grid.d.ts +6 -9
- package/jsx/grid.js +11 -0
- package/jsx/helper.d.ts +34 -0
- package/jsx/helper.js +92 -0
- package/jsx/hstack.d.ts +6 -9
- package/jsx/hstack.js +11 -0
- package/jsx/index.d.ts +25 -25
- package/jsx/index.js +24 -0
- package/jsx/is-valid-prop.d.ts +5 -10
- package/jsx/is-valid-prop.js +12 -0
- package/jsx/link-overlay.d.ts +6 -9
- package/jsx/link-overlay.js +11 -0
- package/jsx/spacer.d.ts +6 -9
- package/jsx/spacer.js +11 -0
- package/jsx/square.d.ts +6 -9
- package/jsx/square.js +11 -0
- package/jsx/stack.d.ts +6 -9
- package/jsx/stack.js +11 -0
- package/jsx/visually-hidden.d.ts +6 -9
- package/jsx/visually-hidden.js +11 -0
- package/jsx/vstack.d.ts +6 -9
- package/jsx/vstack.js +11 -0
- package/jsx/wrap.d.ts +6 -9
- package/jsx/wrap.js +11 -0
- package/package.json +32 -18
- package/patterns/aspect-ratio.d.ts +8 -9
- package/patterns/aspect-ratio.js +37 -0
- package/patterns/bleed.d.ts +9 -10
- package/patterns/bleed.js +30 -0
- package/patterns/box.d.ts +8 -11
- package/patterns/box.js +16 -0
- package/patterns/center.d.ts +8 -9
- package/patterns/center.js +22 -0
- package/patterns/circle.d.ts +8 -9
- package/patterns/circle.js +26 -0
- package/patterns/container.d.ts +8 -11
- package/patterns/container.js +26 -0
- package/patterns/cq.d.ts +10 -10
- package/patterns/cq.js +24 -0
- package/patterns/divider.d.ts +11 -11
- package/patterns/divider.js +31 -0
- package/patterns/flex.d.ts +14 -15
- package/patterns/flex.js +27 -0
- package/patterns/float.d.ts +12 -12
- package/patterns/float.js +78 -0
- package/patterns/grid-item.d.ts +13 -14
- package/patterns/grid-item.js +26 -0
- package/patterns/grid.d.ts +13 -13
- package/patterns/grid.js +30 -0
- package/patterns/hstack.d.ts +9 -10
- package/patterns/hstack.js +27 -0
- package/patterns/index.d.ts +20 -21
- package/patterns/index.js +20 -0
- package/patterns/link-overlay.d.ts +8 -11
- package/patterns/link-overlay.js +25 -0
- package/patterns/runtime.js +25 -0
- package/patterns/spacer.d.ts +9 -9
- package/patterns/spacer.js +25 -0
- package/patterns/square.d.ts +8 -9
- package/patterns/square.js +25 -0
- package/patterns/stack.d.ts +11 -12
- package/patterns/stack.js +30 -0
- package/patterns/visually-hidden.d.ts +8 -11
- package/patterns/visually-hidden.js +19 -0
- package/patterns/vstack.d.ts +9 -10
- package/patterns/vstack.js +27 -0
- package/patterns/wrap.d.ts +12 -13
- package/patterns/wrap.js +26 -0
- package/recipes/accordion.d.ts +10 -26
- package/recipes/accordion.js +5 -0
- package/recipes/action-card.d.ts +9 -26
- package/recipes/action-card.js +5 -0
- package/recipes/alert.d.ts +10 -28
- package/recipes/alert.js +5 -0
- package/recipes/app-navigation-language-select.d.ts +12 -34
- package/recipes/app-navigation-language-select.js +5 -0
- package/recipes/app-navigation.d.ts +10 -28
- package/recipes/app-navigation.js +5 -0
- package/recipes/avatar-group.d.ts +8 -26
- package/recipes/avatar-group.js +5 -0
- package/recipes/avatar.d.ts +11 -30
- package/recipes/avatar.js +5 -0
- package/recipes/breadcrumb.d.ts +9 -24
- package/recipes/breadcrumb.js +5 -0
- package/recipes/button-filter.d.ts +8 -27
- package/recipes/button-filter.js +5 -0
- package/recipes/button.d.ts +10 -37
- package/recipes/button.js +5 -0
- package/recipes/chat-document-message.d.ts +8 -27
- package/recipes/chat-document-message.js +5 -0
- package/recipes/chat-message.d.ts +10 -33
- package/recipes/chat-message.js +5 -0
- package/recipes/chat-profile-avatar.d.ts +9 -29
- package/recipes/chat-profile-avatar.js +5 -0
- package/recipes/chat-text-input.d.ts +8 -27
- package/recipes/chat-text-input.js +5 -0
- package/recipes/chat.d.ts +9 -26
- package/recipes/chat.js +5 -0
- package/recipes/checkbox-card.d.ts +10 -26
- package/recipes/checkbox-card.js +5 -0
- package/recipes/checkbox-group.d.ts +7 -24
- package/recipes/checkbox-group.js +5 -0
- package/recipes/checkbox.d.ts +10 -26
- package/recipes/checkbox.js +5 -0
- package/recipes/chip.d.ts +11 -32
- package/recipes/chip.js +5 -0
- package/recipes/collapsible.d.ts +9 -24
- package/recipes/collapsible.js +5 -0
- package/recipes/combobox.d.ts +11 -27
- package/recipes/combobox.js +5 -0
- package/recipes/datepicker.d.ts +9 -24
- package/recipes/datepicker.js +5 -0
- package/recipes/dialog.d.ts +9 -24
- package/recipes/dialog.js +5 -0
- package/recipes/drawer.d.ts +10 -26
- package/recipes/drawer.js +5 -0
- package/recipes/flag.d.ts +8 -26
- package/recipes/flag.js +5 -0
- package/recipes/form-control.d.ts +8 -27
- package/recipes/form-control.js +5 -0
- package/recipes/form-helper-text.d.ts +8 -27
- package/recipes/form-helper-text.js +5 -0
- package/recipes/form-label.d.ts +10 -28
- package/recipes/form-label.js +5 -0
- package/recipes/heading.d.ts +10 -28
- package/recipes/heading.js +5 -0
- package/recipes/highlighted-input.d.ts +9 -26
- package/recipes/highlighted-input.js +5 -0
- package/recipes/icon-button.d.ts +10 -37
- package/recipes/icon-button.js +5 -0
- package/recipes/icon.d.ts +8 -26
- package/recipes/icon.js +5 -0
- package/recipes/illustration.d.ts +9 -29
- package/recipes/illustration.js +5 -0
- package/recipes/index.d.ts +62 -63
- package/recipes/index.js +62 -0
- package/recipes/input-addon.d.ts +8 -27
- package/recipes/input-addon.js +5 -0
- package/recipes/input-group.d.ts +8 -27
- package/recipes/input-group.js +5 -0
- package/recipes/input.d.ts +9 -29
- package/recipes/input.js +5 -0
- package/recipes/menu.d.ts +10 -26
- package/recipes/menu.js +5 -0
- package/recipes/mobile-navigation.d.ts +10 -28
- package/recipes/mobile-navigation.js +5 -0
- package/recipes/pagination.d.ts +9 -26
- package/recipes/pagination.js +5 -0
- package/recipes/phone-number-input.d.ts +9 -29
- package/recipes/phone-number-input.js +5 -0
- package/recipes/popover.d.ts +9 -24
- package/recipes/popover.js +5 -0
- package/recipes/price-tag.d.ts +10 -26
- package/recipes/price-tag.js +5 -0
- package/recipes/product-card-catalog.d.ts +9 -26
- package/recipes/product-card-catalog.js +5 -0
- package/recipes/radio-button-group.d.ts +10 -26
- package/recipes/radio-button-group.js +5 -0
- package/recipes/radio-card-group.d.ts +10 -26
- package/recipes/radio-card-group.js +5 -0
- package/recipes/radio-group.d.ts +10 -26
- package/recipes/radio-group.js +5 -0
- package/recipes/runtime.js +133 -0
- package/recipes/select-language.d.ts +10 -26
- package/recipes/select-language.js +5 -0
- package/recipes/select.d.ts +11 -27
- package/recipes/select.js +5 -0
- package/recipes/status-tag-select.d.ts +11 -30
- package/recipes/status-tag-select.js +5 -0
- package/recipes/steps.d.ts +9 -24
- package/recipes/steps.js +5 -0
- package/recipes/switch-card.d.ts +10 -26
- package/recipes/switch-card.js +5 -0
- package/recipes/switch-recipe.d.ts +10 -26
- package/recipes/switch-recipe.js +5 -0
- package/recipes/table-container.d.ts +7 -24
- package/recipes/table-container.js +5 -0
- package/recipes/table-empty-row.d.ts +7 -24
- package/recipes/table-empty-row.js +5 -0
- package/recipes/table-group-title.d.ts +8 -26
- package/recipes/table-group-title.js +5 -0
- package/recipes/table.d.ts +9 -24
- package/recipes/table.js +5 -0
- package/recipes/tabs-chip.d.ts +9 -29
- package/recipes/tabs-chip.js +5 -0
- package/recipes/tabs.d.ts +11 -30
- package/recipes/tabs.js +5 -0
- package/recipes/tag.d.ts +11 -32
- package/recipes/tag.js +5 -0
- package/recipes/text.d.ts +12 -30
- package/recipes/text.js +5 -0
- package/recipes/textarea.d.ts +7 -24
- package/recipes/textarea.js +5 -0
- package/recipes/tooltip.d.ts +9 -24
- package/recipes/tooltip.js +5 -0
- package/tokens/index.d.ts +4 -5
- package/tokens/index.js +18 -0
- package/types/index.d.ts +6 -8
- package/types/jsx.d.ts +37 -28
- package/types/pattern.d.ts +18 -70
- package/types/recipe.d.ts +58 -150
- package/types/register.d.ts +40 -0
- package/types/system.d.ts +1816 -0
- package/types/tokens.d.ts +72 -0
- package/css/conditions.mjs +0 -36
- package/css/css.mjs +0 -45
- package/css/cva.mjs +0 -87
- package/css/index.mjs +0 -4
- package/css/sva.mjs +0 -46
- package/helpers.mjs +0 -328
- package/jsx/aspect-ratio.mjs +0 -14
- package/jsx/bleed.mjs +0 -14
- package/jsx/box.mjs +0 -14
- package/jsx/center.mjs +0 -14
- package/jsx/circle.mjs +0 -14
- package/jsx/container.mjs +0 -14
- package/jsx/cq.mjs +0 -14
- package/jsx/create-style-context.d.ts +0 -54
- package/jsx/create-style-context.mjs +0 -118
- package/jsx/divider.mjs +0 -14
- package/jsx/factory-helper.mjs +0 -22
- package/jsx/factory.mjs +0 -89
- package/jsx/flex.mjs +0 -14
- package/jsx/float.mjs +0 -14
- package/jsx/grid-item.mjs +0 -14
- package/jsx/grid.mjs +0 -14
- package/jsx/hstack.mjs +0 -14
- package/jsx/index.mjs +0 -23
- package/jsx/is-valid-prop.mjs +0 -17
- package/jsx/link-overlay.mjs +0 -14
- package/jsx/spacer.mjs +0 -14
- package/jsx/square.mjs +0 -14
- package/jsx/stack.mjs +0 -14
- package/jsx/visually-hidden.mjs +0 -14
- package/jsx/vstack.mjs +0 -14
- package/jsx/wrap.mjs +0 -14
- package/panda.buildinfo.json +0 -471
- package/patterns/aspect-ratio.mjs +0 -38
- package/patterns/bleed.mjs +0 -24
- package/patterns/box.mjs +0 -15
- package/patterns/center.mjs +0 -21
- package/patterns/circle.mjs +0 -25
- package/patterns/container.mjs +0 -21
- package/patterns/cq.mjs +0 -21
- package/patterns/divider.mjs +0 -25
- package/patterns/flex.mjs +0 -26
- package/patterns/float.mjs +0 -52
- package/patterns/grid-item.mjs +0 -25
- package/patterns/grid.mjs +0 -27
- package/patterns/hstack.mjs +0 -24
- package/patterns/index.mjs +0 -20
- package/patterns/link-overlay.mjs +0 -24
- package/patterns/spacer.mjs +0 -25
- package/patterns/square.mjs +0 -24
- package/patterns/stack.mjs +0 -24
- package/patterns/visually-hidden.mjs +0 -18
- package/patterns/vstack.mjs +0 -24
- package/patterns/wrap.mjs +0 -25
- package/recipes/accordion.mjs +0 -57
- package/recipes/action-card.mjs +0 -45
- package/recipes/alert.mjs +0 -57
- package/recipes/app-navigation-language-select.mjs +0 -109
- package/recipes/app-navigation.mjs +0 -84
- package/recipes/avatar-group.mjs +0 -32
- package/recipes/avatar.mjs +0 -57
- package/recipes/breadcrumb.mjs +0 -45
- package/recipes/button-filter.mjs +0 -24
- package/recipes/button.mjs +0 -212
- package/recipes/chat-document-message.mjs +0 -24
- package/recipes/chat-message.mjs +0 -36
- package/recipes/chat-profile-avatar.mjs +0 -31
- package/recipes/chat-text-input.mjs +0 -24
- package/recipes/chat.mjs +0 -45
- package/recipes/checkbox-card.mjs +0 -73
- package/recipes/checkbox-group.mjs +0 -24
- package/recipes/checkbox.mjs +0 -57
- package/recipes/chip.mjs +0 -76
- package/recipes/collapsible.mjs +0 -45
- package/recipes/combobox.mjs +0 -101
- package/recipes/create-recipe.mjs +0 -82
- package/recipes/datepicker.mjs +0 -133
- package/recipes/dialog.mjs +0 -69
- package/recipes/drawer.mjs +0 -78
- package/recipes/flag.mjs +0 -33
- package/recipes/form-control.mjs +0 -24
- package/recipes/form-helper-text.mjs +0 -24
- package/recipes/form-label.mjs +0 -50
- package/recipes/heading.mjs +0 -41
- package/recipes/highlighted-input.mjs +0 -45
- package/recipes/icon-button.mjs +0 -233
- package/recipes/icon.mjs +0 -34
- package/recipes/illustration.mjs +0 -37
- package/recipes/index.mjs +0 -62
- package/recipes/input-addon.mjs +0 -24
- package/recipes/input-group.mjs +0 -24
- package/recipes/input.mjs +0 -30
- package/recipes/menu.mjs +0 -93
- package/recipes/mobile-navigation.mjs +0 -56
- package/recipes/pagination.mjs +0 -41
- package/recipes/phone-number-input.mjs +0 -30
- package/recipes/popover.mjs +0 -69
- package/recipes/price-tag.mjs +0 -51
- package/recipes/product-card-catalog.mjs +0 -73
- package/recipes/radio-button-group.mjs +0 -62
- package/recipes/radio-card-group.mjs +0 -77
- package/recipes/radio-group.mjs +0 -61
- package/recipes/select-language.mjs +0 -98
- package/recipes/select.mjs +0 -101
- package/recipes/status-tag-select.mjs +0 -108
- package/recipes/steps.mjs +0 -69
- package/recipes/switch-card.mjs +0 -69
- package/recipes/switch-recipe.mjs +0 -53
- package/recipes/table-container.mjs +0 -24
- package/recipes/table-empty-row.mjs +0 -24
- package/recipes/table-group-title.mjs +0 -32
- package/recipes/table.mjs +0 -61
- package/recipes/tabs-chip.mjs +0 -35
- package/recipes/tabs.mjs +0 -63
- package/recipes/tag.mjs +0 -57
- package/recipes/text.mjs +0 -41
- package/recipes/textarea.mjs +0 -24
- package/recipes/tooltip.mjs +0 -49
- package/tokens/index.mjs +0 -1728
- package/tokens/tokens.d.ts +0 -63
- package/types/composition.d.ts +0 -227
- package/types/conditions.d.ts +0 -300
- package/types/csstype.d.ts +0 -22570
- package/types/global.d.ts +0 -20
- package/types/parts.d.ts +0 -8
- package/types/prop-type.d.ts +0 -251
- package/types/selectors.d.ts +0 -59
- package/types/static-css.d.ts +0 -56
- package/types/style-props.d.ts +0 -8089
- package/types/system-types.d.ts +0 -151
package/jsx/grid-item.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types';
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { GridItemProperties } from '../patterns/grid-item.js';
|
|
3
|
+
import type { HTMLStyledProps } from '../types/jsx.js';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system.js';
|
|
6
5
|
|
|
7
|
-
export interface GridItemProps extends GridItemProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof GridItemProperties
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare const GridItem: FunctionComponent<GridItemProps>
|
|
6
|
+
export interface GridItemProps extends GridItemProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof GridItemProperties> {}
|
|
7
|
+
export declare const GridItem: FunctionComponent<GridItemProps>;
|
package/jsx/grid-item.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { gridItem } from '../patterns/grid-item.js';
|
|
3
|
+
import { splitProps } from '../helpers.js';
|
|
4
|
+
import { styled } from './factory.js';
|
|
5
|
+
|
|
6
|
+
export const GridItem = /* @__PURE__ */ forwardRef(function GridItem(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, gridItem.propKeys)
|
|
8
|
+
const styleProps = gridItem.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
10
|
+
return createElement(styled["div"], mergedProps)
|
|
11
|
+
})
|
package/jsx/grid.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types';
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { GridProperties } from '../patterns/grid.js';
|
|
3
|
+
import type { HTMLStyledProps } from '../types/jsx.js';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system.js';
|
|
6
5
|
|
|
7
|
-
export interface GridProps extends GridProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof GridProperties
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare const Grid: FunctionComponent<GridProps>
|
|
6
|
+
export interface GridProps extends GridProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof GridProperties> {}
|
|
7
|
+
export declare const Grid: FunctionComponent<GridProps>;
|
package/jsx/grid.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { grid } from '../patterns/grid.js';
|
|
3
|
+
import { splitProps } from '../helpers.js';
|
|
4
|
+
import { styled } from './factory.js';
|
|
5
|
+
|
|
6
|
+
export const Grid = /* @__PURE__ */ forwardRef(function Grid(props, ref) {
|
|
7
|
+
const [patternProps, restProps] = splitProps(props, grid.propKeys)
|
|
8
|
+
const styleProps = grid.raw(patternProps)
|
|
9
|
+
const mergedProps = { ref, ...styleProps, ...restProps }
|
|
10
|
+
return createElement(styled["div"], mergedProps)
|
|
11
|
+
})
|
package/jsx/helper.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { RecipeCreatorFn } from '../types/recipe.js';
|
|
2
|
+
import type { SystemStyleObject } from '../types/system.js';
|
|
3
|
+
|
|
4
|
+
export type Props = Record<string, unknown>;
|
|
5
|
+
export type ShouldForwardProp = (prop: string, variantKeys?: string[]) => boolean;
|
|
6
|
+
/** A `cva` or config recipe function, as the JSX runtime reads it. */
|
|
7
|
+
export interface JsxRecipeFn {
|
|
8
|
+
(props?: Props, withCompoundVariants?: boolean): string;
|
|
9
|
+
raw(props?: Props): SystemStyleObject;
|
|
10
|
+
merge(other: JsxRecipeFn, cvaFn: RecipeCreatorFn): JsxRecipeFn;
|
|
11
|
+
variantKeys: string[];
|
|
12
|
+
__cva__?: boolean;
|
|
13
|
+
__recipe__?: boolean;
|
|
14
|
+
__name__?: string;
|
|
15
|
+
__memoizedRaw__?: (props?: Props) => SystemStyleObject;
|
|
16
|
+
__getCompoundVariantClasses__?: (props: Props) => string;
|
|
17
|
+
}
|
|
18
|
+
/** Markers the factory sets on the components it creates. */
|
|
19
|
+
export interface StyledMarkers {
|
|
20
|
+
__cva__?: JsxRecipeFn;
|
|
21
|
+
__base__?: unknown;
|
|
22
|
+
__shouldForwardProps__?: ShouldForwardProp;
|
|
23
|
+
}
|
|
24
|
+
export declare const composeShouldForwardProps: (tag: StyledMarkers, shouldForwardProp: ShouldForwardProp) => ShouldForwardProp;
|
|
25
|
+
export declare const composeCvaFn: (cvaA: JsxRecipeFn | undefined, cvaB: JsxRecipeFn) => JsxRecipeFn;
|
|
26
|
+
export declare function mergeDefaultProps(defaultProps: Props, props: Props): Props;
|
|
27
|
+
export declare const getDisplayName: (Component: string | {
|
|
28
|
+
displayName?: string;
|
|
29
|
+
name?: string;
|
|
30
|
+
} | undefined) => string;
|
|
31
|
+
export type SplitJsxProps = [htmlProps: Props | undefined, forwardedProps: Props | undefined, variantProps: Props, propStyles: SystemStyleObject | undefined, cssStyles: SystemStyleObject | undefined, elementProps: Props | undefined];
|
|
32
|
+
export declare function splitJsxProps(props: Props, shouldForwardProp: (prop: string) => boolean, variantSet: Set<string>, isCssProperty: (prop: string) => boolean, skipClass?: boolean): SplitJsxProps;
|
|
33
|
+
export declare function serializeSplitStyles(propStyles: SystemStyleObject | undefined, cssStyles: SystemStyleObject | undefined, baseStyles?: SystemStyleObject): string;
|
|
34
|
+
export declare function splitStyleProps(styleProps: Props): [propStyles: SystemStyleObject | undefined, cssStyles: SystemStyleObject | undefined];
|
package/jsx/helper.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { css, cva } from '../css/index.js';
|
|
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
|
+
}
|
package/jsx/hstack.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types';
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { HstackProperties } from '../patterns/hstack.js';
|
|
3
|
+
import type { HTMLStyledProps } from '../types/jsx.js';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system.js';
|
|
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>;
|
package/jsx/hstack.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { hstack } from '../patterns/hstack.js';
|
|
3
|
+
import { splitProps } from '../helpers.js';
|
|
4
|
+
import { styled } from './factory.js';
|
|
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
|
+
})
|
package/jsx/index.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './create-
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './
|
|
11
|
-
export * from './
|
|
12
|
-
export * from './
|
|
13
|
-
export * from './
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './
|
|
16
|
-
export * from './grid';
|
|
17
|
-
export * from './
|
|
18
|
-
export * from './
|
|
19
|
-
export * from './
|
|
20
|
-
export * from './
|
|
21
|
-
export * from './
|
|
22
|
-
export * from './
|
|
23
|
-
export * from './
|
|
24
|
-
export * from './
|
|
25
|
-
export
|
|
1
|
+
export * from './factory.js';
|
|
2
|
+
export * from './is-valid-prop.js';
|
|
3
|
+
export * from './create-recipe-context.js';
|
|
4
|
+
export * from './create-slot-recipe-context.js';
|
|
5
|
+
export * from './aspect-ratio.js';
|
|
6
|
+
export * from './bleed.js';
|
|
7
|
+
export * from './box.js';
|
|
8
|
+
export * from './center.js';
|
|
9
|
+
export * from './circle.js';
|
|
10
|
+
export * from './container.js';
|
|
11
|
+
export * from './cq.js';
|
|
12
|
+
export * from './divider.js';
|
|
13
|
+
export * from './flex.js';
|
|
14
|
+
export * from './float.js';
|
|
15
|
+
export * from './grid.js';
|
|
16
|
+
export * from './grid-item.js';
|
|
17
|
+
export * from './hstack.js';
|
|
18
|
+
export * from './link-overlay.js';
|
|
19
|
+
export * from './spacer.js';
|
|
20
|
+
export * from './square.js';
|
|
21
|
+
export * from './stack.js';
|
|
22
|
+
export * from './visually-hidden.js';
|
|
23
|
+
export * from './vstack.js';
|
|
24
|
+
export * from './wrap.js';
|
|
25
|
+
export { HTMLStyledProps, StyledComponent, Styled, StyledVariantProps, JsxFactoryOptions, ComponentProps, DataAttrs, AsProps } from '../types/jsx.js';
|
package/jsx/index.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export * from './factory.js';
|
|
2
|
+
export * from './is-valid-prop.js';
|
|
3
|
+
export * from './create-recipe-context.js';
|
|
4
|
+
export * from './create-slot-recipe-context.js';
|
|
5
|
+
export * from './aspect-ratio.js';
|
|
6
|
+
export * from './bleed.js';
|
|
7
|
+
export * from './box.js';
|
|
8
|
+
export * from './center.js';
|
|
9
|
+
export * from './circle.js';
|
|
10
|
+
export * from './container.js';
|
|
11
|
+
export * from './cq.js';
|
|
12
|
+
export * from './divider.js';
|
|
13
|
+
export * from './flex.js';
|
|
14
|
+
export * from './float.js';
|
|
15
|
+
export * from './grid.js';
|
|
16
|
+
export * from './grid-item.js';
|
|
17
|
+
export * from './hstack.js';
|
|
18
|
+
export * from './link-overlay.js';
|
|
19
|
+
export * from './spacer.js';
|
|
20
|
+
export * from './square.js';
|
|
21
|
+
export * from './stack.js';
|
|
22
|
+
export * from './visually-hidden.js';
|
|
23
|
+
export * from './vstack.js';
|
|
24
|
+
export * from './wrap.js';
|
package/jsx/is-valid-prop.d.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import type { DistributiveOmit, HTMLPandaProps, JsxStyleProps, Pretty } from '../types';
|
|
1
|
+
import type { DistributiveOmit, JsxStyleProps } from '../types/system.js';
|
|
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.js';
|
|
2
|
+
|
|
3
|
+
const cssPropertySet = new Set(["@/2xl","@/2xlDown","@/2xlOnly","@/2xlTo3xl","@/2xlTo4xl","@/2xlTo5xl","@/2xlTo6xl","@/2xlTo7xl","@/2xlTo8xl","@/3xl","@/3xlDown","@/3xlOnly","@/3xlTo4xl","@/3xlTo5xl","@/3xlTo6xl","@/3xlTo7xl","@/3xlTo8xl","@/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","_after","_anyPointerCoarse","_anyPointerFine","_anyPointerNone","_atValue","_autofill","_backdrop","_before","_checked","_closed","_collapsed","_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","_liveQuoteTheme","_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","baselineSource","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","cornerBlockEndShape","cornerBlockStartShape","cornerBottomLeftShape","cornerBottomRightShape","cornerBottomShape","cornerEndEndShape","cornerEndStartShape","cornerInlineEndShape","cornerInlineStartShape","cornerLeftShape","cornerRightShape","cornerShape","cornerStartEndShape","cornerStartStartShape","cornerTopLeftShape","cornerTopRightShape","cornerTopShape","counterIncrement","counterReset","counterSet","css","cursor","cx","cy","d","debug","direction","display","divideColor","divideStyle","divideX","divideY","dominantBaseline","dropShadow","dynamicRangeLimit","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","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","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","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","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
|
+
}
|
package/jsx/link-overlay.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types';
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { LinkOverlayProperties } from '../patterns/link-overlay.js';
|
|
3
|
+
import type { HTMLStyledProps } from '../types/jsx.js';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system.js';
|
|
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.js';
|
|
3
|
+
import { splitProps } from '../helpers.js';
|
|
4
|
+
import { styled } from './factory.js';
|
|
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
|
+
})
|
package/jsx/spacer.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types';
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { SpacerProperties } from '../patterns/spacer.js';
|
|
3
|
+
import type { HTMLStyledProps } from '../types/jsx.js';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system.js';
|
|
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>;
|
package/jsx/spacer.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { spacer } from '../patterns/spacer.js';
|
|
3
|
+
import { splitProps } from '../helpers.js';
|
|
4
|
+
import { styled } from './factory.js';
|
|
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
|
+
})
|
package/jsx/square.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types';
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { SquareProperties } from '../patterns/square.js';
|
|
3
|
+
import type { HTMLStyledProps } from '../types/jsx.js';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system.js';
|
|
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>;
|
package/jsx/square.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { square } from '../patterns/square.js';
|
|
3
|
+
import { splitProps } from '../helpers.js';
|
|
4
|
+
import { styled } from './factory.js';
|
|
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
|
+
})
|
package/jsx/stack.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types';
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { StackProperties } from '../patterns/stack.js';
|
|
3
|
+
import type { HTMLStyledProps } from '../types/jsx.js';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system.js';
|
|
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>;
|
package/jsx/stack.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { stack } from '../patterns/stack.js';
|
|
3
|
+
import { splitProps } from '../helpers.js';
|
|
4
|
+
import { styled } from './factory.js';
|
|
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
|
+
})
|
package/jsx/visually-hidden.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types';
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { VisuallyHiddenProperties } from '../patterns/visually-hidden.js';
|
|
3
|
+
import type { HTMLStyledProps } from '../types/jsx.js';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system.js';
|
|
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.js';
|
|
3
|
+
import { splitProps } from '../helpers.js';
|
|
4
|
+
import { styled } from './factory.js';
|
|
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
|
+
})
|
package/jsx/vstack.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types';
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { VstackProperties } from '../patterns/vstack.js';
|
|
3
|
+
import type { HTMLStyledProps } from '../types/jsx.js';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system.js';
|
|
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>;
|
package/jsx/vstack.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { vstack } from '../patterns/vstack.js';
|
|
3
|
+
import { splitProps } from '../helpers.js';
|
|
4
|
+
import { styled } from './factory.js';
|
|
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
|
+
})
|
package/jsx/wrap.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { DistributiveOmit } from '../types/system-types';
|
|
1
|
+
import type { FunctionComponent } from 'react';
|
|
2
|
+
import type { WrapProperties } from '../patterns/wrap.js';
|
|
3
|
+
import type { HTMLStyledProps } from '../types/jsx.js';
|
|
4
|
+
import type { DistributiveOmit } from '../types/system.js';
|
|
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>;
|
package/jsx/wrap.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createElement, forwardRef } from 'react';
|
|
2
|
+
import { wrap } from '../patterns/wrap.js';
|
|
3
|
+
import { splitProps } from '../helpers.js';
|
|
4
|
+
import { styled } from './factory.js';
|
|
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
|
+
})
|