@hi-ui/grid 4.0.0-beta.13 → 4.0.0-beta.16
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/lib/cjs/Grid.js +0 -29
- package/lib/cjs/index.js +1 -3
- package/lib/cjs/styles/index.scss.js +1 -1
- package/lib/esm/Grid.js +1 -29
- package/lib/esm/index.js +3 -4
- package/lib/esm/styles/index.scss.js +1 -1
- package/lib/types/Grid.d.ts +3 -12
- package/lib/types/index.d.ts +0 -1
- package/lib/types/types.d.ts +1 -0
- package/package.json +5 -5
package/lib/cjs/Grid.js
CHANGED
|
@@ -148,34 +148,5 @@ if (env.__DEV__) {
|
|
|
148
148
|
Col.displayName = 'Col';
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
var brPrefix = classname.getPrefixCls('grid-br');
|
|
152
|
-
/**
|
|
153
|
-
* TODO: What is Grid Br
|
|
154
|
-
*/
|
|
155
|
-
|
|
156
|
-
var Br = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
157
|
-
var _a$prefixCls3 = _a.prefixCls,
|
|
158
|
-
prefixCls = _a$prefixCls3 === void 0 ? brPrefix : _a$prefixCls3,
|
|
159
|
-
className = _a.className,
|
|
160
|
-
styleProp = _a.style,
|
|
161
|
-
height = _a.height,
|
|
162
|
-
rest = tslib.__rest(_a, ["prefixCls", "className", "style", "height"]);
|
|
163
|
-
|
|
164
|
-
var cls = classname.cx(prefixCls, className);
|
|
165
|
-
var style = height ? Object.assign(Object.assign({}, styleProp), {
|
|
166
|
-
height: height
|
|
167
|
-
}) : styleProp;
|
|
168
|
-
return /*#__PURE__*/React__default["default"].createElement("div", Object.assign({
|
|
169
|
-
ref: ref,
|
|
170
|
-
className: cls,
|
|
171
|
-
style: style
|
|
172
|
-
}, rest));
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
if (env.__DEV__) {
|
|
176
|
-
Br.displayName = 'Br';
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
exports.Br = Br;
|
|
180
151
|
exports.Col = Col;
|
|
181
152
|
exports.Row = Row;
|
package/lib/cjs/index.js
CHANGED
|
@@ -14,7 +14,7 @@ Object.defineProperty(exports, '__esModule', {
|
|
|
14
14
|
});
|
|
15
15
|
var css_248z = ".hi-v4-grid-row {position: relative;-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-ms-flex-wrap: wrap;flex-wrap: wrap;row-gap: var(--hi-v4-grid-row-gap);margin-left: calc(-1 * var(--hi-v4-grid-row-gutter) / 2);margin-right: calc(-1 * var(--hi-v4-grid-row-gutter) / 2); }.hi-v4-grid-row + .hi-v4-grid-row {margin-top: var(--hi-v4-grid-row-gap); }.hi-v4-grid-col {-webkit-box-sizing: border-box;box-sizing: border-box;-webkit-box-flex: 0;-ms-flex-positive: 0;flex-grow: 0;-ms-flex-negative: 0;flex-shrink: 0;-ms-flex-preferred-size: var(--hi-v4-grid-col-span);flex-basis: var(--hi-v4-grid-col-span);max-width: var(--hi-v4-grid-col-span);margin-left: var(--hi-v4-grid-col-offset);padding-left: calc(var(--hi-v4-grid-row-gutter) / 2);padding-right: calc(var(--hi-v4-grid-row-gutter) / 2); }";
|
|
16
16
|
|
|
17
|
-
var __styleInject__ = require('
|
|
17
|
+
var __styleInject__ = require('inject-head-style')["default"];
|
|
18
18
|
|
|
19
19
|
__styleInject__(css_248z);
|
|
20
20
|
|
package/lib/esm/Grid.js
CHANGED
|
@@ -126,32 +126,4 @@ if (__DEV__) {
|
|
|
126
126
|
Col.displayName = 'Col';
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* TODO: What is Grid Br
|
|
132
|
-
*/
|
|
133
|
-
|
|
134
|
-
var Br = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
135
|
-
var _a$prefixCls3 = _a.prefixCls,
|
|
136
|
-
prefixCls = _a$prefixCls3 === void 0 ? brPrefix : _a$prefixCls3,
|
|
137
|
-
className = _a.className,
|
|
138
|
-
styleProp = _a.style,
|
|
139
|
-
height = _a.height,
|
|
140
|
-
rest = __rest(_a, ["prefixCls", "className", "style", "height"]);
|
|
141
|
-
|
|
142
|
-
var cls = cx(prefixCls, className);
|
|
143
|
-
var style = height ? Object.assign(Object.assign({}, styleProp), {
|
|
144
|
-
height: height
|
|
145
|
-
}) : styleProp;
|
|
146
|
-
return /*#__PURE__*/React.createElement("div", Object.assign({
|
|
147
|
-
ref: ref,
|
|
148
|
-
className: cls,
|
|
149
|
-
style: style
|
|
150
|
-
}, rest));
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
if (__DEV__) {
|
|
154
|
-
Br.displayName = 'Br';
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export { Br, Col, Row };
|
|
129
|
+
export { Col, Row };
|
package/lib/esm/index.js
CHANGED
|
@@ -8,11 +8,10 @@
|
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
10
|
import './styles/index.scss.js';
|
|
11
|
-
import { Row, Col
|
|
12
|
-
export {
|
|
11
|
+
import { Row, Col } from './Grid.js';
|
|
12
|
+
export { Col, Row } from './Grid.js';
|
|
13
13
|
var Grid = {
|
|
14
14
|
Row: Row,
|
|
15
|
-
Col: Col
|
|
16
|
-
Br: Br
|
|
15
|
+
Col: Col
|
|
17
16
|
};
|
|
18
17
|
export { Grid as default };
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
|
-
import __styleInject__ from '
|
|
10
|
+
import __styleInject__ from 'inject-head-style';
|
|
11
11
|
var css_248z = ".hi-v4-grid-row {position: relative;-webkit-box-sizing: border-box;box-sizing: border-box;display: -webkit-box;display: -ms-flexbox;display: flex;-ms-flex-wrap: wrap;flex-wrap: wrap;row-gap: var(--hi-v4-grid-row-gap);margin-left: calc(-1 * var(--hi-v4-grid-row-gutter) / 2);margin-right: calc(-1 * var(--hi-v4-grid-row-gutter) / 2); }.hi-v4-grid-row + .hi-v4-grid-row {margin-top: var(--hi-v4-grid-row-gap); }.hi-v4-grid-col {-webkit-box-sizing: border-box;box-sizing: border-box;-webkit-box-flex: 0;-ms-flex-positive: 0;flex-grow: 0;-ms-flex-negative: 0;flex-shrink: 0;-ms-flex-preferred-size: var(--hi-v4-grid-col-span);flex-basis: var(--hi-v4-grid-col-span);max-width: var(--hi-v4-grid-col-span);margin-left: var(--hi-v4-grid-col-offset);padding-left: calc(var(--hi-v4-grid-row-gutter) / 2);padding-right: calc(var(--hi-v4-grid-row-gutter) / 2); }";
|
|
12
12
|
|
|
13
13
|
__styleInject__(css_248z);
|
package/lib/types/Grid.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { HiBaseHTMLProps } from '@hi-ui/core';
|
|
3
|
+
import { GridJustifyEnum } from './types';
|
|
3
4
|
/**
|
|
4
5
|
* TODO: What is Grid Row
|
|
5
6
|
*/
|
|
@@ -8,7 +9,7 @@ export interface RowProps extends HiBaseHTMLProps<'div'> {
|
|
|
8
9
|
/**
|
|
9
10
|
* 里面的元素排布方式
|
|
10
11
|
*/
|
|
11
|
-
justify?:
|
|
12
|
+
justify?: GridJustifyEnum;
|
|
12
13
|
/**
|
|
13
14
|
* Row 里面元素之间是否有外边距,建议使用偶数
|
|
14
15
|
*/
|
|
@@ -39,15 +40,5 @@ export interface ColProps extends HiBaseHTMLProps<'div'> {
|
|
|
39
40
|
/**
|
|
40
41
|
* 里面的元素排布方式
|
|
41
42
|
*/
|
|
42
|
-
justify?:
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* TODO: What is Grid Br
|
|
46
|
-
*/
|
|
47
|
-
export declare const Br: React.ForwardRefExoticComponent<BrProps & React.RefAttributes<HTMLDivElement | null>>;
|
|
48
|
-
export interface BrProps extends HiBaseHTMLProps<'div'> {
|
|
49
|
-
/**
|
|
50
|
-
* 换行符高度
|
|
51
|
-
*/
|
|
52
|
-
height?: number;
|
|
43
|
+
justify?: GridJustifyEnum;
|
|
53
44
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import './styles/index.scss';
|
|
|
3
3
|
declare const Grid: {
|
|
4
4
|
Row: import("react").ForwardRefExoticComponent<import("./Grid").RowProps & import("react").RefAttributes<HTMLDivElement | null>>;
|
|
5
5
|
Col: import("react").ForwardRefExoticComponent<import("./Grid").ColProps & import("react").RefAttributes<HTMLDivElement | null>>;
|
|
6
|
-
Br: import("react").ForwardRefExoticComponent<import("./Grid").BrProps & import("react").RefAttributes<HTMLDivElement | null>>;
|
|
7
6
|
};
|
|
8
7
|
export default Grid;
|
|
9
8
|
export * from './Grid';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type GridJustifyEnum = 'flex-start' | 'flex-end' | 'center' | 'space-around' | 'space-between';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hi-ui/grid",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.16",
|
|
4
4
|
"description": "A sub-package for @hi-ui/hiui.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "HIUI <mi-hiui@xiaomi.com>",
|
|
@@ -44,18 +44,18 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@hi-ui/classname": "^4.0.0-beta.0",
|
|
47
|
-
"@hi-ui/core": "^4.0.0-beta.
|
|
47
|
+
"@hi-ui/core": "^4.0.0-beta.9",
|
|
48
48
|
"@hi-ui/core-css": "^4.0.0-beta.5",
|
|
49
|
-
"@hi-ui/env": "^4.0.0-beta.
|
|
49
|
+
"@hi-ui/env": "^4.0.0-beta.1"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"react": ">=16.8.6",
|
|
53
53
|
"react-dom": ">=16.8.6"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@hi-ui/hi-build": "^4.0.0-beta.
|
|
56
|
+
"@hi-ui/hi-build": "^4.0.0-beta.5",
|
|
57
57
|
"react": "^17.0.1",
|
|
58
58
|
"react-dom": "^17.0.1"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "ef96654e009a72c3445d8df4a4182973631d00e9"
|
|
61
61
|
}
|