@xaui/native 0.2.6 → 0.2.8
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/alert/index.cjs +9 -25
- package/dist/alert/index.d.cts +23 -67
- package/dist/alert/index.d.ts +23 -67
- package/dist/alert/index.js +8 -24
- package/dist/color-picker/index.cjs +1 -4
- package/dist/color-picker/index.js +1 -4
- package/dist/dialog/index.cjs +28 -37
- package/dist/dialog/index.js +28 -37
- package/dist/picker/index.cjs +20 -26
- package/dist/picker/index.js +20 -26
- package/dist/snackbar/index.cjs +19 -3
- package/dist/snackbar/index.js +19 -3
- package/dist/snippet/index.cjs +6 -1
- package/dist/snippet/index.js +6 -1
- package/dist/view/index.cjs +119 -55
- package/dist/view/index.d.cts +81 -37
- package/dist/view/index.d.ts +81 -37
- package/dist/view/index.js +206 -142
- package/package.json +3 -3
package/dist/picker/index.js
CHANGED
|
@@ -84,20 +84,26 @@ var ChevronDownIcon = ({
|
|
|
84
84
|
}
|
|
85
85
|
)
|
|
86
86
|
);
|
|
87
|
-
var CheckIcon = ({ color }) => /* @__PURE__ */ React.createElement(
|
|
87
|
+
var CheckIcon = ({ color }) => /* @__PURE__ */ React.createElement(
|
|
88
88
|
View,
|
|
89
89
|
{
|
|
90
|
-
style: {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
90
|
+
style: { width: 20, height: 20, alignItems: "center", justifyContent: "center" }
|
|
91
|
+
},
|
|
92
|
+
/* @__PURE__ */ React.createElement(
|
|
93
|
+
View,
|
|
94
|
+
{
|
|
95
|
+
style: {
|
|
96
|
+
width: 6,
|
|
97
|
+
height: 10,
|
|
98
|
+
borderRightWidth: 2,
|
|
99
|
+
borderBottomWidth: 2,
|
|
100
|
+
borderColor: color,
|
|
101
|
+
transform: [{ rotate: "45deg" }],
|
|
102
|
+
marginTop: -3
|
|
103
|
+
}
|
|
98
104
|
}
|
|
99
|
-
|
|
100
|
-
)
|
|
105
|
+
)
|
|
106
|
+
);
|
|
101
107
|
var OptionItem = ({
|
|
102
108
|
option,
|
|
103
109
|
isSelected,
|
|
@@ -120,10 +126,7 @@ var OptionItem = ({
|
|
|
120
126
|
/* @__PURE__ */ React.createElement(
|
|
121
127
|
Text,
|
|
122
128
|
{
|
|
123
|
-
style: [
|
|
124
|
-
styles.optionLabel,
|
|
125
|
-
{ color: isSelected ? themeColor : foreground }
|
|
126
|
-
]
|
|
129
|
+
style: [styles.optionLabel, { color: isSelected ? themeColor : foreground }]
|
|
127
130
|
},
|
|
128
131
|
option.label
|
|
129
132
|
),
|
|
@@ -214,13 +217,7 @@ var Picker = ({
|
|
|
214
217
|
onClose: handleSheetClose,
|
|
215
218
|
style: { backgroundColor: sheetBackground, ...sheetStyle }
|
|
216
219
|
},
|
|
217
|
-
/* @__PURE__ */ React.createElement(View, { style: styles.sheetContent }, sheetTitle ? /* @__PURE__ */ React.createElement(
|
|
218
|
-
Text,
|
|
219
|
-
{
|
|
220
|
-
style: [styles.sheetTitle, { color: theme.colors.foreground }]
|
|
221
|
-
},
|
|
222
|
-
sheetTitle
|
|
223
|
-
) : null, /* @__PURE__ */ React.createElement(ScrollView, null, options.map((option, index) => /* @__PURE__ */ React.createElement(View, { key: option.value }, /* @__PURE__ */ React.createElement(
|
|
220
|
+
/* @__PURE__ */ React.createElement(View, { style: styles.sheetContent }, sheetTitle ? /* @__PURE__ */ React.createElement(Text, { style: [styles.sheetTitle, { color: theme.colors.foreground }] }, sheetTitle) : null, /* @__PURE__ */ React.createElement(ScrollView, null, options.map((option, index) => /* @__PURE__ */ React.createElement(View, { key: option.value }, /* @__PURE__ */ React.createElement(
|
|
224
221
|
OptionItem,
|
|
225
222
|
{
|
|
226
223
|
option,
|
|
@@ -235,10 +232,7 @@ var Picker = ({
|
|
|
235
232
|
style: [
|
|
236
233
|
styles.divider,
|
|
237
234
|
{
|
|
238
|
-
backgroundColor: withOpacity(
|
|
239
|
-
theme.colors.foreground,
|
|
240
|
-
0.06
|
|
241
|
-
)
|
|
235
|
+
backgroundColor: withOpacity(theme.colors.foreground, 0.06)
|
|
242
236
|
}
|
|
243
237
|
]
|
|
244
238
|
}
|
package/dist/snackbar/index.cjs
CHANGED
|
@@ -241,7 +241,11 @@ var SnackbarSurface = ({ item, duration, onDismiss }) => {
|
|
|
241
241
|
return /* @__PURE__ */ _react2.default.createElement(
|
|
242
242
|
_reactnative.Text,
|
|
243
243
|
{
|
|
244
|
-
style: [
|
|
244
|
+
style: [
|
|
245
|
+
styles.messageText,
|
|
246
|
+
{ color: textColor },
|
|
247
|
+
_optionalChain([customAppearance, 'optionalAccess', _3 => _3.message])
|
|
248
|
+
],
|
|
245
249
|
numberOfLines
|
|
246
250
|
},
|
|
247
251
|
message
|
|
@@ -252,7 +256,17 @@ var SnackbarSurface = ({ item, duration, onDismiss }) => {
|
|
|
252
256
|
const actionNode = _react.useMemo.call(void 0, () => {
|
|
253
257
|
if (actionLabel === null || actionLabel === void 0) return null;
|
|
254
258
|
if (typeof actionLabel === "string" || typeof actionLabel === "number") {
|
|
255
|
-
return /* @__PURE__ */ _react2.default.createElement(
|
|
259
|
+
return /* @__PURE__ */ _react2.default.createElement(
|
|
260
|
+
_reactnative.Text,
|
|
261
|
+
{
|
|
262
|
+
style: [
|
|
263
|
+
styles.actionText,
|
|
264
|
+
{ color: actionColor },
|
|
265
|
+
_optionalChain([customAppearance, 'optionalAccess', _5 => _5.action])
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
actionLabel
|
|
269
|
+
);
|
|
256
270
|
}
|
|
257
271
|
if (_react.isValidElement.call(void 0, actionLabel)) {
|
|
258
272
|
return actionLabel;
|
|
@@ -382,7 +396,9 @@ var Snackbar = ({
|
|
|
382
396
|
const [internalVisible, setInternalVisible] = _react.useState.call(void 0, _nullishCoalesce(isVisible, () => ( true)));
|
|
383
397
|
const isControlled = typeof isVisible === "boolean";
|
|
384
398
|
const visible = isControlled ? isVisible : internalVisible;
|
|
385
|
-
const idRef = _react.useRef.call(void 0,
|
|
399
|
+
const idRef = _react.useRef.call(void 0,
|
|
400
|
+
`snackbar-${Date.now()}-${Math.random().toString(16).slice(2)}`
|
|
401
|
+
);
|
|
386
402
|
const dismiss = _react.useCallback.call(void 0, () => {
|
|
387
403
|
if (!isControlled) {
|
|
388
404
|
setInternalVisible(false);
|
package/dist/snackbar/index.js
CHANGED
|
@@ -241,7 +241,11 @@ var SnackbarSurface = ({ item, duration, onDismiss }) => {
|
|
|
241
241
|
return /* @__PURE__ */ React.createElement(
|
|
242
242
|
Text,
|
|
243
243
|
{
|
|
244
|
-
style: [
|
|
244
|
+
style: [
|
|
245
|
+
styles.messageText,
|
|
246
|
+
{ color: textColor },
|
|
247
|
+
customAppearance?.message
|
|
248
|
+
],
|
|
245
249
|
numberOfLines
|
|
246
250
|
},
|
|
247
251
|
message
|
|
@@ -252,7 +256,17 @@ var SnackbarSurface = ({ item, duration, onDismiss }) => {
|
|
|
252
256
|
const actionNode = useMemo2(() => {
|
|
253
257
|
if (actionLabel === null || actionLabel === void 0) return null;
|
|
254
258
|
if (typeof actionLabel === "string" || typeof actionLabel === "number") {
|
|
255
|
-
return /* @__PURE__ */ React.createElement(
|
|
259
|
+
return /* @__PURE__ */ React.createElement(
|
|
260
|
+
Text,
|
|
261
|
+
{
|
|
262
|
+
style: [
|
|
263
|
+
styles.actionText,
|
|
264
|
+
{ color: actionColor },
|
|
265
|
+
customAppearance?.action
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
actionLabel
|
|
269
|
+
);
|
|
256
270
|
}
|
|
257
271
|
if (isValidElement(actionLabel)) {
|
|
258
272
|
return actionLabel;
|
|
@@ -382,7 +396,9 @@ var Snackbar = ({
|
|
|
382
396
|
const [internalVisible, setInternalVisible] = useState(isVisible ?? true);
|
|
383
397
|
const isControlled = typeof isVisible === "boolean";
|
|
384
398
|
const visible = isControlled ? isVisible : internalVisible;
|
|
385
|
-
const idRef = useRef(
|
|
399
|
+
const idRef = useRef(
|
|
400
|
+
`snackbar-${Date.now()}-${Math.random().toString(16).slice(2)}`
|
|
401
|
+
);
|
|
386
402
|
const dismiss = useCallback(() => {
|
|
387
403
|
if (!isControlled) {
|
|
388
404
|
setInternalVisible(false);
|
package/dist/snippet/index.cjs
CHANGED
|
@@ -225,7 +225,12 @@ var Snippet = ({
|
|
|
225
225
|
accessibilityRole: "button",
|
|
226
226
|
accessibilityLabel: isCopied ? copiedLabel : copyLabel,
|
|
227
227
|
disabled: isDisabled,
|
|
228
|
-
style: isInline ? [
|
|
228
|
+
style: isInline ? [
|
|
229
|
+
styles.inlineCopyButton,
|
|
230
|
+
radiusStyles,
|
|
231
|
+
copyButtonColors,
|
|
232
|
+
_optionalChain([customAppearance, 'optionalAccess', _9 => _9.copyButton])
|
|
233
|
+
] : [
|
|
229
234
|
styles.copyButton,
|
|
230
235
|
radiusStyles,
|
|
231
236
|
isTop ? styles.top : styles.bottom,
|
package/dist/snippet/index.js
CHANGED
|
@@ -225,7 +225,12 @@ var Snippet = ({
|
|
|
225
225
|
accessibilityRole: "button",
|
|
226
226
|
accessibilityLabel: isCopied ? copiedLabel : copyLabel,
|
|
227
227
|
disabled: isDisabled,
|
|
228
|
-
style: isInline ? [
|
|
228
|
+
style: isInline ? [
|
|
229
|
+
styles.inlineCopyButton,
|
|
230
|
+
radiusStyles,
|
|
231
|
+
copyButtonColors,
|
|
232
|
+
customAppearance?.copyButton
|
|
233
|
+
] : [
|
|
229
234
|
styles.copyButton,
|
|
230
235
|
radiusStyles,
|
|
231
236
|
isTop ? styles.top : styles.bottom,
|
package/dist/view/index.cjs
CHANGED
|
@@ -152,7 +152,9 @@ var buildStyle = (props) => ({
|
|
|
152
152
|
...props.borderRadius !== void 0 && resolveBorderRadius(props.borderRadius),
|
|
153
153
|
...props.border !== void 0 && resolveBorder(props.border),
|
|
154
154
|
...props.shadow !== void 0 && resolveShadow(props.shadow),
|
|
155
|
-
...props.transform !== void 0 && {
|
|
155
|
+
...props.transform !== void 0 && {
|
|
156
|
+
transform: resolveTransform(props.transform)
|
|
157
|
+
}
|
|
156
158
|
});
|
|
157
159
|
var Container = (props) => {
|
|
158
160
|
const {
|
|
@@ -205,7 +207,7 @@ var Container = (props) => {
|
|
|
205
207
|
};
|
|
206
208
|
Container.displayName = "Container";
|
|
207
209
|
|
|
208
|
-
// src/components/view/
|
|
210
|
+
// src/components/view/flex/flex.tsx
|
|
209
211
|
|
|
210
212
|
|
|
211
213
|
|
|
@@ -214,87 +216,102 @@ var MAIN_AXIS_JUSTIFY_MAP = {
|
|
|
214
216
|
start: "flex-start",
|
|
215
217
|
center: "center",
|
|
216
218
|
end: "flex-end",
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
219
|
+
spaceBetween: "space-between",
|
|
220
|
+
spaceAround: "space-around",
|
|
221
|
+
spaceEvenly: "space-evenly"
|
|
220
222
|
};
|
|
221
223
|
var CROSS_AXIS_ALIGN_MAP = {
|
|
222
224
|
start: "flex-start",
|
|
223
225
|
center: "center",
|
|
224
226
|
end: "flex-end",
|
|
225
|
-
stretch: "stretch"
|
|
226
|
-
baseline: "baseline"
|
|
227
|
-
};
|
|
228
|
-
var resolveMainAxisAlignment = (alignment) => {
|
|
229
|
-
return MAIN_AXIS_JUSTIFY_MAP[_nullishCoalesce(alignment, () => ( "start"))];
|
|
227
|
+
stretch: "stretch"
|
|
230
228
|
};
|
|
231
|
-
var
|
|
232
|
-
|
|
229
|
+
var resolveMainAxisAlignment = (alignment) => MAIN_AXIS_JUSTIFY_MAP[_nullishCoalesce(alignment, () => ( "start"))];
|
|
230
|
+
var resolveCrossAxisAlignment = (alignment) => CROSS_AXIS_ALIGN_MAP[_nullishCoalesce(alignment, () => ( "center"))];
|
|
231
|
+
var resolveMainAxisSize = (size = "max", direction) => {
|
|
232
|
+
if (size === "min") return {};
|
|
233
|
+
return direction === "vertical" ? { flex: 1 } : { width: "100%" };
|
|
233
234
|
};
|
|
234
235
|
|
|
235
|
-
// src/components/view/
|
|
236
|
-
var
|
|
236
|
+
// src/components/view/flex/flex.tsx
|
|
237
|
+
var Flex = ({
|
|
237
238
|
children,
|
|
239
|
+
direction,
|
|
238
240
|
mainAxisAlignment,
|
|
239
241
|
crossAxisAlignment,
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
242
|
+
mainAxisSize,
|
|
243
|
+
wrap = false,
|
|
244
|
+
gap,
|
|
245
|
+
reversed = false,
|
|
246
|
+
flex,
|
|
243
247
|
style,
|
|
244
|
-
|
|
248
|
+
testID
|
|
245
249
|
}) => {
|
|
246
|
-
const
|
|
247
|
-
const fullWidthStyle = fullWidth ? { width: "100%" } : void 0;
|
|
250
|
+
const flexDir = direction === "horizontal" ? reversed ? "row-reverse" : "row" : reversed ? "column-reverse" : "column";
|
|
248
251
|
return /* @__PURE__ */ _react2.default.createElement(
|
|
249
252
|
_reactnative.View,
|
|
250
253
|
{
|
|
254
|
+
testID,
|
|
251
255
|
style: [
|
|
256
|
+
resolveMainAxisSize(mainAxisSize, direction),
|
|
252
257
|
{
|
|
253
|
-
|
|
254
|
-
flexDirection: reverse ? "column-reverse" : "column",
|
|
258
|
+
flexDirection: flexDir,
|
|
255
259
|
justifyContent: resolveMainAxisAlignment(mainAxisAlignment),
|
|
256
|
-
alignItems: resolveCrossAxisAlignment(crossAxisAlignment)
|
|
260
|
+
alignItems: resolveCrossAxisAlignment(crossAxisAlignment),
|
|
261
|
+
flexWrap: wrap ? "wrap" : "nowrap",
|
|
262
|
+
...gap !== void 0 && { gap },
|
|
263
|
+
...flex !== void 0 && { flex }
|
|
257
264
|
},
|
|
258
|
-
fullWidthStyle,
|
|
259
|
-
gapStyle,
|
|
260
265
|
style
|
|
261
266
|
]
|
|
262
267
|
},
|
|
263
268
|
children
|
|
264
269
|
);
|
|
265
270
|
};
|
|
271
|
+
Flex.displayName = "Flex";
|
|
272
|
+
|
|
273
|
+
// src/components/view/column/column.tsx
|
|
274
|
+
|
|
275
|
+
var Column = (props) => /* @__PURE__ */ _react2.default.createElement(Flex, { ...props, direction: "vertical" });
|
|
276
|
+
Column.displayName = "Column";
|
|
266
277
|
|
|
267
278
|
// src/components/view/row/row.tsx
|
|
268
279
|
|
|
280
|
+
var Row = (props) => /* @__PURE__ */ _react2.default.createElement(Flex, { ...props, direction: "horizontal" });
|
|
281
|
+
Row.displayName = "Row";
|
|
282
|
+
|
|
283
|
+
// src/components/view/expanded/expanded.tsx
|
|
284
|
+
|
|
269
285
|
|
|
270
|
-
var
|
|
286
|
+
var Expanded = ({
|
|
271
287
|
children,
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
288
|
+
flex = 1,
|
|
289
|
+
style,
|
|
290
|
+
testID
|
|
291
|
+
}) => /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { testID, style: [{ flex }, style] }, children);
|
|
292
|
+
Expanded.displayName = "Expanded";
|
|
293
|
+
|
|
294
|
+
// src/components/view/flexible/flexible.tsx
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
var Flexible = ({
|
|
298
|
+
children,
|
|
299
|
+
flex = 1,
|
|
300
|
+
fit = "loose",
|
|
301
|
+
style,
|
|
302
|
+
testID
|
|
303
|
+
}) => /* @__PURE__ */ _react2.default.createElement(
|
|
304
|
+
_reactnative.View,
|
|
305
|
+
{
|
|
306
|
+
testID,
|
|
307
|
+
style: [
|
|
308
|
+
fit === "tight" ? { flex } : { flexGrow: flex, flexShrink: 1, flexBasis: "auto" },
|
|
309
|
+
style
|
|
310
|
+
]
|
|
311
|
+
},
|
|
312
|
+
children
|
|
313
|
+
);
|
|
314
|
+
Flexible.displayName = "Flexible";
|
|
298
315
|
|
|
299
316
|
// src/components/view/spacer/spacer.tsx
|
|
300
317
|
|
|
@@ -316,6 +333,39 @@ var Spacer = ({ flex = 1, style }) => {
|
|
|
316
333
|
};
|
|
317
334
|
Spacer.displayName = "Spacer";
|
|
318
335
|
|
|
336
|
+
// src/components/view/wrap/wrap.tsx
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
var Wrap = ({
|
|
340
|
+
children,
|
|
341
|
+
direction = "horizontal",
|
|
342
|
+
alignment,
|
|
343
|
+
runAlignment,
|
|
344
|
+
spacing = 0,
|
|
345
|
+
runSpacing = 0,
|
|
346
|
+
style,
|
|
347
|
+
testID
|
|
348
|
+
}) => /* @__PURE__ */ _react2.default.createElement(
|
|
349
|
+
_reactnative.View,
|
|
350
|
+
{
|
|
351
|
+
testID,
|
|
352
|
+
style: [
|
|
353
|
+
{
|
|
354
|
+
flexDirection: direction === "horizontal" ? "row" : "column",
|
|
355
|
+
flexWrap: "wrap",
|
|
356
|
+
justifyContent: resolveMainAxisAlignment(alignment),
|
|
357
|
+
alignContent: resolveMainAxisAlignment(runAlignment),
|
|
358
|
+
gap: spacing,
|
|
359
|
+
rowGap: direction === "horizontal" ? runSpacing : spacing,
|
|
360
|
+
columnGap: direction === "horizontal" ? spacing : runSpacing
|
|
361
|
+
},
|
|
362
|
+
style
|
|
363
|
+
]
|
|
364
|
+
},
|
|
365
|
+
children
|
|
366
|
+
);
|
|
367
|
+
Wrap.displayName = "Wrap";
|
|
368
|
+
|
|
319
369
|
// src/components/view/padding/padding.tsx
|
|
320
370
|
|
|
321
371
|
|
|
@@ -341,7 +391,14 @@ var SizedBox = ({
|
|
|
341
391
|
testID
|
|
342
392
|
}) => {
|
|
343
393
|
if (shrink) {
|
|
344
|
-
return /* @__PURE__ */ _react2.default.createElement(
|
|
394
|
+
return /* @__PURE__ */ _react2.default.createElement(
|
|
395
|
+
_reactnative.View,
|
|
396
|
+
{
|
|
397
|
+
testID,
|
|
398
|
+
style: [{ width: 0, height: 0, overflow: "hidden" }, style]
|
|
399
|
+
},
|
|
400
|
+
children
|
|
401
|
+
);
|
|
345
402
|
}
|
|
346
403
|
if (expand) {
|
|
347
404
|
return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { testID, style: [{ flex: 1, alignSelf: "stretch" }, style] }, children);
|
|
@@ -634,7 +691,10 @@ var Screen = ({
|
|
|
634
691
|
}) => {
|
|
635
692
|
const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
|
|
636
693
|
const resolvedBackgroundColor = _nullishCoalesce(backgroundColor, () => ( theme.colors.background));
|
|
637
|
-
const containerStyle = [
|
|
694
|
+
const containerStyle = [
|
|
695
|
+
{ flex: 1, backgroundColor: resolvedBackgroundColor, padding },
|
|
696
|
+
style
|
|
697
|
+
];
|
|
638
698
|
if (safeArea) {
|
|
639
699
|
return /* @__PURE__ */ _react2.default.createElement(_reactnativesafeareacontext.SafeAreaView, { style: containerStyle }, children);
|
|
640
700
|
}
|
|
@@ -1294,4 +1354,8 @@ MasonryGridBuilder.displayName = "MasonryGridBuilder";
|
|
|
1294
1354
|
|
|
1295
1355
|
|
|
1296
1356
|
|
|
1297
|
-
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
|
|
1361
|
+
exports.Align = Align; exports.AspectRatio = AspectRatio; exports.BlurView = BlurView; exports.Center = Center; exports.Column = Column; exports.ConditionalView = ConditionalView; exports.ConstrainedBox = ConstrainedBox; exports.Container = Container; exports.Expanded = Expanded; exports.Flex = Flex; exports.Flexible = Flexible; exports.FractionallySizedBox = FractionallySizedBox; exports.Grid = Grid; exports.GridBuilder = GridBuilder; exports.GridItem = GridItem; exports.Margin = Margin; exports.MasonryGrid = MasonryGrid; exports.MasonryGridBuilder = MasonryGridBuilder; exports.MasonryGridItem = MasonryGridItem; exports.Padding = Padding; exports.PositionedView = PositionedView; exports.RoundedView = RoundedView; exports.Row = Row; exports.Screen = Screen; exports.SizedBox = SizedBox; exports.Spacer = Spacer; exports.Surface = Surface; exports.Wrap = Wrap;
|
package/dist/view/index.d.cts
CHANGED
|
@@ -68,54 +68,96 @@ type ContainerProps = {
|
|
|
68
68
|
|
|
69
69
|
declare const Container: React.FC<ContainerProps>;
|
|
70
70
|
|
|
71
|
-
type MainAxisAlignment = 'start' | '
|
|
72
|
-
type CrossAxisAlignment = 'start' | '
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
71
|
+
type MainAxisAlignment = 'start' | 'end' | 'center' | 'spaceBetween' | 'spaceAround' | 'spaceEvenly';
|
|
72
|
+
type CrossAxisAlignment = 'start' | 'end' | 'center' | 'stretch';
|
|
73
|
+
/** Controls how much space the flex widget occupies in its main axis. */
|
|
74
|
+
type MainAxisSize = 'min' | 'max';
|
|
75
|
+
type Direction = 'horizontal' | 'vertical';
|
|
76
|
+
type FlexProps = {
|
|
77
|
+
/** Content to render inside the flex container. */
|
|
78
|
+
children?: ReactNode;
|
|
79
|
+
/** Axis direction — `'horizontal'` for row, `'vertical'` for column. */
|
|
80
|
+
direction: Direction;
|
|
81
|
+
/** How to place children along the main axis. @default 'start' */
|
|
82
82
|
mainAxisAlignment?: MainAxisAlignment;
|
|
83
|
-
/**
|
|
84
|
-
* Cross axis alignment for row items.
|
|
85
|
-
* @default 'center'
|
|
86
|
-
*/
|
|
83
|
+
/** How to place children along the cross axis. @default 'center' */
|
|
87
84
|
crossAxisAlignment?: CrossAxisAlignment;
|
|
88
|
-
/**
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
* @default false
|
|
100
|
-
*/
|
|
101
|
-
fullWidth?: boolean;
|
|
102
|
-
/**
|
|
103
|
-
* Custom style for the row container.
|
|
104
|
-
*/
|
|
85
|
+
/** Whether the flex takes max or min space in the main axis. @default 'max' */
|
|
86
|
+
mainAxisSize?: MainAxisSize;
|
|
87
|
+
/** Wrap children onto multiple lines when they overflow. @default false */
|
|
88
|
+
wrap?: boolean;
|
|
89
|
+
/** Gap in logical pixels between children. */
|
|
90
|
+
gap?: number;
|
|
91
|
+
/** Reverse the layout direction. @default false */
|
|
92
|
+
reversed?: boolean;
|
|
93
|
+
/** Flex factor applied to the container itself. */
|
|
94
|
+
flex?: number;
|
|
95
|
+
/** Raw style override applied to the underlying View. */
|
|
105
96
|
style?: StyleProp<ViewStyle>;
|
|
97
|
+
/** Test identifier for e2e tests. */
|
|
98
|
+
testID?: string;
|
|
106
99
|
};
|
|
107
|
-
type
|
|
100
|
+
type RowProps = Omit<FlexProps, 'direction'>;
|
|
101
|
+
type ColumnProps = Omit<FlexProps, 'direction'>;
|
|
102
|
+
/** Controls how a `Flexible` child sizes itself within available space. */
|
|
103
|
+
type FlexFit = 'tight' | 'loose';
|
|
104
|
+
type FlexibleProps = {
|
|
105
|
+
/** Content to render inside the flexible container. */
|
|
106
|
+
children?: ReactNode;
|
|
107
|
+
/** Flex factor — how much space to claim relative to siblings. @default 1 */
|
|
108
|
+
flex?: number;
|
|
108
109
|
/**
|
|
109
|
-
*
|
|
110
|
-
*
|
|
110
|
+
* Sizing behaviour:
|
|
111
|
+
* - `'tight'` — force the child to fill all allotted space (like `Expanded`).
|
|
112
|
+
* - `'loose'` — allow the child to be at most the allotted size but no larger.
|
|
113
|
+
* @default 'loose'
|
|
111
114
|
*/
|
|
112
|
-
|
|
115
|
+
fit?: FlexFit;
|
|
116
|
+
/** Raw style override applied to the underlying View. */
|
|
117
|
+
style?: StyleProp<ViewStyle>;
|
|
118
|
+
/** Test identifier for e2e tests. */
|
|
119
|
+
testID?: string;
|
|
120
|
+
};
|
|
121
|
+
type WrapProps = {
|
|
122
|
+
/** Content to render inside the wrap container. */
|
|
123
|
+
children?: ReactNode;
|
|
124
|
+
/** Primary axis direction. @default 'horizontal' */
|
|
125
|
+
direction?: Direction;
|
|
126
|
+
/** Alignment of children along the main axis within each run. @default 'start' */
|
|
127
|
+
alignment?: MainAxisAlignment;
|
|
128
|
+
/** Alignment of runs along the cross axis. @default 'start' */
|
|
129
|
+
runAlignment?: MainAxisAlignment;
|
|
130
|
+
/** Space between children along the main axis. @default 0 */
|
|
131
|
+
spacing?: number;
|
|
132
|
+
/** Space between runs along the cross axis. @default 0 */
|
|
133
|
+
runSpacing?: number;
|
|
134
|
+
/** Raw style override applied to the underlying View. */
|
|
135
|
+
style?: StyleProp<ViewStyle>;
|
|
136
|
+
/** Test identifier for e2e tests. */
|
|
137
|
+
testID?: string;
|
|
113
138
|
};
|
|
114
139
|
|
|
140
|
+
declare const Flex: React.FC<FlexProps>;
|
|
141
|
+
|
|
115
142
|
declare const Column: React.FC<ColumnProps>;
|
|
116
143
|
|
|
117
144
|
declare const Row: React.FC<RowProps>;
|
|
118
145
|
|
|
146
|
+
type ExpandedProps = {
|
|
147
|
+
/** Content to render inside the expanded container. */
|
|
148
|
+
children?: ReactNode;
|
|
149
|
+
/** Flex factor — how much of the available space to take relative to siblings. @default 1 */
|
|
150
|
+
flex?: number;
|
|
151
|
+
/** Raw style override applied to the underlying View. */
|
|
152
|
+
style?: StyleProp<ViewStyle>;
|
|
153
|
+
/** Test identifier for e2e tests. */
|
|
154
|
+
testID?: string;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
declare const Expanded: React.FC<ExpandedProps>;
|
|
158
|
+
|
|
159
|
+
declare const Flexible: React.FC<FlexibleProps>;
|
|
160
|
+
|
|
119
161
|
type SpacerProps = {
|
|
120
162
|
/**
|
|
121
163
|
* Flex factor for the spacer.
|
|
@@ -130,6 +172,8 @@ type SpacerProps = {
|
|
|
130
172
|
|
|
131
173
|
declare const Spacer: React.FC<SpacerProps>;
|
|
132
174
|
|
|
175
|
+
declare const Wrap: React.FC<WrapProps>;
|
|
176
|
+
|
|
133
177
|
type PaddingProps = {
|
|
134
178
|
/** Content to render inside the padding container. */
|
|
135
179
|
children?: ReactNode;
|
|
@@ -786,4 +830,4 @@ declare const MasonryGridBuilder: {
|
|
|
786
830
|
displayName: string;
|
|
787
831
|
};
|
|
788
832
|
|
|
789
|
-
export { Align, type AlignProps, AspectRatio, type AspectRatioProps, BlurView, type BlurViewProps, type BoxConstraints, Center, type CenterProps, Column, type ColumnProps, ConditionalView, type ConditionalViewAnimation, type ConditionalViewProps, ConstrainedBox, type ConstrainedBoxProps, Container, type ContainerProps, type CrossAxisAlignment, FractionallySizedBox, type FractionallySizedBoxProps, Grid, GridBuilder, type GridBuilderProps, GridItem, type GridItemProps, type GridProps, type MainAxisAlignment, Margin, type MarginProps, MasonryGrid, MasonryGridBuilder, type MasonryGridBuilderProps, MasonryGridItem, type MasonryGridItemProps, type MasonryGridProps, Padding, type PaddingProps, PositionedView, type PositionedViewProps, RoundedView, type RoundedViewProps, Row, type RowProps, Screen, type ScreenProps, SizedBox, type SizedBoxProps, Spacer, type SpacerProps, Surface, type SurfaceProps, type SurfaceThemeColor };
|
|
833
|
+
export { Align, type AlignProps, AspectRatio, type AspectRatioProps, BlurView, type BlurViewProps, type BoxConstraints, Center, type CenterProps, Column, type ColumnProps, ConditionalView, type ConditionalViewAnimation, type ConditionalViewProps, ConstrainedBox, type ConstrainedBoxProps, Container, type ContainerProps, type CrossAxisAlignment, type Direction, Expanded, type ExpandedProps, Flex, type FlexFit, type FlexProps, Flexible, type FlexibleProps, FractionallySizedBox, type FractionallySizedBoxProps, Grid, GridBuilder, type GridBuilderProps, GridItem, type GridItemProps, type GridProps, type MainAxisAlignment, type MainAxisSize, Margin, type MarginProps, MasonryGrid, MasonryGridBuilder, type MasonryGridBuilderProps, MasonryGridItem, type MasonryGridItemProps, type MasonryGridProps, Padding, type PaddingProps, PositionedView, type PositionedViewProps, RoundedView, type RoundedViewProps, Row, type RowProps, Screen, type ScreenProps, SizedBox, type SizedBoxProps, Spacer, type SpacerProps, Surface, type SurfaceProps, type SurfaceThemeColor, Wrap, type WrapProps };
|