@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/alert/index.cjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }require('../chunk-56RPWZD2.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
|
|
5
4
|
var _chunk7UFBLUMVcjs = require('../chunk-7UFBLUMV.cjs');
|
|
6
5
|
|
|
7
6
|
// src/components/alert/alert.tsx
|
|
@@ -221,12 +220,14 @@ var Alert = ({
|
|
|
221
220
|
icon,
|
|
222
221
|
themeColor = "default",
|
|
223
222
|
variant = "flat",
|
|
224
|
-
radius =
|
|
223
|
+
radius = 8,
|
|
225
224
|
isClosable = false,
|
|
226
225
|
hideIcon = false,
|
|
227
226
|
closeButton,
|
|
228
227
|
isVisible,
|
|
229
|
-
|
|
228
|
+
style,
|
|
229
|
+
titleStyle,
|
|
230
|
+
descriptionStyle,
|
|
230
231
|
children,
|
|
231
232
|
onClose,
|
|
232
233
|
onVisibleChange
|
|
@@ -237,7 +238,6 @@ var Alert = ({
|
|
|
237
238
|
const visible = isControlled ? isVisible : internalVisible;
|
|
238
239
|
const opacity = _reactnativereanimated.useSharedValue.call(void 0, 1);
|
|
239
240
|
const scale = _reactnativereanimated.useSharedValue.call(void 0, 1);
|
|
240
|
-
const radiusStyles = _chunk7UFBLUMVcjs.useBorderRadiusStyles.call(void 0, radius);
|
|
241
241
|
const containerStyles = useAlertContainerStyles(themeColor, variant);
|
|
242
242
|
const iconWrapperStyles = useAlertIconWrapperStyles(themeColor, variant);
|
|
243
243
|
const { titleStyles, descriptionStyles, iconColor, closeButtonColor } = useAlertTextStyles(themeColor, variant);
|
|
@@ -290,27 +290,17 @@ var Alert = ({
|
|
|
290
290
|
const renderContentText = (content) => {
|
|
291
291
|
if (content === null || content === void 0) return null;
|
|
292
292
|
if (typeof content === "string" || typeof content === "number") {
|
|
293
|
-
return /* @__PURE__ */ _react2.default.createElement(
|
|
294
|
-
_reactnative.Text,
|
|
295
|
-
{
|
|
296
|
-
style: [
|
|
297
|
-
styles.description,
|
|
298
|
-
descriptionStyles,
|
|
299
|
-
_optionalChain([customAppearance, 'optionalAccess', _3 => _3.description])
|
|
300
|
-
]
|
|
301
|
-
},
|
|
302
|
-
content
|
|
303
|
-
);
|
|
293
|
+
return /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.description, descriptionStyles, descriptionStyle] }, content);
|
|
304
294
|
}
|
|
305
295
|
return content;
|
|
306
296
|
};
|
|
307
297
|
const titleNode = _react.useMemo.call(void 0, () => {
|
|
308
298
|
if (title === null || title === void 0) return null;
|
|
309
299
|
if (typeof title === "string" || typeof title === "number") {
|
|
310
|
-
return /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.title, titleStyles,
|
|
300
|
+
return /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.title, titleStyles, titleStyle] }, title);
|
|
311
301
|
}
|
|
312
302
|
return title;
|
|
313
|
-
}, [title,
|
|
303
|
+
}, [title, titleStyle, titleStyles]);
|
|
314
304
|
const descriptionNode = renderContentText(description);
|
|
315
305
|
const childrenNode = renderContentText(children);
|
|
316
306
|
const closeButtonNode = _react.useMemo.call(void 0, () => {
|
|
@@ -319,7 +309,7 @@ var Alert = ({
|
|
|
319
309
|
const existingOnPress = closeButton.props.onPress;
|
|
320
310
|
return _react.cloneElement.call(void 0, closeButton, {
|
|
321
311
|
onPress: (event) => {
|
|
322
|
-
_optionalChain([existingOnPress, 'optionalCall',
|
|
312
|
+
_optionalChain([existingOnPress, 'optionalCall', _3 => _3(event)]);
|
|
323
313
|
handleClose();
|
|
324
314
|
}
|
|
325
315
|
});
|
|
@@ -329,13 +319,7 @@ var Alert = ({
|
|
|
329
319
|
_reactnativereanimated2.default.View,
|
|
330
320
|
{
|
|
331
321
|
accessibilityRole: "alert",
|
|
332
|
-
style: [
|
|
333
|
-
styles.container,
|
|
334
|
-
containerStyles,
|
|
335
|
-
radiusStyles,
|
|
336
|
-
_optionalChain([customAppearance, 'optionalAccess', _7 => _7.container]),
|
|
337
|
-
animatedStyle
|
|
338
|
-
]
|
|
322
|
+
style: [styles.container, containerStyles, { borderRadius: radius }, style, animatedStyle]
|
|
339
323
|
},
|
|
340
324
|
!hideIcon && /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.iconWrapper, iconWrapperStyles] }, renderIcon()),
|
|
341
325
|
/* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.mainWrapper }, titleNode, descriptionNode, childrenNode && /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.extraContent }, childrenNode)),
|
package/dist/alert/index.d.cts
CHANGED
|
@@ -2,89 +2,45 @@ import React, { ReactNode } from 'react';
|
|
|
2
2
|
import { ViewStyle, TextStyle } from 'react-native';
|
|
3
3
|
import { ThemeColor } from '@xaui/core/types';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
type
|
|
5
|
+
/** Visual style of the alert container. */
|
|
6
|
+
type AlertVariant = 'solid' | 'bordered' | 'flat' | 'faded' | 'glass';
|
|
7
7
|
type AlertEvents = {
|
|
8
|
-
/**
|
|
9
|
-
* Callback fired when the alert is closed.
|
|
10
|
-
*/
|
|
8
|
+
/** Called when the alert finishes closing. */
|
|
11
9
|
onClose?: () => void;
|
|
12
|
-
/**
|
|
13
|
-
* Callback fired when the alert visibility changes.
|
|
14
|
-
*/
|
|
10
|
+
/** Called whenever the visibility state changes. */
|
|
15
11
|
onVisibleChange?: (isVisible: boolean) => void;
|
|
16
12
|
};
|
|
17
|
-
type AlertCustomAppearance = {
|
|
18
|
-
/**
|
|
19
|
-
* Custom style for the alert container.
|
|
20
|
-
*/
|
|
21
|
-
container?: ViewStyle;
|
|
22
|
-
/**
|
|
23
|
-
* Custom style for the alert title.
|
|
24
|
-
*/
|
|
25
|
-
title?: TextStyle;
|
|
26
|
-
/**
|
|
27
|
-
* Custom style for the alert description.
|
|
28
|
-
*/
|
|
29
|
-
description?: TextStyle;
|
|
30
|
-
};
|
|
31
13
|
type AlertProps = {
|
|
32
|
-
/**
|
|
33
|
-
* The title of the alert.
|
|
34
|
-
*/
|
|
14
|
+
/** Main heading displayed inside the alert. */
|
|
35
15
|
title?: ReactNode;
|
|
36
|
-
/**
|
|
37
|
-
* The description content of the alert.
|
|
38
|
-
*/
|
|
16
|
+
/** Supporting text below the title. */
|
|
39
17
|
description?: ReactNode;
|
|
40
|
-
/**
|
|
41
|
-
* Custom icon to display inside the alert.
|
|
42
|
-
*/
|
|
18
|
+
/** Custom icon element — overrides the default theme icon. */
|
|
43
19
|
icon?: ReactNode;
|
|
44
|
-
/**
|
|
45
|
-
* The theme color of the alert.
|
|
46
|
-
* @default 'default'
|
|
47
|
-
*/
|
|
20
|
+
/** Color scheme applied to the alert. Defaults to `'default'`. */
|
|
48
21
|
themeColor?: ThemeColor;
|
|
49
|
-
/**
|
|
50
|
-
* The variant of the alert.
|
|
51
|
-
* @default 'flat'
|
|
52
|
-
*/
|
|
22
|
+
/** Visual style variant. Defaults to `'flat'`. */
|
|
53
23
|
variant?: AlertVariant;
|
|
54
|
-
/**
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
*/
|
|
58
|
-
radius?: AlertRadius;
|
|
59
|
-
/**
|
|
60
|
-
* Whether the alert can be closed with a close button.
|
|
61
|
-
* @default false
|
|
62
|
-
*/
|
|
24
|
+
/** Border radius in pixels. Defaults to `8`. */
|
|
25
|
+
radius?: number;
|
|
26
|
+
/** Whether to display a close button. */
|
|
63
27
|
isClosable?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Whether to hide the icon.
|
|
66
|
-
* @default false
|
|
67
|
-
*/
|
|
28
|
+
/** Hide the leading icon. */
|
|
68
29
|
hideIcon?: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Custom close button element.
|
|
71
|
-
*/
|
|
30
|
+
/** Custom element rendered as the close button. */
|
|
72
31
|
closeButton?: ReactNode;
|
|
73
|
-
/**
|
|
74
|
-
* Whether the alert is visible.
|
|
75
|
-
* @default true
|
|
76
|
-
*/
|
|
32
|
+
/** Controls visibility externally (controlled mode). */
|
|
77
33
|
isVisible?: boolean;
|
|
78
|
-
/**
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
|
|
84
|
-
|
|
34
|
+
/** Override styles for the container. */
|
|
35
|
+
style?: ViewStyle;
|
|
36
|
+
/** Override styles for the title text. */
|
|
37
|
+
titleStyle?: TextStyle;
|
|
38
|
+
/** Override styles for the description text. */
|
|
39
|
+
descriptionStyle?: TextStyle;
|
|
40
|
+
/** Additional content rendered below the description. */
|
|
85
41
|
children?: ReactNode;
|
|
86
42
|
} & AlertEvents;
|
|
87
43
|
|
|
88
44
|
declare const Alert: React.FC<AlertProps>;
|
|
89
45
|
|
|
90
|
-
export { Alert, type AlertProps, type
|
|
46
|
+
export { Alert, type AlertProps, type AlertVariant };
|
package/dist/alert/index.d.ts
CHANGED
|
@@ -2,89 +2,45 @@ import React, { ReactNode } from 'react';
|
|
|
2
2
|
import { ViewStyle, TextStyle } from 'react-native';
|
|
3
3
|
import { ThemeColor } from '@xaui/core/types';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
type
|
|
5
|
+
/** Visual style of the alert container. */
|
|
6
|
+
type AlertVariant = 'solid' | 'bordered' | 'flat' | 'faded' | 'glass';
|
|
7
7
|
type AlertEvents = {
|
|
8
|
-
/**
|
|
9
|
-
* Callback fired when the alert is closed.
|
|
10
|
-
*/
|
|
8
|
+
/** Called when the alert finishes closing. */
|
|
11
9
|
onClose?: () => void;
|
|
12
|
-
/**
|
|
13
|
-
* Callback fired when the alert visibility changes.
|
|
14
|
-
*/
|
|
10
|
+
/** Called whenever the visibility state changes. */
|
|
15
11
|
onVisibleChange?: (isVisible: boolean) => void;
|
|
16
12
|
};
|
|
17
|
-
type AlertCustomAppearance = {
|
|
18
|
-
/**
|
|
19
|
-
* Custom style for the alert container.
|
|
20
|
-
*/
|
|
21
|
-
container?: ViewStyle;
|
|
22
|
-
/**
|
|
23
|
-
* Custom style for the alert title.
|
|
24
|
-
*/
|
|
25
|
-
title?: TextStyle;
|
|
26
|
-
/**
|
|
27
|
-
* Custom style for the alert description.
|
|
28
|
-
*/
|
|
29
|
-
description?: TextStyle;
|
|
30
|
-
};
|
|
31
13
|
type AlertProps = {
|
|
32
|
-
/**
|
|
33
|
-
* The title of the alert.
|
|
34
|
-
*/
|
|
14
|
+
/** Main heading displayed inside the alert. */
|
|
35
15
|
title?: ReactNode;
|
|
36
|
-
/**
|
|
37
|
-
* The description content of the alert.
|
|
38
|
-
*/
|
|
16
|
+
/** Supporting text below the title. */
|
|
39
17
|
description?: ReactNode;
|
|
40
|
-
/**
|
|
41
|
-
* Custom icon to display inside the alert.
|
|
42
|
-
*/
|
|
18
|
+
/** Custom icon element — overrides the default theme icon. */
|
|
43
19
|
icon?: ReactNode;
|
|
44
|
-
/**
|
|
45
|
-
* The theme color of the alert.
|
|
46
|
-
* @default 'default'
|
|
47
|
-
*/
|
|
20
|
+
/** Color scheme applied to the alert. Defaults to `'default'`. */
|
|
48
21
|
themeColor?: ThemeColor;
|
|
49
|
-
/**
|
|
50
|
-
* The variant of the alert.
|
|
51
|
-
* @default 'flat'
|
|
52
|
-
*/
|
|
22
|
+
/** Visual style variant. Defaults to `'flat'`. */
|
|
53
23
|
variant?: AlertVariant;
|
|
54
|
-
/**
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
*/
|
|
58
|
-
radius?: AlertRadius;
|
|
59
|
-
/**
|
|
60
|
-
* Whether the alert can be closed with a close button.
|
|
61
|
-
* @default false
|
|
62
|
-
*/
|
|
24
|
+
/** Border radius in pixels. Defaults to `8`. */
|
|
25
|
+
radius?: number;
|
|
26
|
+
/** Whether to display a close button. */
|
|
63
27
|
isClosable?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Whether to hide the icon.
|
|
66
|
-
* @default false
|
|
67
|
-
*/
|
|
28
|
+
/** Hide the leading icon. */
|
|
68
29
|
hideIcon?: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* Custom close button element.
|
|
71
|
-
*/
|
|
30
|
+
/** Custom element rendered as the close button. */
|
|
72
31
|
closeButton?: ReactNode;
|
|
73
|
-
/**
|
|
74
|
-
* Whether the alert is visible.
|
|
75
|
-
* @default true
|
|
76
|
-
*/
|
|
32
|
+
/** Controls visibility externally (controlled mode). */
|
|
77
33
|
isVisible?: boolean;
|
|
78
|
-
/**
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
|
|
84
|
-
|
|
34
|
+
/** Override styles for the container. */
|
|
35
|
+
style?: ViewStyle;
|
|
36
|
+
/** Override styles for the title text. */
|
|
37
|
+
titleStyle?: TextStyle;
|
|
38
|
+
/** Override styles for the description text. */
|
|
39
|
+
descriptionStyle?: TextStyle;
|
|
40
|
+
/** Additional content rendered below the description. */
|
|
85
41
|
children?: ReactNode;
|
|
86
42
|
} & AlertEvents;
|
|
87
43
|
|
|
88
44
|
declare const Alert: React.FC<AlertProps>;
|
|
89
45
|
|
|
90
|
-
export { Alert, type AlertProps, type
|
|
46
|
+
export { Alert, type AlertProps, type AlertVariant };
|
package/dist/alert/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import "../chunk-SHBDANQN.js";
|
|
2
2
|
import {
|
|
3
|
-
useBorderRadiusStyles,
|
|
4
3
|
useXUITheme
|
|
5
4
|
} from "../chunk-RBSA4NH4.js";
|
|
6
5
|
|
|
@@ -221,12 +220,14 @@ var Alert = ({
|
|
|
221
220
|
icon,
|
|
222
221
|
themeColor = "default",
|
|
223
222
|
variant = "flat",
|
|
224
|
-
radius =
|
|
223
|
+
radius = 8,
|
|
225
224
|
isClosable = false,
|
|
226
225
|
hideIcon = false,
|
|
227
226
|
closeButton,
|
|
228
227
|
isVisible,
|
|
229
|
-
|
|
228
|
+
style,
|
|
229
|
+
titleStyle,
|
|
230
|
+
descriptionStyle,
|
|
230
231
|
children,
|
|
231
232
|
onClose,
|
|
232
233
|
onVisibleChange
|
|
@@ -237,7 +238,6 @@ var Alert = ({
|
|
|
237
238
|
const visible = isControlled ? isVisible : internalVisible;
|
|
238
239
|
const opacity = useSharedValue(1);
|
|
239
240
|
const scale = useSharedValue(1);
|
|
240
|
-
const radiusStyles = useBorderRadiusStyles(radius);
|
|
241
241
|
const containerStyles = useAlertContainerStyles(themeColor, variant);
|
|
242
242
|
const iconWrapperStyles = useAlertIconWrapperStyles(themeColor, variant);
|
|
243
243
|
const { titleStyles, descriptionStyles, iconColor, closeButtonColor } = useAlertTextStyles(themeColor, variant);
|
|
@@ -290,27 +290,17 @@ var Alert = ({
|
|
|
290
290
|
const renderContentText = (content) => {
|
|
291
291
|
if (content === null || content === void 0) return null;
|
|
292
292
|
if (typeof content === "string" || typeof content === "number") {
|
|
293
|
-
return /* @__PURE__ */ React2.createElement(
|
|
294
|
-
Text,
|
|
295
|
-
{
|
|
296
|
-
style: [
|
|
297
|
-
styles.description,
|
|
298
|
-
descriptionStyles,
|
|
299
|
-
customAppearance?.description
|
|
300
|
-
]
|
|
301
|
-
},
|
|
302
|
-
content
|
|
303
|
-
);
|
|
293
|
+
return /* @__PURE__ */ React2.createElement(Text, { style: [styles.description, descriptionStyles, descriptionStyle] }, content);
|
|
304
294
|
}
|
|
305
295
|
return content;
|
|
306
296
|
};
|
|
307
297
|
const titleNode = useMemo2(() => {
|
|
308
298
|
if (title === null || title === void 0) return null;
|
|
309
299
|
if (typeof title === "string" || typeof title === "number") {
|
|
310
|
-
return /* @__PURE__ */ React2.createElement(Text, { style: [styles.title, titleStyles,
|
|
300
|
+
return /* @__PURE__ */ React2.createElement(Text, { style: [styles.title, titleStyles, titleStyle] }, title);
|
|
311
301
|
}
|
|
312
302
|
return title;
|
|
313
|
-
}, [title,
|
|
303
|
+
}, [title, titleStyle, titleStyles]);
|
|
314
304
|
const descriptionNode = renderContentText(description);
|
|
315
305
|
const childrenNode = renderContentText(children);
|
|
316
306
|
const closeButtonNode = useMemo2(() => {
|
|
@@ -329,13 +319,7 @@ var Alert = ({
|
|
|
329
319
|
Animated.View,
|
|
330
320
|
{
|
|
331
321
|
accessibilityRole: "alert",
|
|
332
|
-
style: [
|
|
333
|
-
styles.container,
|
|
334
|
-
containerStyles,
|
|
335
|
-
radiusStyles,
|
|
336
|
-
customAppearance?.container,
|
|
337
|
-
animatedStyle
|
|
338
|
-
]
|
|
322
|
+
style: [styles.container, containerStyles, { borderRadius: radius }, style, animatedStyle]
|
|
339
323
|
},
|
|
340
324
|
!hideIcon && /* @__PURE__ */ React2.createElement(View, { style: [styles.iconWrapper, iconWrapperStyles] }, renderIcon()),
|
|
341
325
|
/* @__PURE__ */ React2.createElement(View, { style: styles.mainWrapper }, titleNode, descriptionNode, childrenNode && /* @__PURE__ */ React2.createElement(View, { style: styles.extraContent }, childrenNode)),
|
|
@@ -434,10 +434,7 @@ var ColorPicker = ({
|
|
|
434
434
|
), /* @__PURE__ */ _react2.default.createElement(
|
|
435
435
|
_reactnative.Text,
|
|
436
436
|
{
|
|
437
|
-
style: [
|
|
438
|
-
styles.hexLabel,
|
|
439
|
-
{ color: _core.withOpacity.call(void 0, foreground, 0.7) }
|
|
440
|
-
]
|
|
437
|
+
style: [styles.hexLabel, { color: _core.withOpacity.call(void 0, foreground, 0.7) }]
|
|
441
438
|
},
|
|
442
439
|
value.toUpperCase()
|
|
443
440
|
))), /* @__PURE__ */ _react2.default.createElement(_reactnative.ScrollView, { showsVerticalScrollIndicator: false }, colorGroups.map((group) => /* @__PURE__ */ _react2.default.createElement(
|
|
@@ -434,10 +434,7 @@ var ColorPicker = ({
|
|
|
434
434
|
), /* @__PURE__ */ React.createElement(
|
|
435
435
|
Text,
|
|
436
436
|
{
|
|
437
|
-
style: [
|
|
438
|
-
styles.hexLabel,
|
|
439
|
-
{ color: withOpacity(foreground, 0.7) }
|
|
440
|
-
]
|
|
437
|
+
style: [styles.hexLabel, { color: withOpacity(foreground, 0.7) }]
|
|
441
438
|
},
|
|
442
439
|
value.toUpperCase()
|
|
443
440
|
))), /* @__PURE__ */ React.createElement(ScrollView, { showsVerticalScrollIndicator: false }, colorGroups.map((group) => /* @__PURE__ */ React.createElement(
|
package/dist/dialog/index.cjs
CHANGED
|
@@ -294,45 +294,36 @@ var Dialog = ({
|
|
|
294
294
|
[customAppearance, requestClose]
|
|
295
295
|
);
|
|
296
296
|
if (!shouldRender) return null;
|
|
297
|
-
return /* @__PURE__ */ _react2.default.createElement(
|
|
298
|
-
|
|
297
|
+
return /* @__PURE__ */ _react2.default.createElement(_reactnative.Modal, { visible: true, transparent: true, animationType: "none", onRequestClose: requestClose }, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.root }, !hideBackdrop && /* @__PURE__ */ _react2.default.createElement(
|
|
298
|
+
AnimatedPressable,
|
|
299
299
|
{
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
300
|
+
style: [
|
|
301
|
+
styles.backdrop,
|
|
302
|
+
backdropStyles[backdrop],
|
|
303
|
+
backdropAnimatedStyle,
|
|
304
|
+
_optionalChain([customAppearance, 'optionalAccess', _3 => _3.backdrop])
|
|
305
|
+
],
|
|
306
|
+
onPress: handleBackdropPress
|
|
307
|
+
}
|
|
308
|
+
), /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.placementBase, placementStyles[placement]] }, /* @__PURE__ */ _react2.default.createElement(DialogContext.Provider, { value: dialogContextValue }, /* @__PURE__ */ _react2.default.createElement(_reactnative.Pressable, { onPress: (event) => event.stopPropagation() }, /* @__PURE__ */ _react2.default.createElement(
|
|
309
|
+
_reactnativereanimated2.default.View,
|
|
310
|
+
{
|
|
311
|
+
style: [
|
|
312
|
+
styles.dialog,
|
|
313
|
+
sizeStyles[size],
|
|
314
|
+
radiusStyles,
|
|
315
|
+
dialogAnimatedStyle,
|
|
316
|
+
{
|
|
317
|
+
backgroundColor: theme.colors.background,
|
|
318
|
+
borderColor: _core.withOpacity.call(void 0, theme.colors.foreground, 0.14)
|
|
319
|
+
},
|
|
320
|
+
theme.shadows.lg,
|
|
321
|
+
_optionalChain([customAppearance, 'optionalAccess', _4 => _4.container]),
|
|
322
|
+
style
|
|
323
|
+
]
|
|
304
324
|
},
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
{
|
|
308
|
-
style: [
|
|
309
|
-
styles.backdrop,
|
|
310
|
-
backdropStyles[backdrop],
|
|
311
|
-
backdropAnimatedStyle,
|
|
312
|
-
_optionalChain([customAppearance, 'optionalAccess', _3 => _3.backdrop])
|
|
313
|
-
],
|
|
314
|
-
onPress: handleBackdropPress
|
|
315
|
-
}
|
|
316
|
-
), /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.placementBase, placementStyles[placement]] }, /* @__PURE__ */ _react2.default.createElement(DialogContext.Provider, { value: dialogContextValue }, /* @__PURE__ */ _react2.default.createElement(_reactnative.Pressable, { onPress: (event) => event.stopPropagation() }, /* @__PURE__ */ _react2.default.createElement(
|
|
317
|
-
_reactnativereanimated2.default.View,
|
|
318
|
-
{
|
|
319
|
-
style: [
|
|
320
|
-
styles.dialog,
|
|
321
|
-
sizeStyles[size],
|
|
322
|
-
radiusStyles,
|
|
323
|
-
dialogAnimatedStyle,
|
|
324
|
-
{
|
|
325
|
-
backgroundColor: theme.colors.background,
|
|
326
|
-
borderColor: _core.withOpacity.call(void 0, theme.colors.foreground, 0.14)
|
|
327
|
-
},
|
|
328
|
-
theme.shadows.lg,
|
|
329
|
-
_optionalChain([customAppearance, 'optionalAccess', _4 => _4.container]),
|
|
330
|
-
style
|
|
331
|
-
]
|
|
332
|
-
},
|
|
333
|
-
children
|
|
334
|
-
)))))
|
|
335
|
-
);
|
|
325
|
+
children
|
|
326
|
+
))))));
|
|
336
327
|
};
|
|
337
328
|
var AnimatedPressable = _reactnativereanimated2.default.createAnimatedComponent(_reactnative.Pressable);
|
|
338
329
|
var DialogHeader = ({
|
package/dist/dialog/index.js
CHANGED
|
@@ -294,45 +294,36 @@ var Dialog = ({
|
|
|
294
294
|
[customAppearance, requestClose]
|
|
295
295
|
);
|
|
296
296
|
if (!shouldRender) return null;
|
|
297
|
-
return /* @__PURE__ */ React.createElement(
|
|
298
|
-
|
|
297
|
+
return /* @__PURE__ */ React.createElement(Modal, { visible: true, transparent: true, animationType: "none", onRequestClose: requestClose }, /* @__PURE__ */ React.createElement(View, { style: styles.root }, !hideBackdrop && /* @__PURE__ */ React.createElement(
|
|
298
|
+
AnimatedPressable,
|
|
299
299
|
{
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
300
|
+
style: [
|
|
301
|
+
styles.backdrop,
|
|
302
|
+
backdropStyles[backdrop],
|
|
303
|
+
backdropAnimatedStyle,
|
|
304
|
+
customAppearance?.backdrop
|
|
305
|
+
],
|
|
306
|
+
onPress: handleBackdropPress
|
|
307
|
+
}
|
|
308
|
+
), /* @__PURE__ */ React.createElement(View, { style: [styles.placementBase, placementStyles[placement]] }, /* @__PURE__ */ React.createElement(DialogContext.Provider, { value: dialogContextValue }, /* @__PURE__ */ React.createElement(Pressable, { onPress: (event) => event.stopPropagation() }, /* @__PURE__ */ React.createElement(
|
|
309
|
+
Animated.View,
|
|
310
|
+
{
|
|
311
|
+
style: [
|
|
312
|
+
styles.dialog,
|
|
313
|
+
sizeStyles[size],
|
|
314
|
+
radiusStyles,
|
|
315
|
+
dialogAnimatedStyle,
|
|
316
|
+
{
|
|
317
|
+
backgroundColor: theme.colors.background,
|
|
318
|
+
borderColor: withOpacity(theme.colors.foreground, 0.14)
|
|
319
|
+
},
|
|
320
|
+
theme.shadows.lg,
|
|
321
|
+
customAppearance?.container,
|
|
322
|
+
style
|
|
323
|
+
]
|
|
304
324
|
},
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
{
|
|
308
|
-
style: [
|
|
309
|
-
styles.backdrop,
|
|
310
|
-
backdropStyles[backdrop],
|
|
311
|
-
backdropAnimatedStyle,
|
|
312
|
-
customAppearance?.backdrop
|
|
313
|
-
],
|
|
314
|
-
onPress: handleBackdropPress
|
|
315
|
-
}
|
|
316
|
-
), /* @__PURE__ */ React.createElement(View, { style: [styles.placementBase, placementStyles[placement]] }, /* @__PURE__ */ React.createElement(DialogContext.Provider, { value: dialogContextValue }, /* @__PURE__ */ React.createElement(Pressable, { onPress: (event) => event.stopPropagation() }, /* @__PURE__ */ React.createElement(
|
|
317
|
-
Animated.View,
|
|
318
|
-
{
|
|
319
|
-
style: [
|
|
320
|
-
styles.dialog,
|
|
321
|
-
sizeStyles[size],
|
|
322
|
-
radiusStyles,
|
|
323
|
-
dialogAnimatedStyle,
|
|
324
|
-
{
|
|
325
|
-
backgroundColor: theme.colors.background,
|
|
326
|
-
borderColor: withOpacity(theme.colors.foreground, 0.14)
|
|
327
|
-
},
|
|
328
|
-
theme.shadows.lg,
|
|
329
|
-
customAppearance?.container,
|
|
330
|
-
style
|
|
331
|
-
]
|
|
332
|
-
},
|
|
333
|
-
children
|
|
334
|
-
)))))
|
|
335
|
-
);
|
|
325
|
+
children
|
|
326
|
+
))))));
|
|
336
327
|
};
|
|
337
328
|
var AnimatedPressable = Animated.createAnimatedComponent(Pressable);
|
|
338
329
|
var DialogHeader = ({
|
package/dist/picker/index.cjs
CHANGED
|
@@ -84,20 +84,26 @@ var ChevronDownIcon = ({
|
|
|
84
84
|
}
|
|
85
85
|
)
|
|
86
86
|
);
|
|
87
|
-
var CheckIcon = ({ color }) => /* @__PURE__ */ _react2.default.createElement(
|
|
87
|
+
var CheckIcon = ({ color }) => /* @__PURE__ */ _react2.default.createElement(
|
|
88
88
|
_reactnative.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__ */ _react2.default.createElement(
|
|
93
|
+
_reactnative.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__ */ _react2.default.createElement(
|
|
121
127
|
_reactnative.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__ */ _react2.default.createElement(_reactnative.View, { style: styles.sheetContent }, sheetTitle ? /* @__PURE__ */ _react2.default.createElement(
|
|
218
|
-
_reactnative.Text,
|
|
219
|
-
{
|
|
220
|
-
style: [styles.sheetTitle, { color: theme.colors.foreground }]
|
|
221
|
-
},
|
|
222
|
-
sheetTitle
|
|
223
|
-
) : null, /* @__PURE__ */ _react2.default.createElement(_reactnative.ScrollView, null, options.map((option, index) => /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { key: option.value }, /* @__PURE__ */ _react2.default.createElement(
|
|
220
|
+
/* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.sheetContent }, sheetTitle ? /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.sheetTitle, { color: theme.colors.foreground }] }, sheetTitle) : null, /* @__PURE__ */ _react2.default.createElement(_reactnative.ScrollView, null, options.map((option, index) => /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { key: option.value }, /* @__PURE__ */ _react2.default.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: _core.withOpacity.call(void 0,
|
|
239
|
-
theme.colors.foreground,
|
|
240
|
-
0.06
|
|
241
|
-
)
|
|
235
|
+
backgroundColor: _core.withOpacity.call(void 0, theme.colors.foreground, 0.06)
|
|
242
236
|
}
|
|
243
237
|
]
|
|
244
238
|
}
|