@smart-react-components/ui 2.0.0-alpha-12 → 2.0.0-alpha-14

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/Grid/Column.d.ts CHANGED
@@ -2,8 +2,5 @@ import { StyledProps } from '@smart-react-components/core/styled-props';
2
2
  import { Partial, ResponsiveProp } from '@smart-react-components/core/types';
3
3
  export interface Props extends StyledProps, Partial<ResponsiveProp<'col', number>>, Partial<ResponsiveProp<'pos', number>> {
4
4
  }
5
- declare const _default: import("styled-components").StyledComponent<"div", any, StyledProps & {
6
- getCol: (v: any) => string;
7
- getPos: (v: any) => string;
8
- } & Props, "getCol" | "getPos">;
5
+ declare const _default: import("styled-components").StyledComponent<"div", any, StyledProps & Props, never>;
9
6
  export default _default;
package/Grid/Column.js CHANGED
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const Div_1 = __importDefault(require("@smart-react-components/core/Element/Div"));
7
7
  const styled_components_1 = __importDefault(require("styled-components"));
8
8
  const grid_1 = require("../constants/grid");
9
- exports.default = (0, styled_components_1.default)(Div_1.default).attrs({
9
+ exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ paddingHorizontal = '$length.grid.space' }) => ({
10
10
  getCol: v => `
11
11
  flex: 0 0 ${grid_1.columns[v]}%;
12
12
  max-width: ${grid_1.columns[v]}%;
@@ -14,7 +14,8 @@ exports.default = (0, styled_components_1.default)(Div_1.default).attrs({
14
14
  getPos: v => `
15
15
  margin-left: ${v < 0 ? '-' : ''}${grid_1.columns[Math.abs(v)]}%;
16
16
  `,
17
- }) `
17
+ paddingHorizontal,
18
+ })) `
18
19
  box-sizing: border-box;
19
20
  width: 100%;
20
21
  `;
package/Grid/Container.js CHANGED
@@ -5,8 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const Div_1 = __importDefault(require("@smart-react-components/core/Element/Div"));
7
7
  const styled_components_1 = __importDefault(require("styled-components"));
8
- exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ marginHorizontal = 'auto' }) => ({
8
+ exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ marginHorizontal = 'auto', paddingHorizontal = '$length.grid.space' }) => ({
9
9
  marginHorizontal,
10
+ paddingHorizontal,
10
11
  maxWidth: '100%',
11
12
  maxWidthSm: '{length.grid.containerWidth.small}px',
12
13
  maxWidthMd: '{length.grid.containerWidth.medium}px',
package/Grid/Row.js CHANGED
@@ -5,7 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const Div_1 = __importDefault(require("@smart-react-components/core/Element/Div"));
7
7
  const styled_components_1 = __importDefault(require("styled-components"));
8
- exports.default = (0, styled_components_1.default)(Div_1.default) `
8
+ exports.default = (0, styled_components_1.default)(Div_1.default).attrs(({ marginHorizontal = '-{length.grid.space}' }) => ({
9
+ marginHorizontal,
10
+ })) `
9
11
  box-sizing: border-box;
10
12
  display: flex;
11
13
  flex-wrap: wrap;
@@ -104,6 +104,7 @@ exports.default = (0, styled_components_1.default)(Button_1.default).attrs(({ ha
104
104
  : `
105
105
  display: flex;
106
106
  flex: 1 1 auto;
107
+ width: 100%;
107
108
  `}
108
109
  `
109
110
  : ''}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smart-react-components/ui",
3
- "version": "2.0.0-alpha-12",
3
+ "version": "2.0.0-alpha-14",
4
4
  "license": "MIT",
5
5
  "main": "index.js",
6
6
  "description": "SRC UI includes React and Styled components.",
@@ -64,9 +64,9 @@
64
64
  "test": "jest"
65
65
  },
66
66
  "devDependencies": {
67
- "@smart-react-components/core": "2.0.0-alpha-17",
68
- "@smart-react-components/router": "2.0.0-alpha-13",
69
- "@smart-react-components/transition": "2.0.0-alpha-13",
67
+ "@smart-react-components/core": "2.0.0-alpha-18",
68
+ "@smart-react-components/router": "2.0.0-alpha-14",
69
+ "@smart-react-components/transition": "2.0.0-alpha-14",
70
70
  "@testing-library/react": "13.4.0",
71
71
  "@types/jest": "29.0.1",
72
72
  "@types/react": "18.0.19",
@@ -83,9 +83,9 @@
83
83
  "typescript": "4.8.3"
84
84
  },
85
85
  "peerDependencies": {
86
- "@smart-react-components/core": "^2.0.0-alpha-17",
87
- "@smart-react-components/router": "^2.0.0-alpha-13",
88
- "@smart-react-components/transition": "^2.0.0-alpha-13",
86
+ "@smart-react-components/core": "^2.0.0-alpha-18",
87
+ "@smart-react-components/router": "^2.0.0-alpha-14",
88
+ "@smart-react-components/transition": "^2.0.0-alpha-14",
89
89
  "react": "^18.2.0",
90
90
  "react-dom": "^18.2.0",
91
91
  "styled-components": "^5.3.5"