@canlooks/can-ui 0.0.6 → 0.0.8

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.
@@ -8,7 +8,7 @@ const utils_1 = require("../../utils");
8
8
  const transportStyle_1 = require("../transportStyle");
9
9
  exports.Flex = (0, react_1.forwardRef)(({ inline, direction = 'row', wrap, gap = 0, columnGap, rowGap, compact, ...props }, ref) => {
10
10
  const renderChildren = () => {
11
- if (compact) {
11
+ if (!compact) {
12
12
  return props.children;
13
13
  }
14
14
  const childrenCount = react_1.Children.count(props.children);
@@ -26,7 +26,7 @@ exports.Flex = (0, react_1.forwardRef)(({ inline, direction = 'row', wrap, gap =
26
26
  return ((0, jsx_runtime_1.jsx)(transportStyle_1.TransportStyle, { ...props, ref: ref, className: (0, utils_1.classnames)(flex_style_1.classes.root, props.className), style: {
27
27
  display: inline ? 'inline-flex' : 'flex',
28
28
  flexDirection: direction,
29
- flexWrap: wrap, gap, columnGap, rowGap,
29
+ flexWrap: wrap, columnGap, rowGap, gap,
30
30
  ...props.style
31
31
  }, children: renderChildren() }));
32
32
  });
@@ -7,8 +7,8 @@ exports.TransportStyle = (0, react_1.forwardRef)(({ alignItems, justifyContent,
7
7
  return ((0, jsx_runtime_1.jsx)("div", { ...props, ref: ref, style: {
8
8
  alignItems, justifyContent, alignSelf, justifySelf, flex,
9
9
  width, minWidth, maxWidth, height, minHeight, maxHeight, lineHeight,
10
- padding, paddingTop, paddingRight, paddingBottom, paddingLeft,
11
- margin, marginTop, marginRight, marginBottom, marginLeft,
10
+ paddingTop, paddingRight, paddingBottom, paddingLeft, padding,
11
+ marginTop, marginRight, marginBottom, marginLeft, margin,
12
12
  ...props.style
13
13
  } }));
14
14
  });
@@ -5,7 +5,7 @@ import { classnames } from '../../utils';
5
5
  import { TransportStyle } from '../transportStyle';
6
6
  export const Flex = forwardRef(({ inline, direction = 'row', wrap, gap = 0, columnGap, rowGap, compact, ...props }, ref) => {
7
7
  const renderChildren = () => {
8
- if (compact) {
8
+ if (!compact) {
9
9
  return props.children;
10
10
  }
11
11
  const childrenCount = Children.count(props.children);
@@ -23,7 +23,7 @@ export const Flex = forwardRef(({ inline, direction = 'row', wrap, gap = 0, colu
23
23
  return (_jsx(TransportStyle, { ...props, ref: ref, className: classnames(classes.root, props.className), style: {
24
24
  display: inline ? 'inline-flex' : 'flex',
25
25
  flexDirection: direction,
26
- flexWrap: wrap, gap, columnGap, rowGap,
26
+ flexWrap: wrap, columnGap, rowGap, gap,
27
27
  ...props.style
28
28
  }, children: renderChildren() }));
29
29
  });
@@ -4,8 +4,8 @@ export const TransportStyle = forwardRef(({ alignItems, justifyContent, alignSel
4
4
  return (_jsx("div", { ...props, ref: ref, style: {
5
5
  alignItems, justifyContent, alignSelf, justifySelf, flex,
6
6
  width, minWidth, maxWidth, height, minHeight, maxHeight, lineHeight,
7
- padding, paddingTop, paddingRight, paddingBottom, paddingLeft,
8
- margin, marginTop, marginRight, marginBottom, marginLeft,
7
+ paddingTop, paddingRight, paddingBottom, paddingLeft, padding,
8
+ marginTop, marginRight, marginBottom, marginLeft, margin,
9
9
  ...props.style
10
10
  } }));
11
11
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canlooks/can-ui",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "author": "C.CanLiang <canlooks@gmail.com>",
5
5
  "description": "My ui framework",
6
6
  "license": "MIT",