@xaui/native 0.2.8 → 0.9.1-alpha.0
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/chunk-JDS6KGCM.cjs +791 -0
- package/dist/chunk-T3ZI2PZ6.js +791 -0
- package/dist/index.cjs +32 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +32 -0
- package/dist/theme/index.cjs +32 -0
- package/dist/theme/index.d.cts +669 -0
- package/dist/theme/index.d.ts +669 -0
- package/dist/theme/index.js +32 -0
- package/package.json +26 -249
- package/README.md +0 -178
- package/dist/alert/index.cjs +0 -340
- package/dist/alert/index.d.cts +0 -46
- package/dist/alert/index.d.ts +0 -46
- package/dist/alert/index.js +0 -340
- package/dist/app-bar/index.cjs +0 -148
- package/dist/app-bar/index.d.cts +0 -59
- package/dist/app-bar/index.d.ts +0 -59
- package/dist/app-bar/index.js +0 -148
- package/dist/autocomplete/index.cjs +0 -1122
- package/dist/autocomplete/index.d.cts +0 -88
- package/dist/autocomplete/index.d.ts +0 -88
- package/dist/autocomplete/index.js +0 -1122
- package/dist/avatar/index.cjs +0 -281
- package/dist/avatar/index.d.cts +0 -123
- package/dist/avatar/index.d.ts +0 -123
- package/dist/avatar/index.js +0 -281
- package/dist/badge/index.cjs +0 -197
- package/dist/badge/index.d.cts +0 -94
- package/dist/badge/index.d.ts +0 -94
- package/dist/badge/index.js +0 -197
- package/dist/bottom-sheet/index.cjs +0 -9
- package/dist/bottom-sheet/index.d.cts +0 -84
- package/dist/bottom-sheet/index.d.ts +0 -84
- package/dist/bottom-sheet/index.js +0 -9
- package/dist/bottom-tab-bar/index.cjs +0 -497
- package/dist/bottom-tab-bar/index.d.cts +0 -211
- package/dist/bottom-tab-bar/index.d.ts +0 -211
- package/dist/bottom-tab-bar/index.js +0 -497
- package/dist/button/index.cjs +0 -392
- package/dist/button/index.d.cts +0 -174
- package/dist/button/index.d.ts +0 -174
- package/dist/button/index.js +0 -392
- package/dist/button.type-j1ZdkkSl.d.cts +0 -4
- package/dist/button.type-j1ZdkkSl.d.ts +0 -4
- package/dist/card/index.cjs +0 -338
- package/dist/card/index.d.cts +0 -191
- package/dist/card/index.d.ts +0 -191
- package/dist/card/index.js +0 -338
- package/dist/carousel/index.cjs +0 -381
- package/dist/carousel/index.d.cts +0 -147
- package/dist/carousel/index.d.ts +0 -147
- package/dist/carousel/index.js +0 -381
- package/dist/chart/index.cjs +0 -1026
- package/dist/chart/index.d.cts +0 -218
- package/dist/chart/index.d.ts +0 -218
- package/dist/chart/index.js +0 -1026
- package/dist/checkbox/index.cjs +0 -443
- package/dist/checkbox/index.d.cts +0 -73
- package/dist/checkbox/index.d.ts +0 -73
- package/dist/checkbox/index.js +0 -443
- package/dist/chip/index.cjs +0 -503
- package/dist/chip/index.d.cts +0 -195
- package/dist/chip/index.d.ts +0 -195
- package/dist/chip/index.js +0 -503
- package/dist/chunk-4JFWQ5XT.js +0 -368
- package/dist/chunk-56RPWZD2.cjs +0 -9
- package/dist/chunk-7UFBLUMV.cjs +0 -136
- package/dist/chunk-A45TVXU5.js +0 -337
- package/dist/chunk-BYWUAPC4.cjs +0 -368
- package/dist/chunk-DECMUMCI.js +0 -0
- package/dist/chunk-DHSTKO3K.cjs +0 -19
- package/dist/chunk-DJ4Q37UT.cjs +0 -75
- package/dist/chunk-EUQDGTST.cjs +0 -1
- package/dist/chunk-GBHQCAKW.js +0 -19
- package/dist/chunk-RBSA4NH4.js +0 -136
- package/dist/chunk-SHBDANQN.js +0 -9
- package/dist/chunk-UGEINZM7.cjs +0 -290
- package/dist/chunk-UU4HHBDN.js +0 -290
- package/dist/chunk-VSZEXOUN.js +0 -384
- package/dist/chunk-YIEUN3G5.cjs +0 -384
- package/dist/chunk-ZH6ZSV2Q.cjs +0 -337
- package/dist/chunk-ZY7IUTAT.js +0 -75
- package/dist/color-picker/index.cjs +0 -457
- package/dist/color-picker/index.d.cts +0 -124
- package/dist/color-picker/index.d.ts +0 -124
- package/dist/color-picker/index.js +0 -457
- package/dist/core/index.cjs +0 -24
- package/dist/core/index.d.cts +0 -28
- package/dist/core/index.d.ts +0 -28
- package/dist/core/index.js +0 -24
- package/dist/datepicker/index.cjs +0 -1625
- package/dist/datepicker/index.d.cts +0 -45
- package/dist/datepicker/index.d.ts +0 -45
- package/dist/datepicker/index.js +0 -1625
- package/dist/dialog/index.cjs +0 -372
- package/dist/dialog/index.d.cts +0 -151
- package/dist/dialog/index.d.ts +0 -151
- package/dist/dialog/index.js +0 -372
- package/dist/divider/index.cjs +0 -8
- package/dist/divider/index.d.cts +0 -30
- package/dist/divider/index.d.ts +0 -30
- package/dist/divider/index.js +0 -8
- package/dist/drawer/index.cjs +0 -237
- package/dist/drawer/index.d.cts +0 -58
- package/dist/drawer/index.d.ts +0 -58
- package/dist/drawer/index.js +0 -237
- package/dist/expansion-panel/index.cjs +0 -441
- package/dist/expansion-panel/index.d.cts +0 -153
- package/dist/expansion-panel/index.d.ts +0 -153
- package/dist/expansion-panel/index.js +0 -441
- package/dist/fab/index.cjs +0 -9
- package/dist/fab/index.d.cts +0 -10
- package/dist/fab/index.d.ts +0 -10
- package/dist/fab/index.js +0 -9
- package/dist/fab-menu/index.cjs +0 -330
- package/dist/fab-menu/index.d.cts +0 -125
- package/dist/fab-menu/index.d.ts +0 -125
- package/dist/fab-menu/index.js +0 -330
- package/dist/fab.type-CkUHmXU_.d.ts +0 -86
- package/dist/fab.type-DN0vtAh6.d.cts +0 -86
- package/dist/feature-discovery/index.cjs +0 -464
- package/dist/feature-discovery/index.d.cts +0 -82
- package/dist/feature-discovery/index.d.ts +0 -82
- package/dist/feature-discovery/index.js +0 -464
- package/dist/indicator/index.cjs +0 -8
- package/dist/indicator/index.d.cts +0 -47
- package/dist/indicator/index.d.ts +0 -47
- package/dist/indicator/index.js +0 -8
- package/dist/input/index.cjs +0 -1462
- package/dist/input/index.d.cts +0 -522
- package/dist/input/index.d.ts +0 -522
- package/dist/input/index.js +0 -1462
- package/dist/input-trigger/index.cjs +0 -197
- package/dist/input-trigger/index.d.cts +0 -11
- package/dist/input-trigger/index.d.ts +0 -11
- package/dist/input-trigger/index.js +0 -197
- package/dist/input-trigger.type-Ba4bM3Qp.d.cts +0 -180
- package/dist/input-trigger.type-Ba4bM3Qp.d.ts +0 -180
- package/dist/list/index.cjs +0 -395
- package/dist/list/index.d.cts +0 -188
- package/dist/list/index.d.ts +0 -188
- package/dist/list/index.js +0 -395
- package/dist/menu/index.cjs +0 -316
- package/dist/menu/index.d.cts +0 -115
- package/dist/menu/index.d.ts +0 -115
- package/dist/menu/index.js +0 -316
- package/dist/menubox/index.cjs +0 -297
- package/dist/menubox/index.d.cts +0 -98
- package/dist/menubox/index.d.ts +0 -98
- package/dist/menubox/index.js +0 -297
- package/dist/pager/index.cjs +0 -205
- package/dist/pager/index.d.cts +0 -93
- package/dist/pager/index.d.ts +0 -93
- package/dist/pager/index.js +0 -205
- package/dist/picker/index.cjs +0 -244
- package/dist/picker/index.d.cts +0 -121
- package/dist/picker/index.d.ts +0 -121
- package/dist/picker/index.js +0 -244
- package/dist/progress/index.cjs +0 -219
- package/dist/progress/index.d.cts +0 -47
- package/dist/progress/index.d.ts +0 -47
- package/dist/progress/index.js +0 -219
- package/dist/radio/index.cjs +0 -465
- package/dist/radio/index.d.cts +0 -145
- package/dist/radio/index.d.ts +0 -145
- package/dist/radio/index.js +0 -465
- package/dist/refresh-control/index.cjs +0 -45
- package/dist/refresh-control/index.d.cts +0 -55
- package/dist/refresh-control/index.d.ts +0 -55
- package/dist/refresh-control/index.js +0 -45
- package/dist/segment-button/index.cjs +0 -405
- package/dist/segment-button/index.d.cts +0 -141
- package/dist/segment-button/index.d.ts +0 -141
- package/dist/segment-button/index.js +0 -405
- package/dist/select/index.cjs +0 -878
- package/dist/select/index.d.cts +0 -192
- package/dist/select/index.d.ts +0 -192
- package/dist/select/index.js +0 -878
- package/dist/skeleton/index.cjs +0 -89
- package/dist/skeleton/index.d.cts +0 -45
- package/dist/skeleton/index.d.ts +0 -45
- package/dist/skeleton/index.js +0 -89
- package/dist/slider/index.cjs +0 -576
- package/dist/slider/index.d.cts +0 -171
- package/dist/slider/index.d.ts +0 -171
- package/dist/slider/index.js +0 -576
- package/dist/snackbar/index.cjs +0 -436
- package/dist/snackbar/index.d.cts +0 -174
- package/dist/snackbar/index.d.ts +0 -174
- package/dist/snackbar/index.js +0 -436
- package/dist/snippet/index.cjs +0 -314
- package/dist/snippet/index.d.cts +0 -95
- package/dist/snippet/index.d.ts +0 -95
- package/dist/snippet/index.js +0 -314
- package/dist/stepper/index.cjs +0 -550
- package/dist/stepper/index.d.cts +0 -137
- package/dist/stepper/index.d.ts +0 -137
- package/dist/stepper/index.js +0 -550
- package/dist/switch/index.cjs +0 -358
- package/dist/switch/index.d.cts +0 -28
- package/dist/switch/index.d.ts +0 -28
- package/dist/switch/index.js +0 -358
- package/dist/tabs/index.cjs +0 -440
- package/dist/tabs/index.d.cts +0 -180
- package/dist/tabs/index.d.ts +0 -180
- package/dist/tabs/index.js +0 -440
- package/dist/timepicker/index.cjs +0 -823
- package/dist/timepicker/index.d.cts +0 -215
- package/dist/timepicker/index.d.ts +0 -215
- package/dist/timepicker/index.js +0 -823
- package/dist/toolbar/index.cjs +0 -333
- package/dist/toolbar/index.d.cts +0 -100
- package/dist/toolbar/index.d.ts +0 -100
- package/dist/toolbar/index.js +0 -333
- package/dist/typography/index.cjs +0 -238
- package/dist/typography/index.d.cts +0 -113
- package/dist/typography/index.d.ts +0 -113
- package/dist/typography/index.js +0 -238
- package/dist/view/index.cjs +0 -1361
- package/dist/view/index.d.cts +0 -833
- package/dist/view/index.d.ts +0 -833
- package/dist/view/index.js +0 -1361
|
@@ -1,1122 +0,0 @@
|
|
|
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; }
|
|
2
|
-
|
|
3
|
-
var _chunkDHSTKO3Kcjs = require('../chunk-DHSTKO3K.cjs');
|
|
4
|
-
require('../chunk-56RPWZD2.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _chunk7UFBLUMVcjs = require('../chunk-7UFBLUMV.cjs');
|
|
9
|
-
|
|
10
|
-
// src/components/autocomplete/autocomplete.tsx
|
|
11
|
-
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
12
|
-
var _reactnative = require('react-native');
|
|
13
|
-
|
|
14
|
-
// src/components/autocomplete/autocomplete-context.ts
|
|
15
|
-
|
|
16
|
-
var AutocompleteContext = _react.createContext.call(void 0, {
|
|
17
|
-
size: "md",
|
|
18
|
-
themeColor: "default",
|
|
19
|
-
isDisabled: false
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
// src/components/autocomplete/autocomplete.hook.ts
|
|
23
|
-
|
|
24
|
-
var _core = require('@xaui/core');
|
|
25
|
-
var _palette = require('@xaui/core/palette');
|
|
26
|
-
var useAutocompleteColorScheme = (themeColor) => {
|
|
27
|
-
const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
|
|
28
|
-
const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
|
|
29
|
-
const colorScheme = theme.colors[safeThemeColor];
|
|
30
|
-
return { theme, colorScheme };
|
|
31
|
-
};
|
|
32
|
-
var useAutocompleteSizeStyles = (size) => {
|
|
33
|
-
const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
|
|
34
|
-
return _react.useMemo.call(void 0, () => {
|
|
35
|
-
const sizes = {
|
|
36
|
-
xs: {
|
|
37
|
-
minHeight: theme.componentSizes.xs,
|
|
38
|
-
paddingHorizontal: theme.spacing.sm,
|
|
39
|
-
paddingVertical: theme.spacing.xs,
|
|
40
|
-
fontSize: theme.fontSizes.xs,
|
|
41
|
-
labelSize: theme.fontSizes.xs
|
|
42
|
-
},
|
|
43
|
-
sm: {
|
|
44
|
-
minHeight: theme.componentSizes.sm,
|
|
45
|
-
paddingHorizontal: theme.spacing.md,
|
|
46
|
-
paddingVertical: theme.spacing.xs,
|
|
47
|
-
fontSize: theme.fontSizes.sm,
|
|
48
|
-
labelSize: theme.fontSizes.xs
|
|
49
|
-
},
|
|
50
|
-
md: {
|
|
51
|
-
minHeight: theme.componentSizes.md,
|
|
52
|
-
paddingHorizontal: theme.spacing.md,
|
|
53
|
-
paddingVertical: theme.spacing.sm,
|
|
54
|
-
fontSize: theme.fontSizes.md,
|
|
55
|
-
labelSize: theme.fontSizes.sm
|
|
56
|
-
},
|
|
57
|
-
lg: {
|
|
58
|
-
minHeight: theme.componentSizes.lg,
|
|
59
|
-
paddingHorizontal: theme.spacing.lg,
|
|
60
|
-
paddingVertical: theme.spacing.md,
|
|
61
|
-
fontSize: theme.fontSizes.lg,
|
|
62
|
-
labelSize: theme.fontSizes.md
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
return sizes[size];
|
|
66
|
-
}, [size, theme]);
|
|
67
|
-
};
|
|
68
|
-
var useAutocompleteRadiusStyles = (radius) => {
|
|
69
|
-
const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
|
|
70
|
-
const radiusStyles = _react.useMemo.call(void 0, () => {
|
|
71
|
-
const radii = {
|
|
72
|
-
none: theme.borderRadius.none,
|
|
73
|
-
sm: theme.borderRadius.sm,
|
|
74
|
-
md: theme.borderRadius.md,
|
|
75
|
-
lg: theme.borderRadius.lg,
|
|
76
|
-
full: theme.borderRadius.full
|
|
77
|
-
};
|
|
78
|
-
return { borderRadius: radii[radius] };
|
|
79
|
-
}, [radius, theme]);
|
|
80
|
-
const listboxRadius = _react.useMemo.call(void 0, () => {
|
|
81
|
-
const radii = {
|
|
82
|
-
none: theme.borderRadius.none,
|
|
83
|
-
sm: theme.borderRadius.sm,
|
|
84
|
-
md: theme.borderRadius.md,
|
|
85
|
-
lg: theme.borderRadius.lg,
|
|
86
|
-
full: theme.borderRadius.full
|
|
87
|
-
};
|
|
88
|
-
return Math.min(radii[radius], theme.borderRadius.lg);
|
|
89
|
-
}, [radius, theme]);
|
|
90
|
-
return { radiusStyles, listboxRadius };
|
|
91
|
-
};
|
|
92
|
-
var useAutocompleteVariantStyles = (themeColor, variant, isInvalid) => {
|
|
93
|
-
const { theme, colorScheme } = useAutocompleteColorScheme(themeColor);
|
|
94
|
-
return _react.useMemo.call(void 0, () => {
|
|
95
|
-
let borderColor = isInvalid ? theme.colors.danger.main : colorScheme.main;
|
|
96
|
-
if (variant === "bordered" && themeColor === "default") {
|
|
97
|
-
borderColor = _palette.colors.gray[300];
|
|
98
|
-
}
|
|
99
|
-
const styles4 = {
|
|
100
|
-
bordered: {
|
|
101
|
-
backgroundColor: "transparent",
|
|
102
|
-
borderWidth: theme.borderWidth.md,
|
|
103
|
-
borderColor
|
|
104
|
-
},
|
|
105
|
-
colored: {
|
|
106
|
-
backgroundColor: _core.withOpacity.call(void 0, colorScheme.container, 0.5),
|
|
107
|
-
borderWidth: 0
|
|
108
|
-
},
|
|
109
|
-
light: {
|
|
110
|
-
backgroundColor: "transparent",
|
|
111
|
-
borderWidth: 0
|
|
112
|
-
},
|
|
113
|
-
underlined: {
|
|
114
|
-
backgroundColor: "transparent",
|
|
115
|
-
borderBottomWidth: theme.borderWidth.md,
|
|
116
|
-
borderColor
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
return styles4[variant];
|
|
120
|
-
}, [variant, theme, colorScheme, isInvalid, themeColor]);
|
|
121
|
-
};
|
|
122
|
-
var useAutocompleteLabelStyle = (themeColor, isInvalid, labelSize) => {
|
|
123
|
-
const { theme, colorScheme } = useAutocompleteColorScheme(themeColor);
|
|
124
|
-
return _react.useMemo.call(void 0, () => {
|
|
125
|
-
let baseColor = theme.colors.foreground;
|
|
126
|
-
if (isInvalid) {
|
|
127
|
-
baseColor = theme.colors.danger.main;
|
|
128
|
-
} else if (themeColor !== "default") {
|
|
129
|
-
baseColor = colorScheme.main;
|
|
130
|
-
}
|
|
131
|
-
return {
|
|
132
|
-
fontSize: labelSize,
|
|
133
|
-
color: baseColor
|
|
134
|
-
};
|
|
135
|
-
}, [isInvalid, labelSize, theme, themeColor, colorScheme]);
|
|
136
|
-
};
|
|
137
|
-
var useAutocompleteHelperColor = (isInvalid) => {
|
|
138
|
-
const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
|
|
139
|
-
return _react.useMemo.call(void 0, () => {
|
|
140
|
-
if (isInvalid) {
|
|
141
|
-
return theme.colors.danger.main;
|
|
142
|
-
}
|
|
143
|
-
return _palette.colors.gray[600];
|
|
144
|
-
}, [isInvalid, theme]);
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
// src/components/autocomplete/autocomplete.style.ts
|
|
148
|
-
|
|
149
|
-
var styles = _reactnative.StyleSheet.create({
|
|
150
|
-
container: {
|
|
151
|
-
gap: 6,
|
|
152
|
-
position: "relative"
|
|
153
|
-
},
|
|
154
|
-
fullWidth: {
|
|
155
|
-
flexShrink: 1,
|
|
156
|
-
flexBasis: "auto",
|
|
157
|
-
width: "100%"
|
|
158
|
-
},
|
|
159
|
-
minWidth: {
|
|
160
|
-
minWidth: 170
|
|
161
|
-
},
|
|
162
|
-
label: {
|
|
163
|
-
fontWeight: "500"
|
|
164
|
-
},
|
|
165
|
-
trigger: {
|
|
166
|
-
flexDirection: "row",
|
|
167
|
-
alignItems: "center",
|
|
168
|
-
justifyContent: "space-between",
|
|
169
|
-
gap: 8
|
|
170
|
-
},
|
|
171
|
-
triggerText: {
|
|
172
|
-
flex: 1
|
|
173
|
-
},
|
|
174
|
-
triggerWrapper: {
|
|
175
|
-
position: "relative"
|
|
176
|
-
},
|
|
177
|
-
triggerContent: {
|
|
178
|
-
flexDirection: "row",
|
|
179
|
-
alignItems: "center",
|
|
180
|
-
flex: 1,
|
|
181
|
-
gap: 8
|
|
182
|
-
},
|
|
183
|
-
triggerContentColumn: {
|
|
184
|
-
flexDirection: "column",
|
|
185
|
-
alignItems: "flex-start"
|
|
186
|
-
},
|
|
187
|
-
inputWrapper: {
|
|
188
|
-
flex: 1,
|
|
189
|
-
gap: 2
|
|
190
|
-
},
|
|
191
|
-
input: {
|
|
192
|
-
flexShrink: 1,
|
|
193
|
-
padding: 0
|
|
194
|
-
},
|
|
195
|
-
endSlot: {
|
|
196
|
-
flexDirection: "row",
|
|
197
|
-
alignItems: "center",
|
|
198
|
-
gap: 8
|
|
199
|
-
},
|
|
200
|
-
clearButton: {
|
|
201
|
-
padding: 2,
|
|
202
|
-
paddingLeft: 4,
|
|
203
|
-
marginRight: -4
|
|
204
|
-
},
|
|
205
|
-
helperText: {
|
|
206
|
-
fontSize: 12
|
|
207
|
-
},
|
|
208
|
-
disabled: {
|
|
209
|
-
opacity: 0.5
|
|
210
|
-
},
|
|
211
|
-
listbox: {
|
|
212
|
-
overflow: "hidden",
|
|
213
|
-
marginTop: 0,
|
|
214
|
-
position: "absolute",
|
|
215
|
-
left: 0,
|
|
216
|
-
right: 0,
|
|
217
|
-
zIndex: 50,
|
|
218
|
-
elevation: 4
|
|
219
|
-
},
|
|
220
|
-
listboxContent: {
|
|
221
|
-
flexShrink: 1
|
|
222
|
-
},
|
|
223
|
-
emptyMessage: {
|
|
224
|
-
paddingHorizontal: 16,
|
|
225
|
-
paddingVertical: 12,
|
|
226
|
-
textAlign: "center"
|
|
227
|
-
},
|
|
228
|
-
outsideLeftRow: {
|
|
229
|
-
flexDirection: "row",
|
|
230
|
-
alignItems: "center",
|
|
231
|
-
gap: 12
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
// src/components/autocomplete/autocomplete.state.hook.ts
|
|
236
|
-
|
|
237
|
-
var useAutocompleteOpenState = ({
|
|
238
|
-
isOpened,
|
|
239
|
-
isDisabled,
|
|
240
|
-
onOpenChange,
|
|
241
|
-
onClose
|
|
242
|
-
}) => {
|
|
243
|
-
const [internalIsOpen, setInternalIsOpen] = _react.useState.call(void 0, false);
|
|
244
|
-
const isOpen = isOpened !== void 0 ? isOpened : internalIsOpen;
|
|
245
|
-
const setOpen = _react.useCallback.call(void 0,
|
|
246
|
-
(open) => {
|
|
247
|
-
if (isDisabled) {
|
|
248
|
-
return;
|
|
249
|
-
}
|
|
250
|
-
if (isOpened === void 0) {
|
|
251
|
-
setInternalIsOpen(open);
|
|
252
|
-
}
|
|
253
|
-
_optionalChain([onOpenChange, 'optionalCall', _2 => _2(open)]);
|
|
254
|
-
if (!open) {
|
|
255
|
-
_optionalChain([onClose, 'optionalCall', _3 => _3()]);
|
|
256
|
-
}
|
|
257
|
-
},
|
|
258
|
-
[isDisabled, isOpened, onOpenChange, onClose]
|
|
259
|
-
);
|
|
260
|
-
return { isOpen, setOpen };
|
|
261
|
-
};
|
|
262
|
-
var useAutocompleteInputState = ({
|
|
263
|
-
inputValue,
|
|
264
|
-
defaultInputValue,
|
|
265
|
-
selectedKey,
|
|
266
|
-
onInputChange
|
|
267
|
-
}) => {
|
|
268
|
-
const [internalInputValue, setInternalInputValue] = _react.useState.call(void 0,
|
|
269
|
-
_nullishCoalesce(defaultInputValue, () => ( ""))
|
|
270
|
-
);
|
|
271
|
-
const currentInputValue = inputValue !== void 0 ? inputValue : internalInputValue;
|
|
272
|
-
const updateInputValue = _react.useCallback.call(void 0,
|
|
273
|
-
(value) => {
|
|
274
|
-
if (inputValue === void 0) {
|
|
275
|
-
setInternalInputValue(value);
|
|
276
|
-
}
|
|
277
|
-
_optionalChain([onInputChange, 'optionalCall', _4 => _4(value)]);
|
|
278
|
-
},
|
|
279
|
-
[inputValue, onInputChange]
|
|
280
|
-
);
|
|
281
|
-
_react.useEffect.call(void 0, () => {
|
|
282
|
-
if (selectedKey === null && inputValue === void 0) {
|
|
283
|
-
setInternalInputValue("");
|
|
284
|
-
}
|
|
285
|
-
}, [selectedKey, inputValue]);
|
|
286
|
-
return { currentInputValue, updateInputValue };
|
|
287
|
-
};
|
|
288
|
-
var useAutocompleteSelection = ({
|
|
289
|
-
onSelectionChange
|
|
290
|
-
}) => {
|
|
291
|
-
const [currentSelectedKey, setCurrentSelectedKey] = _react.useState.call(void 0, null);
|
|
292
|
-
const updateSelection = _react.useCallback.call(void 0,
|
|
293
|
-
(key) => {
|
|
294
|
-
setCurrentSelectedKey(key);
|
|
295
|
-
_optionalChain([onSelectionChange, 'optionalCall', _5 => _5(key)]);
|
|
296
|
-
},
|
|
297
|
-
[onSelectionChange]
|
|
298
|
-
);
|
|
299
|
-
return { currentSelectedKey, updateSelection };
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
// src/components/autocomplete/autocomplete.utils.ts
|
|
303
|
-
var getTextValue = (node) => {
|
|
304
|
-
if (typeof node === "string" || typeof node === "number") {
|
|
305
|
-
return String(node);
|
|
306
|
-
}
|
|
307
|
-
return null;
|
|
308
|
-
};
|
|
309
|
-
var defaultFilterFunction = (textValue, inputValue) => {
|
|
310
|
-
const normalizedText = textValue.toLowerCase().trim();
|
|
311
|
-
const normalizedInput = inputValue.toLowerCase().trim();
|
|
312
|
-
return normalizedText.includes(normalizedInput);
|
|
313
|
-
};
|
|
314
|
-
|
|
315
|
-
// src/components/dialogs/autocomplete-dialog/autocomplete-dialog.tsx
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
// src/components/dialogs/autocomplete-dialog/autocomplete-dialog-header.tsx
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
var _icons = require('@xaui/icons');
|
|
339
|
-
|
|
340
|
-
// src/components/dialogs/autocomplete-dialog/autocomplete-dialog.style.ts
|
|
341
|
-
|
|
342
|
-
var styles2 = _reactnative.StyleSheet.create({
|
|
343
|
-
backdrop: {
|
|
344
|
-
..._reactnative.StyleSheet.absoluteFillObject,
|
|
345
|
-
backgroundColor: "rgba(0, 0, 0, 0.5)"
|
|
346
|
-
},
|
|
347
|
-
dialogContainer: {
|
|
348
|
-
flex: 1,
|
|
349
|
-
zIndex: 1
|
|
350
|
-
},
|
|
351
|
-
container: {
|
|
352
|
-
flex: 1,
|
|
353
|
-
paddingTop: 55,
|
|
354
|
-
paddingHorizontal: 16
|
|
355
|
-
},
|
|
356
|
-
header: {
|
|
357
|
-
marginBottom: 12
|
|
358
|
-
},
|
|
359
|
-
titleRow: {
|
|
360
|
-
flexDirection: "row",
|
|
361
|
-
alignItems: "center",
|
|
362
|
-
gap: 8,
|
|
363
|
-
marginBottom: 16
|
|
364
|
-
},
|
|
365
|
-
backButton: {
|
|
366
|
-
padding: 4
|
|
367
|
-
},
|
|
368
|
-
title: {
|
|
369
|
-
fontSize: 20,
|
|
370
|
-
fontWeight: "600"
|
|
371
|
-
},
|
|
372
|
-
inputContainer: {
|
|
373
|
-
flexDirection: "row",
|
|
374
|
-
alignItems: "center",
|
|
375
|
-
gap: 8
|
|
376
|
-
},
|
|
377
|
-
inputWrapper: {
|
|
378
|
-
flex: 1,
|
|
379
|
-
flexDirection: "row",
|
|
380
|
-
alignItems: "center",
|
|
381
|
-
position: "relative"
|
|
382
|
-
},
|
|
383
|
-
input: {
|
|
384
|
-
flex: 1,
|
|
385
|
-
paddingVertical: 12,
|
|
386
|
-
paddingHorizontal: 16,
|
|
387
|
-
paddingRight: 40,
|
|
388
|
-
borderRadius: 8,
|
|
389
|
-
fontSize: 16
|
|
390
|
-
},
|
|
391
|
-
clearInputButton: {
|
|
392
|
-
position: "absolute",
|
|
393
|
-
right: 8,
|
|
394
|
-
padding: 4
|
|
395
|
-
},
|
|
396
|
-
listContainer: {
|
|
397
|
-
flex: 1
|
|
398
|
-
},
|
|
399
|
-
listContentContainer: {
|
|
400
|
-
paddingBottom: 80
|
|
401
|
-
},
|
|
402
|
-
checkmarkButtonContainer: {
|
|
403
|
-
position: "absolute",
|
|
404
|
-
bottom: 24,
|
|
405
|
-
right: 24
|
|
406
|
-
},
|
|
407
|
-
checkmarkButton: {
|
|
408
|
-
width: 54,
|
|
409
|
-
height: 54,
|
|
410
|
-
borderRadius: 27,
|
|
411
|
-
justifyContent: "center",
|
|
412
|
-
alignItems: "center",
|
|
413
|
-
elevation: 8
|
|
414
|
-
}
|
|
415
|
-
});
|
|
416
|
-
|
|
417
|
-
// src/components/dialogs/autocomplete-dialog/autocomplete-dialog-header.tsx
|
|
418
|
-
|
|
419
|
-
var AutocompleteDialogHeader = ({
|
|
420
|
-
title,
|
|
421
|
-
inputValue,
|
|
422
|
-
placeholder = "Search...",
|
|
423
|
-
inputRef,
|
|
424
|
-
inputAnimatedStyle,
|
|
425
|
-
inputTextStyle,
|
|
426
|
-
onInputChange,
|
|
427
|
-
onClose,
|
|
428
|
-
onCheckmarkPress,
|
|
429
|
-
onFocus,
|
|
430
|
-
onBlur
|
|
431
|
-
}) => {
|
|
432
|
-
const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
|
|
433
|
-
return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles2.header }, title ? /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles2.titleRow }, /* @__PURE__ */ _react2.default.createElement(
|
|
434
|
-
_reactnative.Pressable,
|
|
435
|
-
{
|
|
436
|
-
style: styles2.backButton,
|
|
437
|
-
onPress: onClose,
|
|
438
|
-
accessibilityLabel: "Back",
|
|
439
|
-
accessibilityRole: "button"
|
|
440
|
-
},
|
|
441
|
-
/* @__PURE__ */ _react2.default.createElement(_icons.ArrowBackIcon, { size: 20, color: theme.colors.foreground })
|
|
442
|
-
), /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles2.title, { color: theme.colors.foreground }] }, title)) : null, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles2.inputContainer }, /* @__PURE__ */ _react2.default.createElement(_reactnative.Animated.View, { style: [styles2.inputWrapper, inputAnimatedStyle] }, /* @__PURE__ */ _react2.default.createElement(
|
|
443
|
-
_reactnative.TextInput,
|
|
444
|
-
{
|
|
445
|
-
ref: inputRef,
|
|
446
|
-
value: inputValue,
|
|
447
|
-
onChangeText: onInputChange,
|
|
448
|
-
placeholder,
|
|
449
|
-
placeholderTextColor: _core.withOpacity.call(void 0, theme.colors.foreground, 0.5),
|
|
450
|
-
style: [
|
|
451
|
-
styles2.input,
|
|
452
|
-
{
|
|
453
|
-
backgroundColor: theme.colors.default.container,
|
|
454
|
-
color: theme.colors.foreground
|
|
455
|
-
},
|
|
456
|
-
inputTextStyle
|
|
457
|
-
],
|
|
458
|
-
autoFocus: true,
|
|
459
|
-
returnKeyType: "done",
|
|
460
|
-
onSubmitEditing: onCheckmarkPress,
|
|
461
|
-
onFocus,
|
|
462
|
-
onBlur
|
|
463
|
-
}
|
|
464
|
-
), inputValue ? /* @__PURE__ */ _react2.default.createElement(
|
|
465
|
-
_reactnative.Pressable,
|
|
466
|
-
{
|
|
467
|
-
style: styles2.clearInputButton,
|
|
468
|
-
onPress: () => _optionalChain([onInputChange, 'optionalCall', _6 => _6("")]),
|
|
469
|
-
accessibilityLabel: "Clear input",
|
|
470
|
-
accessibilityRole: "button"
|
|
471
|
-
},
|
|
472
|
-
/* @__PURE__ */ _react2.default.createElement(_icons.CloseIcon, { color: theme.colors.foreground })
|
|
473
|
-
) : null)));
|
|
474
|
-
};
|
|
475
|
-
|
|
476
|
-
// src/components/dialogs/autocomplete-dialog/autocomplete-dialog.animation.ts
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
var useAutocompleteDialogAnimation = ({
|
|
480
|
-
visible,
|
|
481
|
-
fadeAnim,
|
|
482
|
-
slideAnim,
|
|
483
|
-
scaleAnim
|
|
484
|
-
}) => {
|
|
485
|
-
_react.useEffect.call(void 0, () => {
|
|
486
|
-
if (visible) {
|
|
487
|
-
_reactnative.Animated.parallel([
|
|
488
|
-
_reactnative.Animated.timing(fadeAnim, {
|
|
489
|
-
toValue: 1,
|
|
490
|
-
duration: 250,
|
|
491
|
-
useNativeDriver: true
|
|
492
|
-
}),
|
|
493
|
-
_reactnative.Animated.spring(slideAnim, {
|
|
494
|
-
toValue: 1,
|
|
495
|
-
useNativeDriver: true,
|
|
496
|
-
tension: 65,
|
|
497
|
-
friction: 10
|
|
498
|
-
}),
|
|
499
|
-
_reactnative.Animated.spring(scaleAnim, {
|
|
500
|
-
toValue: 1,
|
|
501
|
-
useNativeDriver: true,
|
|
502
|
-
tension: 50,
|
|
503
|
-
friction: 8
|
|
504
|
-
})
|
|
505
|
-
]).start();
|
|
506
|
-
} else {
|
|
507
|
-
fadeAnim.setValue(0);
|
|
508
|
-
slideAnim.setValue(0);
|
|
509
|
-
scaleAnim.setValue(0);
|
|
510
|
-
}
|
|
511
|
-
}, [visible, fadeAnim, slideAnim, scaleAnim]);
|
|
512
|
-
};
|
|
513
|
-
|
|
514
|
-
// src/components/dialogs/autocomplete-dialog/autocomplete-dialog.tsx
|
|
515
|
-
var AutocompleteDialog = ({
|
|
516
|
-
visible,
|
|
517
|
-
inputValue,
|
|
518
|
-
placeholder = "Search...",
|
|
519
|
-
title,
|
|
520
|
-
themeColor = "primary",
|
|
521
|
-
children,
|
|
522
|
-
showCheckmark = true,
|
|
523
|
-
checkmarkIcon,
|
|
524
|
-
inputTextStyle,
|
|
525
|
-
style,
|
|
526
|
-
onInputChange,
|
|
527
|
-
onClose,
|
|
528
|
-
onCheckmark,
|
|
529
|
-
onFocus,
|
|
530
|
-
onBlur
|
|
531
|
-
}) => {
|
|
532
|
-
const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
|
|
533
|
-
const { width: screenWidth, height: screenHeight } = _reactnative.useWindowDimensions.call(void 0, );
|
|
534
|
-
const fadeAnim = _react.useRef.call(void 0, new _reactnative.Animated.Value(0)).current;
|
|
535
|
-
const slideAnim = _react.useRef.call(void 0, new _reactnative.Animated.Value(0)).current;
|
|
536
|
-
const scaleAnim = _react.useRef.call(void 0, new _reactnative.Animated.Value(0)).current;
|
|
537
|
-
const inputRef = _react.useRef.call(void 0, null);
|
|
538
|
-
const [keyboardHeight, setKeyboardHeight] = _react.useState.call(void 0, 0);
|
|
539
|
-
_react.useEffect.call(void 0, () => {
|
|
540
|
-
const showEvent = _reactnative.Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow";
|
|
541
|
-
const hideEvent = _reactnative.Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide";
|
|
542
|
-
const showSub = _reactnative.Keyboard.addListener(showEvent, (e) => {
|
|
543
|
-
setKeyboardHeight(e.endCoordinates.height);
|
|
544
|
-
});
|
|
545
|
-
const hideSub = _reactnative.Keyboard.addListener(hideEvent, () => {
|
|
546
|
-
setKeyboardHeight(0);
|
|
547
|
-
});
|
|
548
|
-
return () => {
|
|
549
|
-
showSub.remove();
|
|
550
|
-
hideSub.remove();
|
|
551
|
-
};
|
|
552
|
-
}, []);
|
|
553
|
-
const items = _react.useMemo.call(void 0,
|
|
554
|
-
() => _react2.default.Children.toArray(children).filter(
|
|
555
|
-
_react2.default.isValidElement
|
|
556
|
-
),
|
|
557
|
-
[children]
|
|
558
|
-
);
|
|
559
|
-
const checkmarkColor = theme.colors[themeColor].main;
|
|
560
|
-
const checkmarkBackgroundColor = theme.colors[themeColor].container;
|
|
561
|
-
useAutocompleteDialogAnimation({ visible, fadeAnim, slideAnim, scaleAnim });
|
|
562
|
-
_react.useEffect.call(void 0, () => {
|
|
563
|
-
if (!visible) return;
|
|
564
|
-
const sub = _reactnative.BackHandler.addEventListener("hardwareBackPress", () => {
|
|
565
|
-
_optionalChain([onClose, 'optionalCall', _7 => _7()]);
|
|
566
|
-
return true;
|
|
567
|
-
});
|
|
568
|
-
return () => sub.remove();
|
|
569
|
-
}, [visible, onClose]);
|
|
570
|
-
const focusInput = _react.useCallback.call(void 0, () => {
|
|
571
|
-
const delay = _reactnative.Platform.OS === "android" ? 300 : 100;
|
|
572
|
-
_reactnative.InteractionManager.runAfterInteractions(() => {
|
|
573
|
-
setTimeout(() => {
|
|
574
|
-
_optionalChain([inputRef, 'access', _8 => _8.current, 'optionalAccess', _9 => _9.focus, 'call', _10 => _10()]);
|
|
575
|
-
}, delay);
|
|
576
|
-
});
|
|
577
|
-
}, []);
|
|
578
|
-
const handleCheckmarkPress = () => {
|
|
579
|
-
_optionalChain([onCheckmark, 'optionalCall', _11 => _11()]);
|
|
580
|
-
_reactnative.Keyboard.dismiss();
|
|
581
|
-
};
|
|
582
|
-
_react.useEffect.call(void 0, () => {
|
|
583
|
-
if (!visible) {
|
|
584
|
-
_reactnative.Keyboard.dismiss();
|
|
585
|
-
return;
|
|
586
|
-
}
|
|
587
|
-
focusInput();
|
|
588
|
-
}, [focusInput, visible]);
|
|
589
|
-
const listBottomPadding = _react.useMemo.call(void 0, () => {
|
|
590
|
-
const basePadding = showCheckmark ? 96 : 64;
|
|
591
|
-
return (keyboardHeight > 0 ? keyboardHeight : 0) + basePadding;
|
|
592
|
-
}, [keyboardHeight, showCheckmark]);
|
|
593
|
-
if (!visible) return null;
|
|
594
|
-
const overlayStyle = {
|
|
595
|
-
position: "absolute",
|
|
596
|
-
top: 0,
|
|
597
|
-
left: 0,
|
|
598
|
-
width: screenWidth,
|
|
599
|
-
height: screenHeight
|
|
600
|
-
};
|
|
601
|
-
const containerAnimatedStyle = {
|
|
602
|
-
transform: [
|
|
603
|
-
{
|
|
604
|
-
translateY: slideAnim.interpolate({
|
|
605
|
-
inputRange: [0, 1],
|
|
606
|
-
outputRange: [screenHeight, 0]
|
|
607
|
-
})
|
|
608
|
-
}
|
|
609
|
-
]
|
|
610
|
-
};
|
|
611
|
-
const inputAnimatedStyle = {
|
|
612
|
-
transform: [{ scaleX: scaleAnim }]
|
|
613
|
-
};
|
|
614
|
-
const listHeader = /* @__PURE__ */ _react2.default.createElement(
|
|
615
|
-
AutocompleteDialogHeader,
|
|
616
|
-
{
|
|
617
|
-
title,
|
|
618
|
-
inputValue,
|
|
619
|
-
placeholder,
|
|
620
|
-
inputRef,
|
|
621
|
-
inputAnimatedStyle,
|
|
622
|
-
inputTextStyle,
|
|
623
|
-
onInputChange,
|
|
624
|
-
onClose,
|
|
625
|
-
onCheckmarkPress: handleCheckmarkPress,
|
|
626
|
-
onFocus,
|
|
627
|
-
onBlur
|
|
628
|
-
}
|
|
629
|
-
);
|
|
630
|
-
return /* @__PURE__ */ _react2.default.createElement(_chunk7UFBLUMVcjs.Portal, null, /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [overlayStyle, style] }, /* @__PURE__ */ _react2.default.createElement(_reactnative.Animated.View, { style: [styles2.backdrop, { opacity: fadeAnim }] }), /* @__PURE__ */ _react2.default.createElement(_reactnative.Animated.View, { style: [styles2.dialogContainer, containerAnimatedStyle] }, /* @__PURE__ */ _react2.default.createElement(
|
|
631
|
-
_reactnative.View,
|
|
632
|
-
{
|
|
633
|
-
style: [styles2.container, { backgroundColor: theme.colors.background }]
|
|
634
|
-
},
|
|
635
|
-
listHeader,
|
|
636
|
-
/* @__PURE__ */ _react2.default.createElement(
|
|
637
|
-
_reactnative.FlatList,
|
|
638
|
-
{
|
|
639
|
-
data: items,
|
|
640
|
-
renderItem: ({ item }) => item,
|
|
641
|
-
keyExtractor: (_, index) => String(index),
|
|
642
|
-
style: styles2.listContainer,
|
|
643
|
-
contentContainerStyle: {
|
|
644
|
-
paddingBottom: listBottomPadding
|
|
645
|
-
},
|
|
646
|
-
keyboardShouldPersistTaps: "always",
|
|
647
|
-
keyboardDismissMode: "none",
|
|
648
|
-
showsVerticalScrollIndicator: false
|
|
649
|
-
}
|
|
650
|
-
),
|
|
651
|
-
showCheckmark ? /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles2.checkmarkButtonContainer }, /* @__PURE__ */ _react2.default.createElement(
|
|
652
|
-
_reactnative.Pressable,
|
|
653
|
-
{
|
|
654
|
-
style: [
|
|
655
|
-
styles2.checkmarkButton,
|
|
656
|
-
{ backgroundColor: checkmarkBackgroundColor }
|
|
657
|
-
],
|
|
658
|
-
onPress: handleCheckmarkPress,
|
|
659
|
-
accessibilityLabel: "Confirm",
|
|
660
|
-
accessibilityRole: "button"
|
|
661
|
-
},
|
|
662
|
-
_nullishCoalesce(checkmarkIcon, () => ( /* @__PURE__ */ _react2.default.createElement(_chunkDHSTKO3Kcjs.CheckmarkIcon, { color: checkmarkColor, size: 20 })))
|
|
663
|
-
)) : null
|
|
664
|
-
))));
|
|
665
|
-
};
|
|
666
|
-
|
|
667
|
-
// src/components/autocomplete/autocomplete-trigger.tsx
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
var AutocompleteTrigger = ({
|
|
672
|
-
triggerRef,
|
|
673
|
-
isDisabled,
|
|
674
|
-
currentSelectedKey,
|
|
675
|
-
currentInputValue,
|
|
676
|
-
displayValue,
|
|
677
|
-
sizeStyles,
|
|
678
|
-
radiusStyles,
|
|
679
|
-
variantStyles,
|
|
680
|
-
theme,
|
|
681
|
-
isClearable,
|
|
682
|
-
label,
|
|
683
|
-
labelText,
|
|
684
|
-
isLabelInside,
|
|
685
|
-
clearIcon,
|
|
686
|
-
style,
|
|
687
|
-
textStyle,
|
|
688
|
-
onPress: handleTriggerPress,
|
|
689
|
-
onClear: handleClear,
|
|
690
|
-
onLayout: handleTriggerLayout
|
|
691
|
-
}) => {
|
|
692
|
-
const renderLabel = isLabelInside && label;
|
|
693
|
-
return /* @__PURE__ */ _react2.default.createElement(
|
|
694
|
-
_reactnative.Pressable,
|
|
695
|
-
{
|
|
696
|
-
ref: triggerRef,
|
|
697
|
-
onPress: handleTriggerPress,
|
|
698
|
-
onLayout: handleTriggerLayout,
|
|
699
|
-
disabled: isDisabled,
|
|
700
|
-
style: [
|
|
701
|
-
styles.trigger,
|
|
702
|
-
{
|
|
703
|
-
minHeight: sizeStyles.minHeight,
|
|
704
|
-
paddingHorizontal: sizeStyles.paddingHorizontal,
|
|
705
|
-
paddingVertical: sizeStyles.paddingVertical
|
|
706
|
-
},
|
|
707
|
-
radiusStyles,
|
|
708
|
-
variantStyles,
|
|
709
|
-
isDisabled && styles.disabled,
|
|
710
|
-
style
|
|
711
|
-
],
|
|
712
|
-
accessibilityLabel: _nullishCoalesce(labelText, () => ( (typeof label === "string" ? label : void 0))),
|
|
713
|
-
accessibilityRole: "button",
|
|
714
|
-
accessibilityState: { disabled: isDisabled }
|
|
715
|
-
},
|
|
716
|
-
/* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.triggerContent }, isLabelInside && renderLabel, /* @__PURE__ */ _react2.default.createElement(
|
|
717
|
-
_reactnative.Text,
|
|
718
|
-
{
|
|
719
|
-
style: [
|
|
720
|
-
styles.triggerText,
|
|
721
|
-
{ fontSize: sizeStyles.fontSize, color: theme.colors.foreground },
|
|
722
|
-
!currentSelectedKey && !currentInputValue && { opacity: 0.5 },
|
|
723
|
-
textStyle
|
|
724
|
-
],
|
|
725
|
-
numberOfLines: 1,
|
|
726
|
-
ellipsizeMode: "tail"
|
|
727
|
-
},
|
|
728
|
-
displayValue
|
|
729
|
-
)),
|
|
730
|
-
isClearable && (currentSelectedKey || currentInputValue) ? /* @__PURE__ */ _react2.default.createElement(
|
|
731
|
-
_reactnative.TouchableOpacity,
|
|
732
|
-
{
|
|
733
|
-
onPress: handleClear,
|
|
734
|
-
style: styles.clearButton,
|
|
735
|
-
hitSlop: { top: 8, right: 8, bottom: 8, left: 8 }
|
|
736
|
-
},
|
|
737
|
-
_nullishCoalesce(clearIcon, () => ( /* @__PURE__ */ _react2.default.createElement(_icons.CloseIcon, { color: theme.colors.foreground, size: 20 })))
|
|
738
|
-
) : null
|
|
739
|
-
);
|
|
740
|
-
};
|
|
741
|
-
|
|
742
|
-
// src/components/autocomplete/autocomplete.tsx
|
|
743
|
-
var defaultPlaceholder = "Search...";
|
|
744
|
-
var Autocomplete = ({
|
|
745
|
-
children,
|
|
746
|
-
variant = "colored",
|
|
747
|
-
themeColor = "default",
|
|
748
|
-
size = "md",
|
|
749
|
-
radius = "md",
|
|
750
|
-
placeholder = defaultPlaceholder,
|
|
751
|
-
labelPlacement = "outside",
|
|
752
|
-
label,
|
|
753
|
-
description,
|
|
754
|
-
errorMessage,
|
|
755
|
-
clearIcon,
|
|
756
|
-
fullWidth = false,
|
|
757
|
-
isDisabled = false,
|
|
758
|
-
isInvalid = false,
|
|
759
|
-
isClearable = true,
|
|
760
|
-
allowsCustomValue = false,
|
|
761
|
-
forceSelection = false,
|
|
762
|
-
allowsEmptyCollection = true,
|
|
763
|
-
disableLocalFilter = false,
|
|
764
|
-
inputValue,
|
|
765
|
-
defaultInputValue,
|
|
766
|
-
customAppearance,
|
|
767
|
-
onClose,
|
|
768
|
-
onOpenChange,
|
|
769
|
-
onSelectionChange,
|
|
770
|
-
onInputChange,
|
|
771
|
-
onClear
|
|
772
|
-
}) => {
|
|
773
|
-
const { currentSelectedKey, updateSelection } = useAutocompleteSelection({
|
|
774
|
-
onSelectionChange
|
|
775
|
-
});
|
|
776
|
-
const { currentInputValue, updateInputValue } = useAutocompleteInputState({
|
|
777
|
-
inputValue,
|
|
778
|
-
defaultInputValue,
|
|
779
|
-
selectedKey: currentSelectedKey,
|
|
780
|
-
onInputChange
|
|
781
|
-
});
|
|
782
|
-
const { isOpen, setOpen } = useAutocompleteOpenState({
|
|
783
|
-
isOpened: void 0,
|
|
784
|
-
isDisabled,
|
|
785
|
-
onOpenChange,
|
|
786
|
-
onClose
|
|
787
|
-
});
|
|
788
|
-
const triggerRef = _react.useRef.call(void 0, null);
|
|
789
|
-
const [triggerLayout, setTriggerLayout] = _react.useState.call(void 0, );
|
|
790
|
-
const handleTriggerLayout = _react.useCallback.call(void 0, () => {
|
|
791
|
-
_optionalChain([triggerRef, 'access', _12 => _12.current, 'optionalAccess', _13 => _13.measureInWindow, 'call', _14 => _14((x, y, width, height) => {
|
|
792
|
-
setTriggerLayout({ x, y, width, height });
|
|
793
|
-
})]);
|
|
794
|
-
}, []);
|
|
795
|
-
const items = _react.useMemo.call(void 0, () => {
|
|
796
|
-
const elements = _react2.default.Children.toArray(children).filter(Boolean);
|
|
797
|
-
return elements.map((child, index) => {
|
|
798
|
-
if (!_react2.default.isValidElement(child)) {
|
|
799
|
-
return null;
|
|
800
|
-
}
|
|
801
|
-
const key = _nullishCoalesce(child.props.value, () => ( String(index)));
|
|
802
|
-
const labelText = _nullishCoalesce(getTextValue(child.props.label), () => ( key));
|
|
803
|
-
return {
|
|
804
|
-
key,
|
|
805
|
-
element: child,
|
|
806
|
-
labelText
|
|
807
|
-
};
|
|
808
|
-
}).filter((item) => item !== null);
|
|
809
|
-
}, [children]);
|
|
810
|
-
const filteredItems = _react.useMemo.call(void 0, () => {
|
|
811
|
-
if (disableLocalFilter || !currentInputValue.trim()) {
|
|
812
|
-
return items;
|
|
813
|
-
}
|
|
814
|
-
return items.filter(
|
|
815
|
-
(item) => defaultFilterFunction(item.labelText, currentInputValue)
|
|
816
|
-
);
|
|
817
|
-
}, [disableLocalFilter, items, currentInputValue]);
|
|
818
|
-
const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
|
|
819
|
-
const sizeStyles = useAutocompleteSizeStyles(size);
|
|
820
|
-
const { radiusStyles } = useAutocompleteRadiusStyles(radius);
|
|
821
|
-
const variantStyles = useAutocompleteVariantStyles(themeColor, variant, isInvalid);
|
|
822
|
-
const labelStyle = useAutocompleteLabelStyle(
|
|
823
|
-
themeColor,
|
|
824
|
-
isInvalid,
|
|
825
|
-
sizeStyles.labelSize
|
|
826
|
-
);
|
|
827
|
-
const helperColor = useAutocompleteHelperColor(isInvalid);
|
|
828
|
-
const selectedItem = items.find((item) => item.key === currentSelectedKey);
|
|
829
|
-
const displayValue = forceSelection ? _optionalChain([selectedItem, 'optionalAccess', _15 => _15.labelText]) || placeholder : currentInputValue || placeholder;
|
|
830
|
-
const handleInputChange = _react.useCallback.call(void 0,
|
|
831
|
-
(text) => {
|
|
832
|
-
updateInputValue(text);
|
|
833
|
-
const selectedLabel = _nullishCoalesce(_optionalChain([selectedItem, 'optionalAccess', _16 => _16.labelText]), () => ( ""));
|
|
834
|
-
const shouldClearSelection = !text.trim() && !allowsCustomValue || currentSelectedKey !== null && text !== selectedLabel;
|
|
835
|
-
if (shouldClearSelection) {
|
|
836
|
-
updateSelection(null);
|
|
837
|
-
}
|
|
838
|
-
},
|
|
839
|
-
[
|
|
840
|
-
updateInputValue,
|
|
841
|
-
allowsCustomValue,
|
|
842
|
-
updateSelection,
|
|
843
|
-
selectedItem,
|
|
844
|
-
currentSelectedKey
|
|
845
|
-
]
|
|
846
|
-
);
|
|
847
|
-
const handleItemSelection = _react.useCallback.call(void 0,
|
|
848
|
-
(key, itemLabel) => {
|
|
849
|
-
if (isDisabled) {
|
|
850
|
-
return;
|
|
851
|
-
}
|
|
852
|
-
updateSelection(key);
|
|
853
|
-
updateInputValue(itemLabel);
|
|
854
|
-
setTimeout(() => {
|
|
855
|
-
_reactnative.Keyboard.dismiss();
|
|
856
|
-
setOpen(false);
|
|
857
|
-
}, 50);
|
|
858
|
-
},
|
|
859
|
-
[isDisabled, updateSelection, updateInputValue, setOpen]
|
|
860
|
-
);
|
|
861
|
-
const handleCheckmark = _react.useCallback.call(void 0, () => {
|
|
862
|
-
setOpen(false);
|
|
863
|
-
}, [setOpen]);
|
|
864
|
-
const handleClear = _react.useCallback.call(void 0, () => {
|
|
865
|
-
if (isDisabled) {
|
|
866
|
-
return;
|
|
867
|
-
}
|
|
868
|
-
updateSelection(null);
|
|
869
|
-
updateInputValue("");
|
|
870
|
-
_optionalChain([onClear, 'optionalCall', _17 => _17()]);
|
|
871
|
-
}, [isDisabled, updateSelection, updateInputValue, onClear]);
|
|
872
|
-
const handleTriggerPress = _react.useCallback.call(void 0, () => {
|
|
873
|
-
if (!isDisabled) {
|
|
874
|
-
if (selectedItem && !currentInputValue) {
|
|
875
|
-
updateInputValue(selectedItem.labelText);
|
|
876
|
-
}
|
|
877
|
-
setOpen(true);
|
|
878
|
-
}
|
|
879
|
-
}, [isDisabled, setOpen, selectedItem, currentInputValue, updateInputValue]);
|
|
880
|
-
const listItems = filteredItems.map((item) => {
|
|
881
|
-
const itemProps = item.element.props;
|
|
882
|
-
const itemDisabled = isDisabled || itemProps.isDisabled;
|
|
883
|
-
const itemSelected = _nullishCoalesce(itemProps.isSelected, () => ( currentSelectedKey === item.key));
|
|
884
|
-
const handleItemSelected = () => {
|
|
885
|
-
if (itemDisabled || itemProps.isReadOnly) {
|
|
886
|
-
return;
|
|
887
|
-
}
|
|
888
|
-
handleItemSelection(item.key, item.labelText);
|
|
889
|
-
_optionalChain([itemProps, 'access', _18 => _18.onSelected, 'optionalCall', _19 => _19()]);
|
|
890
|
-
};
|
|
891
|
-
return _react2.default.cloneElement(item.element, {
|
|
892
|
-
key: item.key,
|
|
893
|
-
isDisabled: itemDisabled,
|
|
894
|
-
isSelected: itemSelected,
|
|
895
|
-
onSelected: handleItemSelected
|
|
896
|
-
});
|
|
897
|
-
});
|
|
898
|
-
const showEmptyMessage = !allowsEmptyCollection && listItems.length === 0;
|
|
899
|
-
const isLabelInside = labelPlacement === "inside";
|
|
900
|
-
const isLabelOutsideLeft = labelPlacement === "outside-left";
|
|
901
|
-
const isLabelOutside = labelPlacement === "outside" || labelPlacement === "outside-top";
|
|
902
|
-
const renderLabel = label ? typeof label === "string" || typeof label === "number" ? /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.label, labelStyle] }, label) : /* @__PURE__ */ _react2.default.createElement(_reactnative.View, null, label) : null;
|
|
903
|
-
const shouldShowHelper = Boolean(description || errorMessage);
|
|
904
|
-
const helperContent = isInvalid && errorMessage ? errorMessage : description;
|
|
905
|
-
const triggerContent = /* @__PURE__ */ _react2.default.createElement(
|
|
906
|
-
AutocompleteTrigger,
|
|
907
|
-
{
|
|
908
|
-
triggerRef,
|
|
909
|
-
isDisabled,
|
|
910
|
-
currentSelectedKey,
|
|
911
|
-
currentInputValue,
|
|
912
|
-
displayValue,
|
|
913
|
-
sizeStyles,
|
|
914
|
-
radiusStyles,
|
|
915
|
-
variantStyles,
|
|
916
|
-
theme,
|
|
917
|
-
isClearable,
|
|
918
|
-
label: renderLabel,
|
|
919
|
-
labelText: typeof label === "string" ? label : void 0,
|
|
920
|
-
isLabelInside,
|
|
921
|
-
clearIcon,
|
|
922
|
-
style: _optionalChain([customAppearance, 'optionalAccess', _20 => _20.container]),
|
|
923
|
-
textStyle: _optionalChain([customAppearance, 'optionalAccess', _21 => _21.text]),
|
|
924
|
-
onPress: handleTriggerPress,
|
|
925
|
-
onClear: handleClear,
|
|
926
|
-
onLayout: handleTriggerLayout
|
|
927
|
-
}
|
|
928
|
-
);
|
|
929
|
-
const labelBlock = isLabelOutside || isLabelInside ? renderLabel : null;
|
|
930
|
-
return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.container, fullWidth ? styles.fullWidth : styles.minWidth] }, isLabelOutside && labelBlock, isLabelOutsideLeft ? /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles.outsideLeftRow }, renderLabel, triggerContent) : triggerContent, shouldShowHelper && helperContent ? typeof helperContent === "string" || typeof helperContent === "number" ? /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.helperText, { color: helperColor }] }, helperContent) : /* @__PURE__ */ _react2.default.createElement(_reactnative.View, null, helperContent) : null, /* @__PURE__ */ _react2.default.createElement(
|
|
931
|
-
AutocompleteDialog,
|
|
932
|
-
{
|
|
933
|
-
visible: isOpen,
|
|
934
|
-
inputValue: currentInputValue,
|
|
935
|
-
placeholder,
|
|
936
|
-
title: typeof label === "string" ? label : void 0,
|
|
937
|
-
themeColor,
|
|
938
|
-
_triggerLayout: triggerLayout,
|
|
939
|
-
showCheckmark: false,
|
|
940
|
-
onInputChange: handleInputChange,
|
|
941
|
-
onClose: () => setOpen(false),
|
|
942
|
-
onCheckmark: handleCheckmark
|
|
943
|
-
},
|
|
944
|
-
/* @__PURE__ */ _react2.default.createElement(AutocompleteContext.Provider, { value: { size, themeColor, isDisabled } }, showEmptyMessage ? /* @__PURE__ */ _react2.default.createElement(_reactnative.Text, { style: [styles.emptyMessage, { color: theme.colors.foreground }] }, "No results found") : listItems)
|
|
945
|
-
));
|
|
946
|
-
};
|
|
947
|
-
|
|
948
|
-
// src/components/autocomplete/autocomplete-item.tsx
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
// src/components/autocomplete/autocomplete-item.style.ts
|
|
953
|
-
|
|
954
|
-
var styles3 = _reactnative.StyleSheet.create({
|
|
955
|
-
item: {
|
|
956
|
-
flexDirection: "row",
|
|
957
|
-
alignItems: "center",
|
|
958
|
-
gap: 8
|
|
959
|
-
},
|
|
960
|
-
content: {
|
|
961
|
-
flex: 1,
|
|
962
|
-
gap: 2
|
|
963
|
-
},
|
|
964
|
-
title: {
|
|
965
|
-
fontWeight: "500"
|
|
966
|
-
},
|
|
967
|
-
description: {
|
|
968
|
-
opacity: 0.7
|
|
969
|
-
},
|
|
970
|
-
disabled: {
|
|
971
|
-
opacity: 0.5
|
|
972
|
-
}
|
|
973
|
-
});
|
|
974
|
-
|
|
975
|
-
// src/components/autocomplete/autocomplete-item.hook.ts
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
var useAutocompleteItemSizeStyles = (size) => {
|
|
979
|
-
const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
|
|
980
|
-
return _react.useMemo.call(void 0, () => {
|
|
981
|
-
const sizes = {
|
|
982
|
-
xs: {
|
|
983
|
-
paddingVertical: theme.spacing.sm,
|
|
984
|
-
paddingHorizontal: theme.spacing.sm,
|
|
985
|
-
titleSize: theme.fontSizes.xs,
|
|
986
|
-
descriptionSize: theme.fontSizes.xs
|
|
987
|
-
},
|
|
988
|
-
sm: {
|
|
989
|
-
paddingVertical: theme.spacing.sm,
|
|
990
|
-
paddingHorizontal: theme.spacing.sm,
|
|
991
|
-
titleSize: theme.fontSizes.sm,
|
|
992
|
-
descriptionSize: theme.fontSizes.xs
|
|
993
|
-
},
|
|
994
|
-
md: {
|
|
995
|
-
paddingVertical: theme.spacing.sm,
|
|
996
|
-
paddingHorizontal: theme.spacing.sm,
|
|
997
|
-
titleSize: theme.fontSizes.md,
|
|
998
|
-
descriptionSize: theme.fontSizes.xs
|
|
999
|
-
},
|
|
1000
|
-
lg: {
|
|
1001
|
-
paddingVertical: theme.spacing.sm,
|
|
1002
|
-
paddingHorizontal: theme.spacing.sm,
|
|
1003
|
-
titleSize: theme.fontSizes.lg,
|
|
1004
|
-
descriptionSize: theme.fontSizes.md
|
|
1005
|
-
}
|
|
1006
|
-
};
|
|
1007
|
-
return sizes[size];
|
|
1008
|
-
}, [size, theme]);
|
|
1009
|
-
};
|
|
1010
|
-
var useAutocompleteItemBackgroundColor = (themeColor, isSelected) => {
|
|
1011
|
-
const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
|
|
1012
|
-
const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
|
|
1013
|
-
const colorScheme = theme.colors[safeThemeColor];
|
|
1014
|
-
return _react.useMemo.call(void 0, () => {
|
|
1015
|
-
return "transparent";
|
|
1016
|
-
}, [isSelected, colorScheme]);
|
|
1017
|
-
};
|
|
1018
|
-
var useAutocompleteItemTextColors = () => {
|
|
1019
|
-
const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
|
|
1020
|
-
return _react.useMemo.call(void 0, () => {
|
|
1021
|
-
return {
|
|
1022
|
-
textColor: theme.colors.foreground,
|
|
1023
|
-
descriptionColor: theme.colors.foreground
|
|
1024
|
-
};
|
|
1025
|
-
}, [theme]);
|
|
1026
|
-
};
|
|
1027
|
-
var useAutocompleteItemCheckmarkColor = (themeColor) => {
|
|
1028
|
-
const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
|
|
1029
|
-
const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
|
|
1030
|
-
const colorScheme = theme.colors[safeThemeColor];
|
|
1031
|
-
return _react.useMemo.call(void 0, () => {
|
|
1032
|
-
if (themeColor === "default") {
|
|
1033
|
-
return theme.colors.primary.main;
|
|
1034
|
-
}
|
|
1035
|
-
return colorScheme.main;
|
|
1036
|
-
}, [themeColor, colorScheme, theme]);
|
|
1037
|
-
};
|
|
1038
|
-
var useAutocompleteItemStyles = (isSelected, _isDisabled) => {
|
|
1039
|
-
const context = _react.useContext.call(void 0, AutocompleteContext);
|
|
1040
|
-
const backgroundColor = useAutocompleteItemBackgroundColor(
|
|
1041
|
-
context.themeColor,
|
|
1042
|
-
isSelected
|
|
1043
|
-
);
|
|
1044
|
-
const { textColor, descriptionColor } = useAutocompleteItemTextColors();
|
|
1045
|
-
const checkmarkColor = useAutocompleteItemCheckmarkColor(context.themeColor);
|
|
1046
|
-
return {
|
|
1047
|
-
backgroundColor,
|
|
1048
|
-
labelColor: textColor,
|
|
1049
|
-
descriptionColor,
|
|
1050
|
-
checkmarkColor
|
|
1051
|
-
};
|
|
1052
|
-
};
|
|
1053
|
-
|
|
1054
|
-
// src/components/autocomplete/autocomplete-item.tsx
|
|
1055
|
-
var defaultSize = "md";
|
|
1056
|
-
var AutocompleteItem = ({
|
|
1057
|
-
label,
|
|
1058
|
-
description,
|
|
1059
|
-
startContent,
|
|
1060
|
-
endContent,
|
|
1061
|
-
selectedIcon: _selectedIcon,
|
|
1062
|
-
isDisabled = false,
|
|
1063
|
-
isSelected = false,
|
|
1064
|
-
isReadOnly = false,
|
|
1065
|
-
customAppearance,
|
|
1066
|
-
onSelected
|
|
1067
|
-
}) => {
|
|
1068
|
-
const context = _react.useContext.call(void 0, AutocompleteContext);
|
|
1069
|
-
const size = _nullishCoalesce(_optionalChain([context, 'optionalAccess', _22 => _22.size]), () => ( defaultSize));
|
|
1070
|
-
const isItemDisabled = _optionalChain([context, 'optionalAccess', _23 => _23.isDisabled]) ? true : isDisabled;
|
|
1071
|
-
const sizeStyles = useAutocompleteItemSizeStyles(size);
|
|
1072
|
-
const { backgroundColor, labelColor, descriptionColor } = useAutocompleteItemStyles(isSelected, isItemDisabled);
|
|
1073
|
-
const handlePress = () => {
|
|
1074
|
-
if (isItemDisabled || isReadOnly) {
|
|
1075
|
-
return;
|
|
1076
|
-
}
|
|
1077
|
-
_optionalChain([onSelected, 'optionalCall', _24 => _24()]);
|
|
1078
|
-
};
|
|
1079
|
-
return /* @__PURE__ */ _react2.default.createElement(
|
|
1080
|
-
_reactnative.Pressable,
|
|
1081
|
-
{
|
|
1082
|
-
onPress: handlePress,
|
|
1083
|
-
disabled: isItemDisabled,
|
|
1084
|
-
style: [
|
|
1085
|
-
styles3.item,
|
|
1086
|
-
{
|
|
1087
|
-
paddingVertical: sizeStyles.paddingVertical,
|
|
1088
|
-
paddingHorizontal: sizeStyles.paddingHorizontal,
|
|
1089
|
-
backgroundColor
|
|
1090
|
-
},
|
|
1091
|
-
isItemDisabled && styles3.disabled,
|
|
1092
|
-
_optionalChain([customAppearance, 'optionalAccess', _25 => _25.container])
|
|
1093
|
-
]
|
|
1094
|
-
},
|
|
1095
|
-
startContent,
|
|
1096
|
-
/* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: styles3.content }, /* @__PURE__ */ _react2.default.createElement(
|
|
1097
|
-
_reactnative.Text,
|
|
1098
|
-
{
|
|
1099
|
-
style: [
|
|
1100
|
-
styles3.title,
|
|
1101
|
-
{ fontSize: sizeStyles.titleSize, color: labelColor },
|
|
1102
|
-
_optionalChain([customAppearance, 'optionalAccess', _26 => _26.text])
|
|
1103
|
-
]
|
|
1104
|
-
},
|
|
1105
|
-
label
|
|
1106
|
-
), description && /* @__PURE__ */ _react2.default.createElement(
|
|
1107
|
-
_reactnative.Text,
|
|
1108
|
-
{
|
|
1109
|
-
style: [
|
|
1110
|
-
styles3.description,
|
|
1111
|
-
{ fontSize: sizeStyles.descriptionSize, color: descriptionColor }
|
|
1112
|
-
]
|
|
1113
|
-
},
|
|
1114
|
-
description
|
|
1115
|
-
)),
|
|
1116
|
-
endContent
|
|
1117
|
-
);
|
|
1118
|
-
};
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
exports.Autocomplete = Autocomplete; exports.AutocompleteItem = AutocompleteItem;
|