react-native-sj-ui 0.1.0 → 0.1.1
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/module/components/Column.js +13 -0
- package/lib/module/components/Column.js.map +1 -0
- package/lib/module/components/Flex.js +37 -0
- package/lib/module/components/Flex.js.map +1 -0
- package/lib/module/components/Row.js +13 -0
- package/lib/module/components/Row.js.map +1 -0
- package/lib/module/components/index.js +9 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/index.js +2 -6
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/components/Column.d.ts +7 -0
- package/lib/typescript/src/components/Column.d.ts.map +1 -0
- package/lib/typescript/src/components/Flex.d.ts +19 -0
- package/lib/typescript/src/components/Flex.d.ts.map +1 -0
- package/lib/typescript/src/components/Row.d.ts +7 -0
- package/lib/typescript/src/components/Row.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +7 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +2 -6
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Column.tsx +12 -0
- package/src/components/Flex.tsx +71 -0
- package/src/components/Row.tsx +12 -0
- package/src/components/index.ts +7 -0
- package/src/index.tsx +2 -6
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import Flex from "./Flex.js";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
const Column = props => {
|
|
7
|
+
return /*#__PURE__*/_jsx(Flex, {
|
|
8
|
+
direction: "column",
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
export default Column;
|
|
13
|
+
//# sourceMappingURL=Column.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Flex","jsx","_jsx","Column","props","direction"],"sourceRoot":"../../../src","sources":["components/Column.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAGzB,OAAOC,IAAI,MAAM,WAAQ;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAI1B,MAAMC,MAA6B,GAAIC,KAAK,IAAK;EAC/C,oBAAOF,IAAA,CAACF,IAAI;IAACK,SAAS,EAAC,QAAQ;IAAA,GAAKD;EAAK,CAAG,CAAC;AAC/C,CAAC;AAED,eAAeD,MAAM","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
const Flex = ({
|
|
7
|
+
children,
|
|
8
|
+
direction = 'column',
|
|
9
|
+
flex,
|
|
10
|
+
flexGrow,
|
|
11
|
+
flexShrink,
|
|
12
|
+
flexWrap,
|
|
13
|
+
gap,
|
|
14
|
+
justifyContent = 'flex-start',
|
|
15
|
+
alignItems = 'stretch',
|
|
16
|
+
alignSelf,
|
|
17
|
+
style,
|
|
18
|
+
...rest
|
|
19
|
+
}) => {
|
|
20
|
+
return /*#__PURE__*/_jsx(View, {
|
|
21
|
+
...rest,
|
|
22
|
+
style: [{
|
|
23
|
+
flexDirection: direction,
|
|
24
|
+
flex,
|
|
25
|
+
flexGrow,
|
|
26
|
+
flexShrink,
|
|
27
|
+
flexWrap,
|
|
28
|
+
gap,
|
|
29
|
+
justifyContent,
|
|
30
|
+
alignItems,
|
|
31
|
+
alignSelf
|
|
32
|
+
}, style],
|
|
33
|
+
children: children
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
export default Flex;
|
|
37
|
+
//# sourceMappingURL=Flex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","jsx","_jsx","Flex","children","direction","flex","flexGrow","flexShrink","flexWrap","gap","justifyContent","alignItems","alignSelf","style","rest","flexDirection"],"sourceRoot":"../../../src","sources":["components/Flex.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAIzB,SAASC,IAAI,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAqBpC,MAAMC,IAAyB,GAAGA,CAAC;EACjCC,QAAQ;EAERC,SAAS,GAAG,QAAQ;EAEpBC,IAAI;EACJC,QAAQ;EACRC,UAAU;EACVC,QAAQ;EAERC,GAAG;EAEHC,cAAc,GAAG,YAAY;EAC7BC,UAAU,GAAG,SAAS;EACtBC,SAAS;EAETC,KAAK;EACL,GAAGC;AACL,CAAC,KAAK;EACJ,oBACEb,IAAA,CAACF,IAAI;IAAA,GACCe,IAAI;IACRD,KAAK,EAAE,CACL;MACEE,aAAa,EAAEX,SAAS;MAExBC,IAAI;MACJC,QAAQ;MACRC,UAAU;MACVC,QAAQ;MAERC,GAAG;MAEHC,cAAc;MACdC,UAAU;MACVC;IACF,CAAC,EACDC,KAAK,CACL;IAAAV,QAAA,EAEDA;EAAQ,CACL,CAAC;AAEX,CAAC;AAED,eAAeD,IAAI","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import Flex from "./Flex.js";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
const Row = props => {
|
|
7
|
+
return /*#__PURE__*/_jsx(Flex, {
|
|
8
|
+
direction: "row",
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
export default Row;
|
|
13
|
+
//# sourceMappingURL=Row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Flex","jsx","_jsx","Row","props","direction"],"sourceRoot":"../../../src","sources":["components/Row.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAGzB,OAAOC,IAAI,MAAM,WAAQ;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAI1B,MAAMC,GAAuB,GAAIC,KAAK,IAAK;EACzC,oBAAOF,IAAA,CAACF,IAAI;IAACK,SAAS,EAAC,KAAK;IAAA,GAAKD;EAAK,CAAG,CAAC;AAC5C,CAAC;AAED,eAAeD,GAAG","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import Column from "./Column.js";
|
|
4
|
+
import Flex from "./Flex.js";
|
|
5
|
+
import Row from "./Row.js";
|
|
6
|
+
import TextView from "./TextView.js";
|
|
7
|
+
import ViewCard from "./ViewCard.js";
|
|
8
|
+
export { Column, Flex, Row, TextView, ViewCard };
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Column","Flex","Row","TextView","ViewCard"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,OAAOA,MAAM,MAAM,aAAU;AAC7B,OAAOC,IAAI,MAAM,WAAQ;AACzB,OAAOC,GAAG,MAAM,UAAO;AACvB,OAAOC,QAAQ,MAAM,eAAY;AACjC,OAAOC,QAAQ,MAAM,eAAY;AAEjC,SAASJ,MAAM,EAAEC,IAAI,EAAEC,GAAG,EAAEC,QAAQ,EAAEC,QAAQ","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import ViewCard from "./components/ViewCard.js";
|
|
6
|
-
export { TextView };
|
|
7
|
-
export { SjUiProvider };
|
|
8
|
-
export { ViewCard };
|
|
3
|
+
export { SjUiProvider } from "./provider/UIProvider.js";
|
|
4
|
+
export { TextView, ViewCard, Row, Column, Flex } from "./components/index.js";
|
|
9
5
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SjUiProvider","TextView","ViewCard"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,0BAAuB;
|
|
1
|
+
{"version":3,"names":["SjUiProvider","TextView","ViewCard","Row","Column","Flex"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,0BAAuB;AAEpD,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,GAAG,EAAEC,MAAM,EAAEC,IAAI,QAAQ,uBAAc","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
import Flex from './Flex.js';
|
|
4
|
+
type ColumnProps = Omit<ComponentProps<typeof Flex>, 'direction'>;
|
|
5
|
+
declare const Column: React.FC<ColumnProps>;
|
|
6
|
+
export default Column;
|
|
7
|
+
//# sourceMappingURL=Column.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Column.d.ts","sourceRoot":"","sources":["../../../../src/components/Column.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,IAAI,MAAM,WAAQ,CAAC;AAE1B,KAAK,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC;AAElE,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAEjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { ViewProps, ViewStyle, StyleProp } from 'react-native';
|
|
4
|
+
interface FlexProps extends ViewProps {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
direction?: ViewStyle['flexDirection'];
|
|
7
|
+
flex?: ViewStyle['flex'];
|
|
8
|
+
flexGrow?: ViewStyle['flexGrow'];
|
|
9
|
+
flexShrink?: ViewStyle['flexShrink'];
|
|
10
|
+
flexWrap?: ViewStyle['flexWrap'];
|
|
11
|
+
gap?: ViewStyle['gap'];
|
|
12
|
+
justifyContent?: ViewStyle['justifyContent'];
|
|
13
|
+
alignItems?: ViewStyle['alignItems'];
|
|
14
|
+
alignSelf?: ViewStyle['alignSelf'];
|
|
15
|
+
style?: StyleProp<ViewStyle>;
|
|
16
|
+
}
|
|
17
|
+
declare const Flex: React.FC<FlexProps>;
|
|
18
|
+
export default Flex;
|
|
19
|
+
//# sourceMappingURL=Flex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Flex.d.ts","sourceRoot":"","sources":["../../../../src/components/Flex.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpE,UAAU,SAAU,SAAQ,SAAS;IACnC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,SAAS,CAAC,EAAE,SAAS,CAAC,eAAe,CAAC,CAAC;IAEvC,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACzB,QAAQ,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IAEjC,GAAG,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;IAEvB,cAAc,CAAC,EAAE,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC7C,UAAU,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IAEnC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA2C7B,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
import Flex from './Flex.js';
|
|
4
|
+
type RowProps = Omit<ComponentProps<typeof Flex>, 'direction'>;
|
|
5
|
+
declare const Row: React.FC<RowProps>;
|
|
6
|
+
export default Row;
|
|
7
|
+
//# sourceMappingURL=Row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../../../src/components/Row.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,IAAI,MAAM,WAAQ,CAAC;AAE1B,KAAK,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC;AAE/D,QAAA,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAE3B,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAU,CAAC;AAC9B,OAAO,IAAI,MAAM,WAAQ,CAAC;AAC1B,OAAO,GAAG,MAAM,UAAO,CAAC;AACxB,OAAO,QAAQ,MAAM,eAAY,CAAC;AAClC,OAAO,QAAQ,MAAM,eAAY,CAAC;AAElC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import ViewCard from './components/ViewCard.js';
|
|
4
|
-
export { TextView };
|
|
5
|
-
export { SjUiProvider };
|
|
6
|
-
export { ViewCard };
|
|
1
|
+
export { SjUiProvider } from './provider/UIProvider.js';
|
|
2
|
+
export { TextView, ViewCard, Row, Column, Flex } from './components/index.js';
|
|
7
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAAuB,CAAC;AAErD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,uBAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
|
|
4
|
+
import Flex from './Flex';
|
|
5
|
+
|
|
6
|
+
type ColumnProps = Omit<ComponentProps<typeof Flex>, 'direction'>;
|
|
7
|
+
|
|
8
|
+
const Column: React.FC<ColumnProps> = (props) => {
|
|
9
|
+
return <Flex direction="column" {...props} />;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default Column;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { ViewProps, ViewStyle, StyleProp } from 'react-native';
|
|
4
|
+
|
|
5
|
+
import { View } from 'react-native';
|
|
6
|
+
|
|
7
|
+
interface FlexProps extends ViewProps {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
|
|
10
|
+
direction?: ViewStyle['flexDirection'];
|
|
11
|
+
|
|
12
|
+
flex?: ViewStyle['flex'];
|
|
13
|
+
flexGrow?: ViewStyle['flexGrow'];
|
|
14
|
+
flexShrink?: ViewStyle['flexShrink'];
|
|
15
|
+
flexWrap?: ViewStyle['flexWrap'];
|
|
16
|
+
|
|
17
|
+
gap?: ViewStyle['gap'];
|
|
18
|
+
|
|
19
|
+
justifyContent?: ViewStyle['justifyContent'];
|
|
20
|
+
alignItems?: ViewStyle['alignItems'];
|
|
21
|
+
alignSelf?: ViewStyle['alignSelf'];
|
|
22
|
+
|
|
23
|
+
style?: StyleProp<ViewStyle>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const Flex: React.FC<FlexProps> = ({
|
|
27
|
+
children,
|
|
28
|
+
|
|
29
|
+
direction = 'column',
|
|
30
|
+
|
|
31
|
+
flex,
|
|
32
|
+
flexGrow,
|
|
33
|
+
flexShrink,
|
|
34
|
+
flexWrap,
|
|
35
|
+
|
|
36
|
+
gap,
|
|
37
|
+
|
|
38
|
+
justifyContent = 'flex-start',
|
|
39
|
+
alignItems = 'stretch',
|
|
40
|
+
alignSelf,
|
|
41
|
+
|
|
42
|
+
style,
|
|
43
|
+
...rest
|
|
44
|
+
}) => {
|
|
45
|
+
return (
|
|
46
|
+
<View
|
|
47
|
+
{...rest}
|
|
48
|
+
style={[
|
|
49
|
+
{
|
|
50
|
+
flexDirection: direction,
|
|
51
|
+
|
|
52
|
+
flex,
|
|
53
|
+
flexGrow,
|
|
54
|
+
flexShrink,
|
|
55
|
+
flexWrap,
|
|
56
|
+
|
|
57
|
+
gap,
|
|
58
|
+
|
|
59
|
+
justifyContent,
|
|
60
|
+
alignItems,
|
|
61
|
+
alignSelf,
|
|
62
|
+
},
|
|
63
|
+
style,
|
|
64
|
+
]}
|
|
65
|
+
>
|
|
66
|
+
{children}
|
|
67
|
+
</View>
|
|
68
|
+
);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export default Flex;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
|
|
4
|
+
import Flex from './Flex';
|
|
5
|
+
|
|
6
|
+
type RowProps = Omit<ComponentProps<typeof Flex>, 'direction'>;
|
|
7
|
+
|
|
8
|
+
const Row: React.FC<RowProps> = (props) => {
|
|
9
|
+
return <Flex direction="row" {...props} />;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default Row;
|
package/src/index.tsx
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import TextView from './components/TextView';
|
|
3
|
-
import ViewCard from './components/ViewCard';
|
|
1
|
+
export { SjUiProvider } from './provider/UIProvider';
|
|
4
2
|
|
|
5
|
-
export { TextView };
|
|
6
|
-
export { SjUiProvider };
|
|
7
|
-
export { ViewCard };
|
|
3
|
+
export { TextView, ViewCard, Row, Column, Flex } from './components';
|