@nation-a/ui 0.7.1 → 0.8.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/dist/index.cjs +385 -118
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +385 -118
- package/dist/index.js.map +1 -1
- package/dist/styled-system/jsx/aspect-ratio.mjs +3 -2
- package/dist/styled-system/jsx/bleed.mjs +3 -2
- package/dist/styled-system/jsx/box.mjs +3 -2
- package/dist/styled-system/jsx/center.mjs +3 -2
- package/dist/styled-system/jsx/circle.mjs +3 -2
- package/dist/styled-system/jsx/container.mjs +3 -2
- package/dist/styled-system/jsx/cq.mjs +3 -2
- package/dist/styled-system/jsx/divider.mjs +3 -2
- package/dist/styled-system/jsx/flex.mjs +3 -2
- package/dist/styled-system/jsx/float.mjs +3 -2
- package/dist/styled-system/jsx/grid-item.mjs +3 -2
- package/dist/styled-system/jsx/grid.mjs +3 -2
- package/dist/styled-system/jsx/hstack.mjs +3 -2
- package/dist/styled-system/jsx/is-valid-prop.mjs +3 -4
- package/dist/styled-system/jsx/link-overlay.mjs +3 -2
- package/dist/styled-system/jsx/spacer.mjs +3 -2
- package/dist/styled-system/jsx/square.mjs +3 -2
- package/dist/styled-system/jsx/stack.mjs +3 -2
- package/dist/styled-system/jsx/visually-hidden.mjs +3 -2
- package/dist/styled-system/jsx/vstack.mjs +3 -2
- package/dist/styled-system/jsx/wrap.mjs +3 -2
- package/dist/styled-system/styles.css +1850 -1162
- package/dist/styled-system/types/system-types.d.ts +2 -2
- package/dist/types/components/BottomSheet/index.d.ts +8 -8
- package/dist/types/components/Button/index.d.ts +288 -5
- package/dist/types/components/Dialog/dialog.recipe.d.ts +1 -1
- package/dist/types/components/Dialog/index.d.ts +28 -17
- package/dist/types/components/IconButton/index.d.ts +8 -10
- package/dist/types/components/Layout/index.d.ts +42 -0
- package/dist/types/components/Navigation/index.d.ts +9 -15
- package/dist/types/components/Navigation/navigation.recipe.d.ts +1 -1
- package/dist/types/components/Spinner/index.d.ts +3 -19
- package/dist/types/components/Tag/index.d.ts +3 -7
- package/dist/types/components/Tag/tag.recipe.d.ts +1 -1
- package/dist/types/components/Text/index.d.ts +3 -6
- package/dist/types/components/index.d.ts +2 -1
- package/dist/types/utils/with-polymorphic-component.d.ts +18 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getAspectRatioStyle } from '../patterns/aspect-ratio.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const AspectRatio = /* @__PURE__ */ forwardRef(function AspectRatio(props
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, ["ratio"])
|
|
9
9
|
|
|
10
10
|
const styleProps = getAspectRatioStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getBleedStyle } from '../patterns/bleed.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const Bleed = /* @__PURE__ */ forwardRef(function Bleed(props, ref) {
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, ["inline","block"])
|
|
9
9
|
|
|
10
10
|
const styleProps = getBleedStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getBoxStyle } from '../patterns/box.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const Box = /* @__PURE__ */ forwardRef(function Box(props, ref) {
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, [])
|
|
9
9
|
|
|
10
10
|
const styleProps = getBoxStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getCenterStyle } from '../patterns/center.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const Center = /* @__PURE__ */ forwardRef(function Center(props, ref) {
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, ["inline"])
|
|
9
9
|
|
|
10
10
|
const styleProps = getCenterStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getCircleStyle } from '../patterns/circle.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const Circle = /* @__PURE__ */ forwardRef(function Circle(props, ref) {
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, ["size"])
|
|
9
9
|
|
|
10
10
|
const styleProps = getCircleStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getContainerStyle } from '../patterns/container.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const Container = /* @__PURE__ */ forwardRef(function Container(props, re
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, [])
|
|
9
9
|
|
|
10
10
|
const styleProps = getContainerStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getCqStyle } from '../patterns/cq.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const Cq = /* @__PURE__ */ forwardRef(function Cq(props, ref) {
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, ["name","type"])
|
|
9
9
|
|
|
10
10
|
const styleProps = getCqStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getDividerStyle } from '../patterns/divider.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const Divider = /* @__PURE__ */ forwardRef(function Divider(props, ref) {
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, ["orientation","thickness","color"])
|
|
9
9
|
|
|
10
10
|
const styleProps = getDividerStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getFlexStyle } from '../patterns/flex.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const Flex = /* @__PURE__ */ forwardRef(function Flex(props, ref) {
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, ["align","justify","direction","wrap","basis","grow","shrink"])
|
|
9
9
|
|
|
10
10
|
const styleProps = getFlexStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getFloatStyle } from '../patterns/float.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const Float = /* @__PURE__ */ forwardRef(function Float(props, ref) {
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, ["offsetX","offsetY","offset","placement"])
|
|
9
9
|
|
|
10
10
|
const styleProps = getFloatStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getGridItemStyle } from '../patterns/grid-item.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const GridItem = /* @__PURE__ */ forwardRef(function GridItem(props, ref)
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, ["colSpan","rowSpan","colStart","rowStart","colEnd","rowEnd"])
|
|
9
9
|
|
|
10
10
|
const styleProps = getGridItemStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getGridStyle } from '../patterns/grid.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const Grid = /* @__PURE__ */ forwardRef(function Grid(props, ref) {
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, ["gap","columnGap","rowGap","columns","minChildWidth"])
|
|
9
9
|
|
|
10
10
|
const styleProps = getGridStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getHstackStyle } from '../patterns/hstack.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const HStack = /* @__PURE__ */ forwardRef(function HStack(props, ref) {
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, ["justify","gap"])
|
|
9
9
|
|
|
10
10
|
const styleProps = getHstackStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { splitProps } from '../helpers.mjs';
|
|
2
|
-
import { memo } from '../helpers.mjs';
|
|
3
2
|
// src/index.ts
|
|
4
|
-
var userGeneratedStr = "css
|
|
3
|
+
var userGeneratedStr = "css"
|
|
5
4
|
var userGenerated = userGeneratedStr.split(",");
|
|
6
|
-
var cssPropertiesStr = "
|
|
5
|
+
var cssPropertiesStr = "";
|
|
7
6
|
var allCssProperties = cssPropertiesStr.split(",").concat(userGenerated);
|
|
8
7
|
var properties = new Map(allCssProperties.map((prop) => [prop, true]));
|
|
9
8
|
var cssPropertySelectorRegex = /&|@/;
|
|
10
|
-
var isCssProperty = /* @__PURE__ */
|
|
9
|
+
var isCssProperty = /* @__PURE__ */ ((prop) => {
|
|
11
10
|
return properties.has(prop) || prop.startsWith("--") || cssPropertySelectorRegex.test(prop);
|
|
12
11
|
});
|
|
13
12
|
export {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getLinkOverlayStyle } from '../patterns/link-overlay.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const LinkOverlay = /* @__PURE__ */ forwardRef(function LinkOverlay(props
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, [])
|
|
9
9
|
|
|
10
10
|
const styleProps = getLinkOverlayStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.a, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getSpacerStyle } from '../patterns/spacer.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const Spacer = /* @__PURE__ */ forwardRef(function Spacer(props, ref) {
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, ["size"])
|
|
9
9
|
|
|
10
10
|
const styleProps = getSpacerStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getSquareStyle } from '../patterns/square.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const Square = /* @__PURE__ */ forwardRef(function Square(props, ref) {
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, ["size"])
|
|
9
9
|
|
|
10
10
|
const styleProps = getSquareStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getStackStyle } from '../patterns/stack.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const Stack = /* @__PURE__ */ forwardRef(function Stack(props, ref) {
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, ["align","justify","direction","gap"])
|
|
9
9
|
|
|
10
10
|
const styleProps = getStackStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getVisuallyHiddenStyle } from '../patterns/visually-hidden.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const VisuallyHidden = /* @__PURE__ */ forwardRef(function VisuallyHidden
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, [])
|
|
9
9
|
|
|
10
10
|
const styleProps = getVisuallyHiddenStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getVstackStyle } from '../patterns/vstack.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const VStack = /* @__PURE__ */ forwardRef(function VStack(props, ref) {
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, ["justify","gap"])
|
|
9
9
|
|
|
10
10
|
const styleProps = getVstackStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createElement, forwardRef } from 'react'
|
|
2
|
-
|
|
2
|
+
import { mergeCss } from '../css/css.mjs';
|
|
3
3
|
import { splitProps } from '../helpers.mjs';
|
|
4
4
|
import { getWrapStyle } from '../patterns/wrap.mjs';
|
|
5
5
|
import { styled } from './factory.mjs';
|
|
@@ -8,7 +8,8 @@ export const Wrap = /* @__PURE__ */ forwardRef(function Wrap(props, ref) {
|
|
|
8
8
|
const [patternProps, restProps] = splitProps(props, ["gap","rowGap","columnGap","align","justify"])
|
|
9
9
|
|
|
10
10
|
const styleProps = getWrapStyle(patternProps)
|
|
11
|
-
const
|
|
11
|
+
const cssProps = { css: mergeCss(styleProps, props.css) }
|
|
12
|
+
const mergedProps = { ref, ...restProps, ...cssProps }
|
|
12
13
|
|
|
13
14
|
return createElement(styled.div, mergedProps)
|
|
14
15
|
})
|