@xaui/native 0.1.1 → 0.1.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.
- package/dist/view/index.cjs +11 -16
- package/dist/view/index.d.cts +1 -1
- package/dist/view/index.d.ts +1 -1
- package/dist/view/index.js +11 -16
- package/package.json +1 -1
package/dist/view/index.cjs
CHANGED
|
@@ -42,12 +42,13 @@ var Column = ({
|
|
|
42
42
|
style
|
|
43
43
|
}) => {
|
|
44
44
|
const gapStyle = spacing === void 0 ? void 0 : { gap: spacing };
|
|
45
|
-
const fullWidthStyle = fullWidth ? {
|
|
45
|
+
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
46
46
|
return /* @__PURE__ */ _react2.default.createElement(
|
|
47
47
|
_reactnative.View,
|
|
48
48
|
{
|
|
49
49
|
style: [
|
|
50
50
|
{
|
|
51
|
+
flex: 1,
|
|
51
52
|
flexDirection: reverse ? "column-reverse" : "column",
|
|
52
53
|
justifyContent: resolveMainAxisAlignment(mainAxisAlignment),
|
|
53
54
|
alignItems: resolveCrossAxisAlignment(crossAxisAlignment)
|
|
@@ -74,7 +75,7 @@ var Row = ({
|
|
|
74
75
|
style
|
|
75
76
|
}) => {
|
|
76
77
|
const gapStyle = spacing === void 0 ? void 0 : { gap: spacing };
|
|
77
|
-
const fullWidthStyle = fullWidth ? {
|
|
78
|
+
const fullWidthStyle = fullWidth ? { flexShrink: 1, flexBasis: "auto", width: "100%" } : void 0;
|
|
78
79
|
return /* @__PURE__ */ _react2.default.createElement(
|
|
79
80
|
_reactnative.View,
|
|
80
81
|
{
|
|
@@ -128,12 +129,13 @@ var Padding = ({
|
|
|
128
129
|
fullWidth,
|
|
129
130
|
style
|
|
130
131
|
}) => {
|
|
131
|
-
const fullWidthStyle = fullWidth ? {
|
|
132
|
+
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
132
133
|
return /* @__PURE__ */ _react2.default.createElement(
|
|
133
134
|
_reactnative.View,
|
|
134
135
|
{
|
|
135
136
|
style: [
|
|
136
137
|
{
|
|
138
|
+
flex: 1,
|
|
137
139
|
padding: all,
|
|
138
140
|
paddingHorizontal: horizontal,
|
|
139
141
|
paddingVertical: vertical,
|
|
@@ -166,12 +168,13 @@ var Margin = ({
|
|
|
166
168
|
fullWidth,
|
|
167
169
|
style
|
|
168
170
|
}) => {
|
|
169
|
-
const fullWidthStyle = fullWidth ? {
|
|
171
|
+
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
170
172
|
return /* @__PURE__ */ _react2.default.createElement(
|
|
171
173
|
_reactnative.View,
|
|
172
174
|
{
|
|
173
175
|
style: [
|
|
174
176
|
{
|
|
177
|
+
flex: 1,
|
|
175
178
|
margin: all,
|
|
176
179
|
marginHorizontal: horizontal,
|
|
177
180
|
marginVertical: vertical,
|
|
@@ -414,12 +417,7 @@ var Surface = ({
|
|
|
414
417
|
{
|
|
415
418
|
style: [
|
|
416
419
|
radiusStyle,
|
|
417
|
-
fullWidth && {
|
|
418
|
-
flexShrink: 1,
|
|
419
|
-
flexBasis: "auto",
|
|
420
|
-
width: "100%",
|
|
421
|
-
flexGrow: 1
|
|
422
|
-
},
|
|
420
|
+
fullWidth && { flexShrink: 1, flexBasis: "auto", width: "100%" },
|
|
423
421
|
{
|
|
424
422
|
backgroundColor: background,
|
|
425
423
|
padding
|
|
@@ -435,17 +433,14 @@ Surface.displayName = "Surface";
|
|
|
435
433
|
// src/components/view/center/center.tsx
|
|
436
434
|
|
|
437
435
|
|
|
438
|
-
var Center = ({
|
|
439
|
-
|
|
440
|
-
fullWidth = false,
|
|
441
|
-
style
|
|
442
|
-
}) => {
|
|
443
|
-
const fullWidthStyle = fullWidth ? { flexGrow: 1, flexShrink: 1, flexBasis: "auto", width: "100%" } : { flexGrow: 1 };
|
|
436
|
+
var Center = ({ children, fullWidth, style }) => {
|
|
437
|
+
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
444
438
|
return /* @__PURE__ */ _react2.default.createElement(
|
|
445
439
|
_reactnative.View,
|
|
446
440
|
{
|
|
447
441
|
style: [
|
|
448
442
|
{
|
|
443
|
+
flex: 1,
|
|
449
444
|
alignItems: "center",
|
|
450
445
|
justifyContent: "center"
|
|
451
446
|
},
|
package/dist/view/index.d.cts
CHANGED
package/dist/view/index.d.ts
CHANGED
package/dist/view/index.js
CHANGED
|
@@ -42,12 +42,13 @@ var Column = ({
|
|
|
42
42
|
style
|
|
43
43
|
}) => {
|
|
44
44
|
const gapStyle = spacing === void 0 ? void 0 : { gap: spacing };
|
|
45
|
-
const fullWidthStyle = fullWidth ? {
|
|
45
|
+
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
46
46
|
return /* @__PURE__ */ React.createElement(
|
|
47
47
|
View,
|
|
48
48
|
{
|
|
49
49
|
style: [
|
|
50
50
|
{
|
|
51
|
+
flex: 1,
|
|
51
52
|
flexDirection: reverse ? "column-reverse" : "column",
|
|
52
53
|
justifyContent: resolveMainAxisAlignment(mainAxisAlignment),
|
|
53
54
|
alignItems: resolveCrossAxisAlignment(crossAxisAlignment)
|
|
@@ -74,7 +75,7 @@ var Row = ({
|
|
|
74
75
|
style
|
|
75
76
|
}) => {
|
|
76
77
|
const gapStyle = spacing === void 0 ? void 0 : { gap: spacing };
|
|
77
|
-
const fullWidthStyle = fullWidth ? {
|
|
78
|
+
const fullWidthStyle = fullWidth ? { flexShrink: 1, flexBasis: "auto", width: "100%" } : void 0;
|
|
78
79
|
return /* @__PURE__ */ React2.createElement(
|
|
79
80
|
View2,
|
|
80
81
|
{
|
|
@@ -128,12 +129,13 @@ var Padding = ({
|
|
|
128
129
|
fullWidth,
|
|
129
130
|
style
|
|
130
131
|
}) => {
|
|
131
|
-
const fullWidthStyle = fullWidth ? {
|
|
132
|
+
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
132
133
|
return /* @__PURE__ */ React4.createElement(
|
|
133
134
|
View4,
|
|
134
135
|
{
|
|
135
136
|
style: [
|
|
136
137
|
{
|
|
138
|
+
flex: 1,
|
|
137
139
|
padding: all,
|
|
138
140
|
paddingHorizontal: horizontal,
|
|
139
141
|
paddingVertical: vertical,
|
|
@@ -166,12 +168,13 @@ var Margin = ({
|
|
|
166
168
|
fullWidth,
|
|
167
169
|
style
|
|
168
170
|
}) => {
|
|
169
|
-
const fullWidthStyle = fullWidth ? {
|
|
171
|
+
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
170
172
|
return /* @__PURE__ */ React5.createElement(
|
|
171
173
|
View5,
|
|
172
174
|
{
|
|
173
175
|
style: [
|
|
174
176
|
{
|
|
177
|
+
flex: 1,
|
|
175
178
|
margin: all,
|
|
176
179
|
marginHorizontal: horizontal,
|
|
177
180
|
marginVertical: vertical,
|
|
@@ -414,12 +417,7 @@ var Surface = ({
|
|
|
414
417
|
{
|
|
415
418
|
style: [
|
|
416
419
|
radiusStyle,
|
|
417
|
-
fullWidth && {
|
|
418
|
-
flexShrink: 1,
|
|
419
|
-
flexBasis: "auto",
|
|
420
|
-
width: "100%",
|
|
421
|
-
flexGrow: 1
|
|
422
|
-
},
|
|
420
|
+
fullWidth && { flexShrink: 1, flexBasis: "auto", width: "100%" },
|
|
423
421
|
{
|
|
424
422
|
backgroundColor: background,
|
|
425
423
|
padding
|
|
@@ -435,17 +433,14 @@ Surface.displayName = "Surface";
|
|
|
435
433
|
// src/components/view/center/center.tsx
|
|
436
434
|
import React12 from "react";
|
|
437
435
|
import { View as View12 } from "react-native";
|
|
438
|
-
var Center = ({
|
|
439
|
-
|
|
440
|
-
fullWidth = false,
|
|
441
|
-
style
|
|
442
|
-
}) => {
|
|
443
|
-
const fullWidthStyle = fullWidth ? { flexGrow: 1, flexShrink: 1, flexBasis: "auto", width: "100%" } : { flexGrow: 1 };
|
|
436
|
+
var Center = ({ children, fullWidth, style }) => {
|
|
437
|
+
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
444
438
|
return /* @__PURE__ */ React12.createElement(
|
|
445
439
|
View12,
|
|
446
440
|
{
|
|
447
441
|
style: [
|
|
448
442
|
{
|
|
443
|
+
flex: 1,
|
|
449
444
|
alignItems: "center",
|
|
450
445
|
justifyContent: "center"
|
|
451
446
|
},
|