diginet-core-ui 1.3.52-beta.2 → 1.3.52-beta.3

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.
@@ -45,7 +45,7 @@ const FormGroup = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(({
45
45
  margin-bottom: 0 !important;
46
46
  }
47
47
  }
48
- .DGN-UI-TextInput {
48
+ &.DGN-UI-TextInput {
49
49
  display: flex;
50
50
  flex-direction: column;
51
51
  justify-content: space-between;
@@ -4,9 +4,38 @@
4
4
  import PropTypes from 'prop-types';
5
5
  import { jsx } from '@emotion/core';
6
6
  import Grid from '.';
7
+ import { makeStyles } from '../../theme';
8
+ const useStyles = makeStyles({
9
+ customCol: {
10
+ '& .DGN-UI-Control': {
11
+ marginBottom: 0
12
+ },
13
+ '& .DGN-UI-TextInput': {
14
+ marginBottom: 0
15
+ },
16
+ '& .DGN-UI-Dropdown': {
17
+ marginBottom: 0
18
+ },
19
+ '& .DGN-UI-FormGroup': {
20
+ marginBottom: 0
21
+ },
22
+ '& .DGN-UI-Money-Input': {
23
+ marginBottom: 0
24
+ },
25
+ '& .DGN-UI-NumberInput': {
26
+ marginBottom: 0
27
+ },
28
+ alignSelf: 'flex-end'
29
+ }
30
+ });
31
+ const classes = useStyles();
7
32
 
8
33
  const Col = props => {
34
+ const {
35
+ className
36
+ } = props;
9
37
  return jsx(Grid, { ...props,
38
+ className: [`DGN-UI-Col ${classes.customCol}`, className].join(' ').trim().replace(/\s+/g, ' '),
10
39
  item: true
11
40
  });
12
41
  };
@@ -19,7 +48,7 @@ Col.defaultProps = {
19
48
  md: false,
20
49
  sm: false,
21
50
  xl: false,
22
- xs: false,
51
+ xs: true,
23
52
  zeroMinWidth: false,
24
53
  wrap: 'wrap'
25
54
  };
@@ -5,10 +5,25 @@ import PropTypes from 'prop-types';
5
5
  import { jsx } from '@emotion/core';
6
6
  import Grid from '.';
7
7
 
8
+ const checkChildren = children => {
9
+ if (!children) return false;
10
+
11
+ if (Array.isArray(children)) {
12
+ return !children.every(v => v === false);
13
+ }
14
+
15
+ return true;
16
+ };
17
+
8
18
  const Row = props => {
9
- return jsx(Grid, { ...props,
19
+ const {
20
+ className,
21
+ children
22
+ } = props;
23
+ return checkChildren(children) ? jsx(Grid, { ...props,
24
+ className: ['DGN-UI-Row', className].join(' ').trim().replace(/\s+/g, ' '),
10
25
  container: true
11
- });
26
+ }) : null;
12
27
  };
13
28
 
14
29
  Row.defaultProps = {
@@ -24,8 +39,20 @@ Row.defaultProps = {
24
39
  spacing: 0,
25
40
  direction: 'row',
26
41
  wrap: 'wrap',
27
- columnSpacing: 4,
28
- rowSpacing: 4
42
+ columnSpacing: {
43
+ xs: 4,
44
+ sm: 4,
45
+ md: 4,
46
+ lg: 4,
47
+ xl: 6
48
+ },
49
+ rowSpacing: {
50
+ xs: 4,
51
+ sm: 4,
52
+ md: 4,
53
+ lg: 4,
54
+ xl: 6
55
+ }
29
56
  };
30
57
  Row.propTypes = {
31
58
  /** The content of the component. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "diginet-core-ui",
3
- "version": "1.3.52-beta.2",
3
+ "version": "1.3.52-beta.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "license": "UNLICENSED",