@uni-design-system/uni-react 0.0.5 → 0.0.7
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/cjs/core/flex/flex.component.d.ts +2 -2
- package/dist/cjs/core/flex/flex.component.js +2 -11
- package/dist/cjs/core/flex/flex.component.js.map +1 -1
- package/dist/cjs/core/flex/index.d.ts +1 -0
- package/dist/cjs/core/flex/index.js +1 -0
- package/dist/cjs/core/flex/index.js.map +1 -1
- package/dist/esm/core/flex/flex.component.d.ts +2 -2
- package/dist/esm/core/flex/flex.component.js +2 -11
- package/dist/esm/core/flex/flex.component.js.map +1 -1
- package/dist/esm/core/flex/index.d.ts +1 -0
- package/dist/esm/core/flex/index.js +1 -0
- package/dist/esm/core/flex/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
1
|
+
import React, { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { AlignContent, FlexDirection, FlexGrow, FlexShrink, FlexWrap, JustifyContent } from '@uni-design-system/uni-core';
|
|
3
|
-
export interface FlexOptions {
|
|
3
|
+
export interface FlexOptions extends HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
/**
|
|
5
5
|
* Shorthand for `alignItems` style prop
|
|
6
6
|
* @type AlignItems
|
|
@@ -26,17 +26,8 @@ const react_2 = require("react");
|
|
|
26
26
|
* @see Docs
|
|
27
27
|
*/
|
|
28
28
|
exports.Flex = (0, react_2.forwardRef)((props, ref) => {
|
|
29
|
-
const { direction, align, justify, wrap, basis, grow, shrink } = props, rest = __rest(props, ["direction", "align", "justify", "wrap", "basis", "grow", "shrink"]);
|
|
30
|
-
const styles = {
|
|
31
|
-
display: 'flex',
|
|
32
|
-
flexDirection: direction,
|
|
33
|
-
alignItems: align,
|
|
34
|
-
justifyContent: justify,
|
|
35
|
-
flexWrap: wrap,
|
|
36
|
-
flexBasis: basis,
|
|
37
|
-
flexGrow: grow,
|
|
38
|
-
flexShrink: shrink,
|
|
39
|
-
};
|
|
29
|
+
const { direction, align, justify, wrap, basis, grow, shrink, style } = props, rest = __rest(props, ["direction", "align", "justify", "wrap", "basis", "grow", "shrink", "style"]);
|
|
30
|
+
const styles = Object.assign({ display: 'flex', flexDirection: direction, alignItems: align, justifyContent: justify, flexWrap: wrap, flexBasis: basis, flexGrow: grow, flexShrink: shrink }, style);
|
|
40
31
|
return react_1.default.createElement("div", Object.assign({ ref: ref, style: styles }, rest));
|
|
41
32
|
});
|
|
42
33
|
exports.Flex.displayName = 'Flex';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flex.component.js","sourceRoot":"","sources":["../../../../src/core/flex/flex.component.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"flex.component.js","sourceRoot":"","sources":["../../../../src/core/flex/flex.component.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAAyD;AACzD,iCAAkD;AA2DlD;;;;;;;GAOG;AACU,QAAA,IAAI,GAAG,IAAA,kBAAU,EAA4B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACvE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAAhF,6EAAwE,CAAQ,CAAC;IAEvF,MAAM,MAAM,mBACV,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,SAAS,EACxB,UAAU,EAAE,KAAK,EACjB,cAAc,EAAE,OAAO,EACvB,QAAQ,EAAE,IAAI,EACd,SAAS,EAAE,KAAK,EAChB,QAAQ,EAAE,IAAI,EACd,UAAU,EAAE,MAAM,IACf,KAAK,CACT,CAAC;IAEF,OAAO,qDAAK,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,IAAM,IAAI,EAAI,CAAC;AACpD,CAAC,CAAC,CAAC;AAEH,YAAI,CAAC,WAAW,GAAG,MAAM,CAAC"}
|
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./flex.style"), exports);
|
|
18
|
+
__exportStar(require("./flex.component"), exports);
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/flex/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/flex/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,mDAAiC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { ReactNode } from 'react';
|
|
1
|
+
import React, { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { AlignContent, FlexDirection, FlexGrow, FlexShrink, FlexWrap, JustifyContent } from '@uni-design-system/uni-core';
|
|
3
|
-
export interface FlexOptions {
|
|
3
|
+
export interface FlexOptions extends HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
/**
|
|
5
5
|
* Shorthand for `alignItems` style prop
|
|
6
6
|
* @type AlignItems
|
|
@@ -20,17 +20,8 @@ import { forwardRef } from 'react';
|
|
|
20
20
|
* @see Docs
|
|
21
21
|
*/
|
|
22
22
|
export const Flex = forwardRef((props, ref) => {
|
|
23
|
-
const { direction, align, justify, wrap, basis, grow, shrink } = props, rest = __rest(props, ["direction", "align", "justify", "wrap", "basis", "grow", "shrink"]);
|
|
24
|
-
const styles = {
|
|
25
|
-
display: 'flex',
|
|
26
|
-
flexDirection: direction,
|
|
27
|
-
alignItems: align,
|
|
28
|
-
justifyContent: justify,
|
|
29
|
-
flexWrap: wrap,
|
|
30
|
-
flexBasis: basis,
|
|
31
|
-
flexGrow: grow,
|
|
32
|
-
flexShrink: shrink,
|
|
33
|
-
};
|
|
23
|
+
const { direction, align, justify, wrap, basis, grow, shrink, style } = props, rest = __rest(props, ["direction", "align", "justify", "wrap", "basis", "grow", "shrink", "style"]);
|
|
24
|
+
const styles = Object.assign({ display: 'flex', flexDirection: direction, alignItems: align, justifyContent: justify, flexWrap: wrap, flexBasis: basis, flexGrow: grow, flexShrink: shrink }, style);
|
|
34
25
|
return React.createElement("div", Object.assign({ ref: ref, style: styles }, rest));
|
|
35
26
|
});
|
|
36
27
|
Flex.displayName = 'Flex';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flex.component.js","sourceRoot":"","sources":["../../../../src/core/flex/flex.component.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"flex.component.js","sourceRoot":"","sources":["../../../../src/core/flex/flex.component.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAAiB,UAAU,EAAE,MAAM,OAAO,CAAC;AA2DlD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAA4B,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACvE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAAhF,6EAAwE,CAAQ,CAAC;IAEvF,MAAM,MAAM,mBACV,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,SAAS,EACxB,UAAU,EAAE,KAAK,EACjB,cAAc,EAAE,OAAO,EACvB,QAAQ,EAAE,IAAI,EACd,SAAS,EAAE,KAAK,EAChB,QAAQ,EAAE,IAAI,EACd,UAAU,EAAE,MAAM,IACf,KAAK,CACT,CAAC;IAEF,OAAO,2CAAK,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,IAAM,IAAI,EAAI,CAAC;AACpD,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/flex/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/flex/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC"}
|