@xaui/native 0.1.2 → 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 +13 -6
- package/dist/view/index.d.cts +16 -1
- package/dist/view/index.d.ts +16 -1
- package/dist/view/index.js +13 -6
- package/package.json +1 -1
package/dist/view/index.cjs
CHANGED
|
@@ -38,9 +38,11 @@ var Column = ({
|
|
|
38
38
|
crossAxisAlignment,
|
|
39
39
|
spacing,
|
|
40
40
|
reverse = false,
|
|
41
|
+
fullWidth,
|
|
41
42
|
style
|
|
42
43
|
}) => {
|
|
43
44
|
const gapStyle = spacing === void 0 ? void 0 : { gap: spacing };
|
|
45
|
+
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
44
46
|
return /* @__PURE__ */ _react2.default.createElement(
|
|
45
47
|
_reactnative.View,
|
|
46
48
|
{
|
|
@@ -51,6 +53,7 @@ var Column = ({
|
|
|
51
53
|
justifyContent: resolveMainAxisAlignment(mainAxisAlignment),
|
|
52
54
|
alignItems: resolveCrossAxisAlignment(crossAxisAlignment)
|
|
53
55
|
},
|
|
56
|
+
fullWidthStyle,
|
|
54
57
|
gapStyle,
|
|
55
58
|
style
|
|
56
59
|
]
|
|
@@ -123,8 +126,10 @@ var Padding = ({
|
|
|
123
126
|
right,
|
|
124
127
|
bottom,
|
|
125
128
|
left,
|
|
129
|
+
fullWidth,
|
|
126
130
|
style
|
|
127
131
|
}) => {
|
|
132
|
+
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
128
133
|
return /* @__PURE__ */ _react2.default.createElement(
|
|
129
134
|
_reactnative.View,
|
|
130
135
|
{
|
|
@@ -139,6 +144,7 @@ var Padding = ({
|
|
|
139
144
|
paddingBottom: bottom,
|
|
140
145
|
paddingLeft: left
|
|
141
146
|
},
|
|
147
|
+
fullWidthStyle,
|
|
142
148
|
style
|
|
143
149
|
]
|
|
144
150
|
},
|
|
@@ -159,8 +165,10 @@ var Margin = ({
|
|
|
159
165
|
right,
|
|
160
166
|
bottom,
|
|
161
167
|
left,
|
|
168
|
+
fullWidth,
|
|
162
169
|
style
|
|
163
170
|
}) => {
|
|
171
|
+
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
164
172
|
return /* @__PURE__ */ _react2.default.createElement(
|
|
165
173
|
_reactnative.View,
|
|
166
174
|
{
|
|
@@ -175,6 +183,7 @@ var Margin = ({
|
|
|
175
183
|
marginBottom: bottom,
|
|
176
184
|
marginLeft: left
|
|
177
185
|
},
|
|
186
|
+
fullWidthStyle,
|
|
178
187
|
style
|
|
179
188
|
]
|
|
180
189
|
},
|
|
@@ -408,11 +417,7 @@ var Surface = ({
|
|
|
408
417
|
{
|
|
409
418
|
style: [
|
|
410
419
|
radiusStyle,
|
|
411
|
-
fullWidth && {
|
|
412
|
-
flexShrink: 1,
|
|
413
|
-
flexBasis: "auto",
|
|
414
|
-
width: "100%"
|
|
415
|
-
},
|
|
420
|
+
fullWidth && { flexShrink: 1, flexBasis: "auto", width: "100%" },
|
|
416
421
|
{
|
|
417
422
|
backgroundColor: background,
|
|
418
423
|
padding
|
|
@@ -428,7 +433,8 @@ Surface.displayName = "Surface";
|
|
|
428
433
|
// src/components/view/center/center.tsx
|
|
429
434
|
|
|
430
435
|
|
|
431
|
-
var Center = ({ children, style }) => {
|
|
436
|
+
var Center = ({ children, fullWidth, style }) => {
|
|
437
|
+
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
432
438
|
return /* @__PURE__ */ _react2.default.createElement(
|
|
433
439
|
_reactnative.View,
|
|
434
440
|
{
|
|
@@ -438,6 +444,7 @@ var Center = ({ children, style }) => {
|
|
|
438
444
|
alignItems: "center",
|
|
439
445
|
justifyContent: "center"
|
|
440
446
|
},
|
|
447
|
+
fullWidthStyle,
|
|
441
448
|
style
|
|
442
449
|
]
|
|
443
450
|
},
|
package/dist/view/index.d.cts
CHANGED
|
@@ -38,7 +38,7 @@ type RowProps = {
|
|
|
38
38
|
*/
|
|
39
39
|
style?: ViewStyle;
|
|
40
40
|
};
|
|
41
|
-
type ColumnProps =
|
|
41
|
+
type ColumnProps = RowProps;
|
|
42
42
|
|
|
43
43
|
declare const Column: React.FC<ColumnProps>;
|
|
44
44
|
|
|
@@ -91,6 +91,11 @@ type PaddingProps = {
|
|
|
91
91
|
* Left padding.
|
|
92
92
|
*/
|
|
93
93
|
left?: number;
|
|
94
|
+
/**
|
|
95
|
+
* Whether the padding container should take the full width of its parent.
|
|
96
|
+
* @default false
|
|
97
|
+
*/
|
|
98
|
+
fullWidth?: boolean;
|
|
94
99
|
/**
|
|
95
100
|
* Custom style for the padding container.
|
|
96
101
|
*/
|
|
@@ -132,6 +137,11 @@ type MarginProps = {
|
|
|
132
137
|
* Left margin.
|
|
133
138
|
*/
|
|
134
139
|
left?: number;
|
|
140
|
+
/**
|
|
141
|
+
* Whether the margin container should take the full width of its parent.
|
|
142
|
+
* @default false
|
|
143
|
+
*/
|
|
144
|
+
fullWidth?: boolean;
|
|
135
145
|
/**
|
|
136
146
|
* Custom style for the margin container.
|
|
137
147
|
*/
|
|
@@ -320,6 +330,11 @@ type CenterProps = {
|
|
|
320
330
|
* Content to render inside the centered container.
|
|
321
331
|
*/
|
|
322
332
|
children: ReactNode;
|
|
333
|
+
/**
|
|
334
|
+
* Whether the centered container should take the full width of its parent.
|
|
335
|
+
* @default false
|
|
336
|
+
*/
|
|
337
|
+
fullWidth?: boolean;
|
|
323
338
|
/**
|
|
324
339
|
* Additional style for the container.
|
|
325
340
|
*/
|
package/dist/view/index.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ type RowProps = {
|
|
|
38
38
|
*/
|
|
39
39
|
style?: ViewStyle;
|
|
40
40
|
};
|
|
41
|
-
type ColumnProps =
|
|
41
|
+
type ColumnProps = RowProps;
|
|
42
42
|
|
|
43
43
|
declare const Column: React.FC<ColumnProps>;
|
|
44
44
|
|
|
@@ -91,6 +91,11 @@ type PaddingProps = {
|
|
|
91
91
|
* Left padding.
|
|
92
92
|
*/
|
|
93
93
|
left?: number;
|
|
94
|
+
/**
|
|
95
|
+
* Whether the padding container should take the full width of its parent.
|
|
96
|
+
* @default false
|
|
97
|
+
*/
|
|
98
|
+
fullWidth?: boolean;
|
|
94
99
|
/**
|
|
95
100
|
* Custom style for the padding container.
|
|
96
101
|
*/
|
|
@@ -132,6 +137,11 @@ type MarginProps = {
|
|
|
132
137
|
* Left margin.
|
|
133
138
|
*/
|
|
134
139
|
left?: number;
|
|
140
|
+
/**
|
|
141
|
+
* Whether the margin container should take the full width of its parent.
|
|
142
|
+
* @default false
|
|
143
|
+
*/
|
|
144
|
+
fullWidth?: boolean;
|
|
135
145
|
/**
|
|
136
146
|
* Custom style for the margin container.
|
|
137
147
|
*/
|
|
@@ -320,6 +330,11 @@ type CenterProps = {
|
|
|
320
330
|
* Content to render inside the centered container.
|
|
321
331
|
*/
|
|
322
332
|
children: ReactNode;
|
|
333
|
+
/**
|
|
334
|
+
* Whether the centered container should take the full width of its parent.
|
|
335
|
+
* @default false
|
|
336
|
+
*/
|
|
337
|
+
fullWidth?: boolean;
|
|
323
338
|
/**
|
|
324
339
|
* Additional style for the container.
|
|
325
340
|
*/
|
package/dist/view/index.js
CHANGED
|
@@ -38,9 +38,11 @@ var Column = ({
|
|
|
38
38
|
crossAxisAlignment,
|
|
39
39
|
spacing,
|
|
40
40
|
reverse = false,
|
|
41
|
+
fullWidth,
|
|
41
42
|
style
|
|
42
43
|
}) => {
|
|
43
44
|
const gapStyle = spacing === void 0 ? void 0 : { gap: spacing };
|
|
45
|
+
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
44
46
|
return /* @__PURE__ */ React.createElement(
|
|
45
47
|
View,
|
|
46
48
|
{
|
|
@@ -51,6 +53,7 @@ var Column = ({
|
|
|
51
53
|
justifyContent: resolveMainAxisAlignment(mainAxisAlignment),
|
|
52
54
|
alignItems: resolveCrossAxisAlignment(crossAxisAlignment)
|
|
53
55
|
},
|
|
56
|
+
fullWidthStyle,
|
|
54
57
|
gapStyle,
|
|
55
58
|
style
|
|
56
59
|
]
|
|
@@ -123,8 +126,10 @@ var Padding = ({
|
|
|
123
126
|
right,
|
|
124
127
|
bottom,
|
|
125
128
|
left,
|
|
129
|
+
fullWidth,
|
|
126
130
|
style
|
|
127
131
|
}) => {
|
|
132
|
+
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
128
133
|
return /* @__PURE__ */ React4.createElement(
|
|
129
134
|
View4,
|
|
130
135
|
{
|
|
@@ -139,6 +144,7 @@ var Padding = ({
|
|
|
139
144
|
paddingBottom: bottom,
|
|
140
145
|
paddingLeft: left
|
|
141
146
|
},
|
|
147
|
+
fullWidthStyle,
|
|
142
148
|
style
|
|
143
149
|
]
|
|
144
150
|
},
|
|
@@ -159,8 +165,10 @@ var Margin = ({
|
|
|
159
165
|
right,
|
|
160
166
|
bottom,
|
|
161
167
|
left,
|
|
168
|
+
fullWidth,
|
|
162
169
|
style
|
|
163
170
|
}) => {
|
|
171
|
+
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
164
172
|
return /* @__PURE__ */ React5.createElement(
|
|
165
173
|
View5,
|
|
166
174
|
{
|
|
@@ -175,6 +183,7 @@ var Margin = ({
|
|
|
175
183
|
marginBottom: bottom,
|
|
176
184
|
marginLeft: left
|
|
177
185
|
},
|
|
186
|
+
fullWidthStyle,
|
|
178
187
|
style
|
|
179
188
|
]
|
|
180
189
|
},
|
|
@@ -408,11 +417,7 @@ var Surface = ({
|
|
|
408
417
|
{
|
|
409
418
|
style: [
|
|
410
419
|
radiusStyle,
|
|
411
|
-
fullWidth && {
|
|
412
|
-
flexShrink: 1,
|
|
413
|
-
flexBasis: "auto",
|
|
414
|
-
width: "100%"
|
|
415
|
-
},
|
|
420
|
+
fullWidth && { flexShrink: 1, flexBasis: "auto", width: "100%" },
|
|
416
421
|
{
|
|
417
422
|
backgroundColor: background,
|
|
418
423
|
padding
|
|
@@ -428,7 +433,8 @@ Surface.displayName = "Surface";
|
|
|
428
433
|
// src/components/view/center/center.tsx
|
|
429
434
|
import React12 from "react";
|
|
430
435
|
import { View as View12 } from "react-native";
|
|
431
|
-
var Center = ({ children, style }) => {
|
|
436
|
+
var Center = ({ children, fullWidth, style }) => {
|
|
437
|
+
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
432
438
|
return /* @__PURE__ */ React12.createElement(
|
|
433
439
|
View12,
|
|
434
440
|
{
|
|
@@ -438,6 +444,7 @@ var Center = ({ children, style }) => {
|
|
|
438
444
|
alignItems: "center",
|
|
439
445
|
justifyContent: "center"
|
|
440
446
|
},
|
|
447
|
+
fullWidthStyle,
|
|
441
448
|
style
|
|
442
449
|
]
|
|
443
450
|
},
|