@xaui/native 0.0.12 → 0.0.13
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/README.md +8 -1
- package/dist/accordion/index.cjs +7 -2
- package/dist/accordion/index.js +7 -2
- package/dist/alert/index.cjs +25 -188
- package/dist/alert/index.js +1 -2
- package/dist/autocomplete/index.cjs +106 -403
- package/dist/autocomplete/index.js +1 -3
- package/dist/button/index.cjs +126 -4
- package/dist/button/index.d.cts +63 -1
- package/dist/button/index.d.ts +63 -1
- package/dist/button/index.js +117 -3
- package/dist/checkbox/index.cjs +5 -1
- package/dist/checkbox/index.js +5 -1
- package/dist/{chunk-OFYJYQ2M.js → chunk-2T6FKPJW.js} +1 -3
- package/dist/{chunk-LM23DOX3.js → chunk-7OFTYKK4.js} +13 -33
- package/dist/{chunk-63LRW4QD.js → chunk-MKHBEJLO.js} +8 -1
- package/dist/{chunk-RL47NQAU.js → chunk-NMZUPH3R.js} +7 -12
- package/dist/datepicker/index.cjs +115 -836
- package/dist/datepicker/index.js +1 -3
- package/dist/index.cjs +362 -1170
- package/dist/index.js +4 -6
- package/dist/indicator/index.cjs +8 -1
- package/dist/indicator/index.js +1 -1
- package/dist/menu/index.cjs +371 -0
- package/dist/menu/index.d.cts +107 -0
- package/dist/menu/index.d.ts +107 -0
- package/dist/menu/index.js +304 -0
- package/dist/select/index.cjs +40 -16
- package/dist/select/index.js +40 -16
- package/dist/view/index.cjs +12 -7
- package/dist/view/index.js +12 -7
- package/package.json +7 -6
- package/dist/chunk-CKGZOJVV.js +0 -815
- package/dist/chunk-SIXET7TJ.js +0 -172
- package/dist/icon/index.cjs +0 -1054
- package/dist/icon/index.d.cts +0 -42
- package/dist/icon/index.d.ts +0 -42
- package/dist/icon/index.js +0 -21
package/dist/chunk-CKGZOJVV.js
DELETED
|
@@ -1,815 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isThemeColor
|
|
3
|
-
} from "./chunk-SIXET7TJ.js";
|
|
4
|
-
import {
|
|
5
|
-
useXUITheme
|
|
6
|
-
} from "./chunk-NBRASCX4.js";
|
|
7
|
-
|
|
8
|
-
// src/components/icon/icons/arrow-back.tsx
|
|
9
|
-
import React, { useEffect, useMemo, useRef } from "react";
|
|
10
|
-
import { Animated } from "react-native";
|
|
11
|
-
import Svg, { Circle, Path, Rect } from "react-native-svg";
|
|
12
|
-
var AnimatedPath = Animated.createAnimatedComponent(Path);
|
|
13
|
-
var ArrowBackIcon = ({
|
|
14
|
-
variant = "baseline",
|
|
15
|
-
size = 24,
|
|
16
|
-
color = "default",
|
|
17
|
-
isAnimated = false
|
|
18
|
-
}) => {
|
|
19
|
-
const theme = useXUITheme();
|
|
20
|
-
const scaleAnim = useRef(new Animated.Value(isAnimated ? 0 : 1)).current;
|
|
21
|
-
const opacityAnim = useRef(new Animated.Value(isAnimated ? 0 : 1)).current;
|
|
22
|
-
const resolvedColor = useMemo(() => {
|
|
23
|
-
if (typeof color === "string" && isThemeColor(color)) {
|
|
24
|
-
return theme.colors[color].main;
|
|
25
|
-
}
|
|
26
|
-
return color;
|
|
27
|
-
}, [color, theme]);
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
if (isAnimated) {
|
|
30
|
-
Animated.parallel([
|
|
31
|
-
Animated.spring(scaleAnim, {
|
|
32
|
-
toValue: 1,
|
|
33
|
-
useNativeDriver: true,
|
|
34
|
-
tension: 50,
|
|
35
|
-
friction: 7
|
|
36
|
-
}),
|
|
37
|
-
Animated.timing(opacityAnim, {
|
|
38
|
-
toValue: 1,
|
|
39
|
-
duration: 200,
|
|
40
|
-
useNativeDriver: true
|
|
41
|
-
})
|
|
42
|
-
]).start();
|
|
43
|
-
}
|
|
44
|
-
}, [isAnimated, scaleAnim, opacityAnim]);
|
|
45
|
-
const animatedProps = isAnimated ? {
|
|
46
|
-
transform: [{ scale: scaleAnim }],
|
|
47
|
-
opacity: opacityAnim
|
|
48
|
-
} : void 0;
|
|
49
|
-
const renderArrow = () => /* @__PURE__ */ React.createElement(
|
|
50
|
-
AnimatedPath,
|
|
51
|
-
{
|
|
52
|
-
fill: "none",
|
|
53
|
-
stroke: resolvedColor,
|
|
54
|
-
strokeLinecap: "round",
|
|
55
|
-
strokeLinejoin: "round",
|
|
56
|
-
strokeWidth: 48,
|
|
57
|
-
d: "M244 400L100 256l144-144M120 256h292",
|
|
58
|
-
...animatedProps
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
const renderDuotone = () => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
62
|
-
Path,
|
|
63
|
-
{
|
|
64
|
-
fill: resolvedColor,
|
|
65
|
-
opacity: 0.3,
|
|
66
|
-
d: "M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48z"
|
|
67
|
-
}
|
|
68
|
-
), renderArrow());
|
|
69
|
-
const renderRoundOutlined = () => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
70
|
-
Circle,
|
|
71
|
-
{
|
|
72
|
-
cx: "256",
|
|
73
|
-
cy: "256",
|
|
74
|
-
r: "192",
|
|
75
|
-
fill: "none",
|
|
76
|
-
stroke: resolvedColor,
|
|
77
|
-
strokeWidth: 32
|
|
78
|
-
}
|
|
79
|
-
), renderArrow());
|
|
80
|
-
const renderSquareOutlined = () => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
81
|
-
Rect,
|
|
82
|
-
{
|
|
83
|
-
x: "64",
|
|
84
|
-
y: "64",
|
|
85
|
-
width: "384",
|
|
86
|
-
height: "384",
|
|
87
|
-
rx: "48",
|
|
88
|
-
fill: "none",
|
|
89
|
-
stroke: resolvedColor,
|
|
90
|
-
strokeWidth: 32
|
|
91
|
-
}
|
|
92
|
-
), renderArrow());
|
|
93
|
-
const renderVariant = () => {
|
|
94
|
-
switch (variant) {
|
|
95
|
-
case "duotone":
|
|
96
|
-
return renderDuotone();
|
|
97
|
-
case "round-outlined":
|
|
98
|
-
return renderRoundOutlined();
|
|
99
|
-
case "square-outlined":
|
|
100
|
-
return renderSquareOutlined();
|
|
101
|
-
case "filled":
|
|
102
|
-
case "round-filled":
|
|
103
|
-
case "square-filled":
|
|
104
|
-
case "baseline":
|
|
105
|
-
default:
|
|
106
|
-
return renderArrow();
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
return /* @__PURE__ */ React.createElement(Svg, { width: size, height: size, viewBox: "0 0 512 512" }, renderVariant());
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
// src/components/icon/icons/calendar.tsx
|
|
113
|
-
import React2, { useEffect as useEffect2, useMemo as useMemo2, useRef as useRef2 } from "react";
|
|
114
|
-
import { Animated as Animated2 } from "react-native";
|
|
115
|
-
import Svg2, { Circle as Circle2, Path as Path2, Rect as Rect2 } from "react-native-svg";
|
|
116
|
-
var AnimatedPath2 = Animated2.createAnimatedComponent(Path2);
|
|
117
|
-
var CalendarIcon = ({
|
|
118
|
-
variant = "baseline",
|
|
119
|
-
size = 24,
|
|
120
|
-
color = "default",
|
|
121
|
-
isAnimated = false
|
|
122
|
-
}) => {
|
|
123
|
-
const theme = useXUITheme();
|
|
124
|
-
const scaleAnim = useRef2(new Animated2.Value(isAnimated ? 0 : 1)).current;
|
|
125
|
-
const opacityAnim = useRef2(new Animated2.Value(isAnimated ? 0 : 1)).current;
|
|
126
|
-
const resolvedColor = useMemo2(() => {
|
|
127
|
-
if (typeof color === "string" && isThemeColor(color)) {
|
|
128
|
-
return theme.colors[color].main;
|
|
129
|
-
}
|
|
130
|
-
return color;
|
|
131
|
-
}, [color, theme]);
|
|
132
|
-
useEffect2(() => {
|
|
133
|
-
if (isAnimated) {
|
|
134
|
-
Animated2.parallel([
|
|
135
|
-
Animated2.spring(scaleAnim, {
|
|
136
|
-
toValue: 1,
|
|
137
|
-
useNativeDriver: true,
|
|
138
|
-
tension: 50,
|
|
139
|
-
friction: 7
|
|
140
|
-
}),
|
|
141
|
-
Animated2.timing(opacityAnim, {
|
|
142
|
-
toValue: 1,
|
|
143
|
-
duration: 200,
|
|
144
|
-
useNativeDriver: true
|
|
145
|
-
})
|
|
146
|
-
]).start();
|
|
147
|
-
}
|
|
148
|
-
}, [isAnimated, scaleAnim, opacityAnim]);
|
|
149
|
-
const animatedProps = isAnimated ? {
|
|
150
|
-
transform: [{ scale: scaleAnim }],
|
|
151
|
-
opacity: opacityAnim
|
|
152
|
-
} : void 0;
|
|
153
|
-
const renderBaseline = () => /* @__PURE__ */ React2.createElement(
|
|
154
|
-
AnimatedPath2,
|
|
155
|
-
{
|
|
156
|
-
fill: "none",
|
|
157
|
-
stroke: resolvedColor,
|
|
158
|
-
strokeLinecap: "round",
|
|
159
|
-
strokeLinejoin: "round",
|
|
160
|
-
strokeWidth: 32,
|
|
161
|
-
d: "M48 112a48 48 0 0148-48h320a48 48 0 0148 48v320a48 48 0 01-48 48H96a48 48 0 01-48-48zm0 80h416M176 64v48M336 64v48",
|
|
162
|
-
...animatedProps
|
|
163
|
-
}
|
|
164
|
-
);
|
|
165
|
-
const renderFilled = () => /* @__PURE__ */ React2.createElement(
|
|
166
|
-
AnimatedPath2,
|
|
167
|
-
{
|
|
168
|
-
fill: resolvedColor,
|
|
169
|
-
d: "M416 64h-56V40a24 24 0 00-48 0v24H200V40a24 24 0 00-48 0v24H96a48 48 0 00-48 48v320a48 48 0 0048 48h320a48 48 0 0048-48V112a48 48 0 00-48-48zm0 368H96V208h320z",
|
|
170
|
-
...animatedProps
|
|
171
|
-
}
|
|
172
|
-
);
|
|
173
|
-
const renderDuotone = () => /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
|
|
174
|
-
Path2,
|
|
175
|
-
{
|
|
176
|
-
fill: resolvedColor,
|
|
177
|
-
opacity: 0.3,
|
|
178
|
-
d: "M48 192h416v240a48 48 0 01-48 48H96a48 48 0 01-48-48z"
|
|
179
|
-
}
|
|
180
|
-
), renderBaseline());
|
|
181
|
-
const renderRoundOutlined = () => /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
|
|
182
|
-
Circle2,
|
|
183
|
-
{
|
|
184
|
-
cx: "256",
|
|
185
|
-
cy: "256",
|
|
186
|
-
r: "192",
|
|
187
|
-
fill: "none",
|
|
188
|
-
stroke: resolvedColor,
|
|
189
|
-
strokeWidth: 32
|
|
190
|
-
}
|
|
191
|
-
), /* @__PURE__ */ React2.createElement(
|
|
192
|
-
AnimatedPath2,
|
|
193
|
-
{
|
|
194
|
-
fill: "none",
|
|
195
|
-
stroke: resolvedColor,
|
|
196
|
-
strokeLinecap: "round",
|
|
197
|
-
strokeLinejoin: "round",
|
|
198
|
-
strokeWidth: 28,
|
|
199
|
-
d: "M152 176a24 24 0 0124-24h160a24 24 0 0124 24v176a24 24 0 01-24 24H176a24 24 0 01-24-24zm0 48h208M208 152v32M304 152v32",
|
|
200
|
-
...animatedProps
|
|
201
|
-
}
|
|
202
|
-
));
|
|
203
|
-
const renderSquareOutlined = () => /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(
|
|
204
|
-
Rect2,
|
|
205
|
-
{
|
|
206
|
-
x: "64",
|
|
207
|
-
y: "64",
|
|
208
|
-
width: "384",
|
|
209
|
-
height: "384",
|
|
210
|
-
rx: "48",
|
|
211
|
-
fill: "none",
|
|
212
|
-
stroke: resolvedColor,
|
|
213
|
-
strokeWidth: 32
|
|
214
|
-
}
|
|
215
|
-
), /* @__PURE__ */ React2.createElement(
|
|
216
|
-
AnimatedPath2,
|
|
217
|
-
{
|
|
218
|
-
fill: "none",
|
|
219
|
-
stroke: resolvedColor,
|
|
220
|
-
strokeLinecap: "round",
|
|
221
|
-
strokeLinejoin: "round",
|
|
222
|
-
strokeWidth: 28,
|
|
223
|
-
d: "M152 176a24 24 0 0124-24h160a24 24 0 0124 24v176a24 24 0 01-24 24H176a24 24 0 01-24-24zm0 48h208M208 152v32M304 152v32",
|
|
224
|
-
...animatedProps
|
|
225
|
-
}
|
|
226
|
-
));
|
|
227
|
-
const renderVariant = () => {
|
|
228
|
-
switch (variant) {
|
|
229
|
-
case "filled":
|
|
230
|
-
return renderFilled();
|
|
231
|
-
case "duotone":
|
|
232
|
-
return renderDuotone();
|
|
233
|
-
case "round-outlined":
|
|
234
|
-
return renderRoundOutlined();
|
|
235
|
-
case "square-outlined":
|
|
236
|
-
return renderSquareOutlined();
|
|
237
|
-
case "round-filled":
|
|
238
|
-
case "square-filled":
|
|
239
|
-
return renderFilled();
|
|
240
|
-
case "baseline":
|
|
241
|
-
default:
|
|
242
|
-
return renderBaseline();
|
|
243
|
-
}
|
|
244
|
-
};
|
|
245
|
-
return /* @__PURE__ */ React2.createElement(Svg2, { width: size, height: size, viewBox: "0 0 512 512" }, renderVariant());
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
// src/components/icon/icons/checkmark.tsx
|
|
249
|
-
import React3, { useEffect as useEffect3, useMemo as useMemo3, useRef as useRef3 } from "react";
|
|
250
|
-
import { Animated as Animated3 } from "react-native";
|
|
251
|
-
import Svg3, { Path as Path3, Circle as Circle3, Rect as Rect3 } from "react-native-svg";
|
|
252
|
-
var AnimatedPath3 = Animated3.createAnimatedComponent(Path3);
|
|
253
|
-
var CheckmarkIcon = ({
|
|
254
|
-
variant = "baseline",
|
|
255
|
-
size = 24,
|
|
256
|
-
color = "default",
|
|
257
|
-
isAnimated = false
|
|
258
|
-
}) => {
|
|
259
|
-
const theme = useXUITheme();
|
|
260
|
-
const scaleAnim = useRef3(new Animated3.Value(isAnimated ? 0 : 1)).current;
|
|
261
|
-
const opacityAnim = useRef3(new Animated3.Value(isAnimated ? 0 : 1)).current;
|
|
262
|
-
const resolvedColor = useMemo3(() => {
|
|
263
|
-
if (typeof color === "string" && isThemeColor(color)) {
|
|
264
|
-
return theme.colors[color].main;
|
|
265
|
-
}
|
|
266
|
-
return color;
|
|
267
|
-
}, [color, theme]);
|
|
268
|
-
useEffect3(() => {
|
|
269
|
-
if (isAnimated) {
|
|
270
|
-
Animated3.parallel([
|
|
271
|
-
Animated3.spring(scaleAnim, {
|
|
272
|
-
toValue: 1,
|
|
273
|
-
useNativeDriver: true,
|
|
274
|
-
tension: 50,
|
|
275
|
-
friction: 7
|
|
276
|
-
}),
|
|
277
|
-
Animated3.timing(opacityAnim, {
|
|
278
|
-
toValue: 1,
|
|
279
|
-
duration: 200,
|
|
280
|
-
useNativeDriver: true
|
|
281
|
-
})
|
|
282
|
-
]).start();
|
|
283
|
-
}
|
|
284
|
-
}, [isAnimated, scaleAnim, opacityAnim]);
|
|
285
|
-
const animatedProps = isAnimated ? {
|
|
286
|
-
transform: [{ scale: scaleAnim }],
|
|
287
|
-
opacity: opacityAnim
|
|
288
|
-
} : void 0;
|
|
289
|
-
const renderBaseline = () => /* @__PURE__ */ React3.createElement(
|
|
290
|
-
AnimatedPath3,
|
|
291
|
-
{
|
|
292
|
-
fill: "none",
|
|
293
|
-
stroke: resolvedColor,
|
|
294
|
-
strokeLinecap: "round",
|
|
295
|
-
strokeLinejoin: "round",
|
|
296
|
-
strokeWidth: 32,
|
|
297
|
-
d: "M416 128L192 384l-96-96",
|
|
298
|
-
...animatedProps
|
|
299
|
-
}
|
|
300
|
-
);
|
|
301
|
-
const renderFilled = () => /* @__PURE__ */ React3.createElement(
|
|
302
|
-
AnimatedPath3,
|
|
303
|
-
{
|
|
304
|
-
fill: resolvedColor,
|
|
305
|
-
d: "M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192zm-257.9 78.9l-64-64a16 16 0 0 1 22.6-22.6l52.7 52.7 116.7-116.7a16 16 0 0 1 22.6 22.6l-128 128a16 16 0 0 1-22.6 0z",
|
|
306
|
-
...animatedProps
|
|
307
|
-
}
|
|
308
|
-
);
|
|
309
|
-
const renderDuotone = () => /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(
|
|
310
|
-
Path3,
|
|
311
|
-
{
|
|
312
|
-
fill: resolvedColor,
|
|
313
|
-
opacity: 0.3,
|
|
314
|
-
d: "M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48z"
|
|
315
|
-
}
|
|
316
|
-
), /* @__PURE__ */ React3.createElement(
|
|
317
|
-
AnimatedPath3,
|
|
318
|
-
{
|
|
319
|
-
fill: "none",
|
|
320
|
-
stroke: resolvedColor,
|
|
321
|
-
strokeLinecap: "round",
|
|
322
|
-
strokeLinejoin: "round",
|
|
323
|
-
strokeWidth: 32,
|
|
324
|
-
d: "M416 128L192 384l-96-96",
|
|
325
|
-
...animatedProps
|
|
326
|
-
}
|
|
327
|
-
));
|
|
328
|
-
const renderRoundOutlined = () => /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(
|
|
329
|
-
Circle3,
|
|
330
|
-
{
|
|
331
|
-
cx: "256",
|
|
332
|
-
cy: "256",
|
|
333
|
-
r: "192",
|
|
334
|
-
fill: "none",
|
|
335
|
-
stroke: resolvedColor,
|
|
336
|
-
strokeWidth: 32
|
|
337
|
-
}
|
|
338
|
-
), /* @__PURE__ */ React3.createElement(
|
|
339
|
-
AnimatedPath3,
|
|
340
|
-
{
|
|
341
|
-
fill: "none",
|
|
342
|
-
stroke: resolvedColor,
|
|
343
|
-
strokeLinecap: "round",
|
|
344
|
-
strokeLinejoin: "round",
|
|
345
|
-
strokeWidth: 32,
|
|
346
|
-
d: "M416 128L192 384l-96-96",
|
|
347
|
-
...animatedProps
|
|
348
|
-
}
|
|
349
|
-
));
|
|
350
|
-
const renderSquareOutlined = () => /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(
|
|
351
|
-
Rect3,
|
|
352
|
-
{
|
|
353
|
-
x: "64",
|
|
354
|
-
y: "64",
|
|
355
|
-
width: "384",
|
|
356
|
-
height: "384",
|
|
357
|
-
rx: "48",
|
|
358
|
-
fill: "none",
|
|
359
|
-
stroke: resolvedColor,
|
|
360
|
-
strokeWidth: 32
|
|
361
|
-
}
|
|
362
|
-
), /* @__PURE__ */ React3.createElement(
|
|
363
|
-
AnimatedPath3,
|
|
364
|
-
{
|
|
365
|
-
fill: "none",
|
|
366
|
-
stroke: resolvedColor,
|
|
367
|
-
strokeLinecap: "round",
|
|
368
|
-
strokeLinejoin: "round",
|
|
369
|
-
strokeWidth: 32,
|
|
370
|
-
d: "M416 128L192 384l-96-96",
|
|
371
|
-
...animatedProps
|
|
372
|
-
}
|
|
373
|
-
));
|
|
374
|
-
const renderRoundFilled = () => /* @__PURE__ */ React3.createElement(
|
|
375
|
-
AnimatedPath3,
|
|
376
|
-
{
|
|
377
|
-
fill: resolvedColor,
|
|
378
|
-
d: "M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192 192-86 192-192zm-257.9 78.9l-64-64a16 16 0 0 1 22.6-22.6l52.7 52.7 116.7-116.7a16 16 0 0 1 22.6 22.6l-128 128a16 16 0 0 1-22.6 0z",
|
|
379
|
-
...animatedProps
|
|
380
|
-
}
|
|
381
|
-
);
|
|
382
|
-
const renderSquareFilled = () => /* @__PURE__ */ React3.createElement(
|
|
383
|
-
AnimatedPath3,
|
|
384
|
-
{
|
|
385
|
-
fill: resolvedColor,
|
|
386
|
-
d: "M400 64H112a48 48 0 0 0-48 48v288a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V112a48 48 0 0 0-48-48zm-141.45 241.25l-116.36-103a16 16 0 0 1 21.62-23.58l104.18 92.23 145.69-145.69a16 16 0 0 1 22.62 22.62l-156 156a16 16 0 0 1-21.75.42z",
|
|
387
|
-
...animatedProps
|
|
388
|
-
}
|
|
389
|
-
);
|
|
390
|
-
const renderVariant = () => {
|
|
391
|
-
switch (variant) {
|
|
392
|
-
case "filled":
|
|
393
|
-
return renderFilled();
|
|
394
|
-
case "duotone":
|
|
395
|
-
return renderDuotone();
|
|
396
|
-
case "round-outlined":
|
|
397
|
-
return renderRoundOutlined();
|
|
398
|
-
case "square-outlined":
|
|
399
|
-
return renderSquareOutlined();
|
|
400
|
-
case "round-filled":
|
|
401
|
-
return renderRoundFilled();
|
|
402
|
-
case "square-filled":
|
|
403
|
-
return renderSquareFilled();
|
|
404
|
-
case "baseline":
|
|
405
|
-
default:
|
|
406
|
-
return renderBaseline();
|
|
407
|
-
}
|
|
408
|
-
};
|
|
409
|
-
return /* @__PURE__ */ React3.createElement(Svg3, { width: size, height: size, viewBox: "0 0 512 512" }, renderVariant());
|
|
410
|
-
};
|
|
411
|
-
|
|
412
|
-
// src/components/icon/icons/chevron-down.tsx
|
|
413
|
-
import React4, { useEffect as useEffect4, useMemo as useMemo4, useRef as useRef4 } from "react";
|
|
414
|
-
import { Animated as Animated4 } from "react-native";
|
|
415
|
-
import Svg4, { Path as Path4, Circle as Circle4, Rect as Rect4 } from "react-native-svg";
|
|
416
|
-
var AnimatedPath4 = Animated4.createAnimatedComponent(Path4);
|
|
417
|
-
var ChevronDownIcon = ({
|
|
418
|
-
variant = "baseline",
|
|
419
|
-
size = 24,
|
|
420
|
-
color = "default",
|
|
421
|
-
isAnimated = false
|
|
422
|
-
}) => {
|
|
423
|
-
const theme = useXUITheme();
|
|
424
|
-
const scaleAnim = useRef4(new Animated4.Value(isAnimated ? 0 : 1)).current;
|
|
425
|
-
const opacityAnim = useRef4(new Animated4.Value(isAnimated ? 0 : 1)).current;
|
|
426
|
-
const resolvedColor = useMemo4(() => {
|
|
427
|
-
if (typeof color === "string" && isThemeColor(color)) {
|
|
428
|
-
return theme.colors[color].main;
|
|
429
|
-
}
|
|
430
|
-
return color;
|
|
431
|
-
}, [color, theme]);
|
|
432
|
-
useEffect4(() => {
|
|
433
|
-
if (isAnimated) {
|
|
434
|
-
Animated4.parallel([
|
|
435
|
-
Animated4.spring(scaleAnim, {
|
|
436
|
-
toValue: 1,
|
|
437
|
-
useNativeDriver: true,
|
|
438
|
-
tension: 50,
|
|
439
|
-
friction: 7
|
|
440
|
-
}),
|
|
441
|
-
Animated4.timing(opacityAnim, {
|
|
442
|
-
toValue: 1,
|
|
443
|
-
duration: 200,
|
|
444
|
-
useNativeDriver: true
|
|
445
|
-
})
|
|
446
|
-
]).start();
|
|
447
|
-
}
|
|
448
|
-
}, [isAnimated, scaleAnim, opacityAnim]);
|
|
449
|
-
const animatedProps = isAnimated ? {
|
|
450
|
-
transform: [{ scale: scaleAnim }],
|
|
451
|
-
opacity: opacityAnim
|
|
452
|
-
} : void 0;
|
|
453
|
-
const renderBaseline = () => /* @__PURE__ */ React4.createElement(
|
|
454
|
-
AnimatedPath4,
|
|
455
|
-
{
|
|
456
|
-
fill: "none",
|
|
457
|
-
stroke: resolvedColor,
|
|
458
|
-
strokeLinecap: "round",
|
|
459
|
-
strokeLinejoin: "round",
|
|
460
|
-
strokeWidth: 48,
|
|
461
|
-
d: "M112 184l144 144 144-144",
|
|
462
|
-
...animatedProps
|
|
463
|
-
}
|
|
464
|
-
);
|
|
465
|
-
const renderFilled = () => /* @__PURE__ */ React4.createElement(
|
|
466
|
-
AnimatedPath4,
|
|
467
|
-
{
|
|
468
|
-
fill: resolvedColor,
|
|
469
|
-
d: "M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z",
|
|
470
|
-
...animatedProps
|
|
471
|
-
}
|
|
472
|
-
);
|
|
473
|
-
const renderDuotone = () => /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(
|
|
474
|
-
Path4,
|
|
475
|
-
{
|
|
476
|
-
fill: resolvedColor,
|
|
477
|
-
opacity: 0.3,
|
|
478
|
-
d: "M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48z"
|
|
479
|
-
}
|
|
480
|
-
), /* @__PURE__ */ React4.createElement(
|
|
481
|
-
AnimatedPath4,
|
|
482
|
-
{
|
|
483
|
-
fill: "none",
|
|
484
|
-
stroke: resolvedColor,
|
|
485
|
-
strokeLinecap: "round",
|
|
486
|
-
strokeLinejoin: "round",
|
|
487
|
-
strokeWidth: 48,
|
|
488
|
-
d: "M112 184l144 144 144-144",
|
|
489
|
-
...animatedProps
|
|
490
|
-
}
|
|
491
|
-
));
|
|
492
|
-
const renderRoundOutlined = () => /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(
|
|
493
|
-
Circle4,
|
|
494
|
-
{
|
|
495
|
-
cx: "256",
|
|
496
|
-
cy: "256",
|
|
497
|
-
r: "192",
|
|
498
|
-
fill: "none",
|
|
499
|
-
stroke: resolvedColor,
|
|
500
|
-
strokeWidth: 32
|
|
501
|
-
}
|
|
502
|
-
), /* @__PURE__ */ React4.createElement(
|
|
503
|
-
AnimatedPath4,
|
|
504
|
-
{
|
|
505
|
-
fill: "none",
|
|
506
|
-
stroke: resolvedColor,
|
|
507
|
-
strokeLinecap: "round",
|
|
508
|
-
strokeLinejoin: "round",
|
|
509
|
-
strokeWidth: 48,
|
|
510
|
-
d: "M112 184l144 144 144-144",
|
|
511
|
-
...animatedProps
|
|
512
|
-
}
|
|
513
|
-
));
|
|
514
|
-
const renderSquareOutlined = () => /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(
|
|
515
|
-
Rect4,
|
|
516
|
-
{
|
|
517
|
-
x: "64",
|
|
518
|
-
y: "64",
|
|
519
|
-
width: "384",
|
|
520
|
-
height: "384",
|
|
521
|
-
rx: "48",
|
|
522
|
-
fill: "none",
|
|
523
|
-
stroke: resolvedColor,
|
|
524
|
-
strokeWidth: 32
|
|
525
|
-
}
|
|
526
|
-
), /* @__PURE__ */ React4.createElement(
|
|
527
|
-
AnimatedPath4,
|
|
528
|
-
{
|
|
529
|
-
fill: "none",
|
|
530
|
-
stroke: resolvedColor,
|
|
531
|
-
strokeLinecap: "round",
|
|
532
|
-
strokeLinejoin: "round",
|
|
533
|
-
strokeWidth: 48,
|
|
534
|
-
d: "M112 184l144 144 144-144",
|
|
535
|
-
...animatedProps
|
|
536
|
-
}
|
|
537
|
-
));
|
|
538
|
-
const renderRoundFilled = () => /* @__PURE__ */ React4.createElement(
|
|
539
|
-
AnimatedPath4,
|
|
540
|
-
{
|
|
541
|
-
fill: resolvedColor,
|
|
542
|
-
d: "M464 256c0-114.87-93.13-208-208-208S48 141.13 48 256s93.13 208 208 208 208-93.13 208-208zm-100.69-28.69l-96 96a16 16 0 0 1-22.62 0l-96-96a16 16 0 0 1 22.62-22.62L256 289.37l84.69-84.68a16 16 0 0 1 22.62 22.62z",
|
|
543
|
-
...animatedProps
|
|
544
|
-
}
|
|
545
|
-
);
|
|
546
|
-
const renderSquareFilled = () => /* @__PURE__ */ React4.createElement(
|
|
547
|
-
AnimatedPath4,
|
|
548
|
-
{
|
|
549
|
-
fill: resolvedColor,
|
|
550
|
-
d: "M400 64H112a48 48 0 0 0-48 48v288a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V112a48 48 0 0 0-48-48zm-36.69 163.31l-96 96a16 16 0 0 1-22.62 0l-96-96a16 16 0 0 1 22.62-22.62L256 289.37l84.69-84.68a16 16 0 0 1 22.62 22.62z",
|
|
551
|
-
...animatedProps
|
|
552
|
-
}
|
|
553
|
-
);
|
|
554
|
-
const renderVariant = () => {
|
|
555
|
-
switch (variant) {
|
|
556
|
-
case "filled":
|
|
557
|
-
return renderFilled();
|
|
558
|
-
case "duotone":
|
|
559
|
-
return renderDuotone();
|
|
560
|
-
case "round-outlined":
|
|
561
|
-
return renderRoundOutlined();
|
|
562
|
-
case "square-outlined":
|
|
563
|
-
return renderSquareOutlined();
|
|
564
|
-
case "round-filled":
|
|
565
|
-
return renderRoundFilled();
|
|
566
|
-
case "square-filled":
|
|
567
|
-
return renderSquareFilled();
|
|
568
|
-
case "baseline":
|
|
569
|
-
default:
|
|
570
|
-
return renderBaseline();
|
|
571
|
-
}
|
|
572
|
-
};
|
|
573
|
-
return /* @__PURE__ */ React4.createElement(Svg4, { width: size, height: size, viewBox: "0 0 512 512" }, renderVariant());
|
|
574
|
-
};
|
|
575
|
-
|
|
576
|
-
// src/components/icon/icons/chevron-left.tsx
|
|
577
|
-
import React5, { useEffect as useEffect5, useMemo as useMemo5, useRef as useRef5 } from "react";
|
|
578
|
-
import { Animated as Animated5 } from "react-native";
|
|
579
|
-
import Svg5, { Circle as Circle5, Path as Path5, Rect as Rect5 } from "react-native-svg";
|
|
580
|
-
var AnimatedPath5 = Animated5.createAnimatedComponent(Path5);
|
|
581
|
-
var ChevronLeftIcon = ({
|
|
582
|
-
variant = "baseline",
|
|
583
|
-
size = 24,
|
|
584
|
-
color = "default",
|
|
585
|
-
isAnimated = false
|
|
586
|
-
}) => {
|
|
587
|
-
const theme = useXUITheme();
|
|
588
|
-
const scaleAnim = useRef5(new Animated5.Value(isAnimated ? 0 : 1)).current;
|
|
589
|
-
const opacityAnim = useRef5(new Animated5.Value(isAnimated ? 0 : 1)).current;
|
|
590
|
-
const resolvedColor = useMemo5(() => {
|
|
591
|
-
if (typeof color === "string" && isThemeColor(color)) {
|
|
592
|
-
return theme.colors[color].main;
|
|
593
|
-
}
|
|
594
|
-
return color;
|
|
595
|
-
}, [color, theme]);
|
|
596
|
-
useEffect5(() => {
|
|
597
|
-
if (isAnimated) {
|
|
598
|
-
Animated5.parallel([
|
|
599
|
-
Animated5.spring(scaleAnim, {
|
|
600
|
-
toValue: 1,
|
|
601
|
-
useNativeDriver: true,
|
|
602
|
-
tension: 50,
|
|
603
|
-
friction: 7
|
|
604
|
-
}),
|
|
605
|
-
Animated5.timing(opacityAnim, {
|
|
606
|
-
toValue: 1,
|
|
607
|
-
duration: 200,
|
|
608
|
-
useNativeDriver: true
|
|
609
|
-
})
|
|
610
|
-
]).start();
|
|
611
|
-
}
|
|
612
|
-
}, [isAnimated, scaleAnim, opacityAnim]);
|
|
613
|
-
const animatedProps = isAnimated ? {
|
|
614
|
-
transform: [{ scale: scaleAnim }],
|
|
615
|
-
opacity: opacityAnim
|
|
616
|
-
} : void 0;
|
|
617
|
-
const renderBaseline = () => /* @__PURE__ */ React5.createElement(
|
|
618
|
-
AnimatedPath5,
|
|
619
|
-
{
|
|
620
|
-
fill: "none",
|
|
621
|
-
stroke: resolvedColor,
|
|
622
|
-
strokeLinecap: "round",
|
|
623
|
-
strokeLinejoin: "round",
|
|
624
|
-
strokeWidth: 48,
|
|
625
|
-
d: "M328 112L184 256l144 144",
|
|
626
|
-
...animatedProps
|
|
627
|
-
}
|
|
628
|
-
);
|
|
629
|
-
const renderFilled = () => /* @__PURE__ */ React5.createElement(
|
|
630
|
-
AnimatedPath5,
|
|
631
|
-
{
|
|
632
|
-
fill: resolvedColor,
|
|
633
|
-
d: "M256 217.9L383 345c9.4 9.4 24.6 9.4 33.9 0s9.3-24.6 0-34L273 167c-9.1-9.1-23.7-9.3-33.1-.7L95 310.9c-4.7 4.7-7 10.9-7 17s2.3 12.3 7 17c9.4 9.4 24.6 9.4 33.9 0l127.1-127z",
|
|
634
|
-
rotation: 90,
|
|
635
|
-
origin: "256, 256",
|
|
636
|
-
...animatedProps
|
|
637
|
-
}
|
|
638
|
-
);
|
|
639
|
-
const renderDuotone = () => /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
|
|
640
|
-
Path5,
|
|
641
|
-
{
|
|
642
|
-
fill: resolvedColor,
|
|
643
|
-
opacity: 0.3,
|
|
644
|
-
d: "M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48z"
|
|
645
|
-
}
|
|
646
|
-
), renderBaseline());
|
|
647
|
-
const renderRoundOutlined = () => /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
|
|
648
|
-
Circle5,
|
|
649
|
-
{
|
|
650
|
-
cx: "256",
|
|
651
|
-
cy: "256",
|
|
652
|
-
r: "192",
|
|
653
|
-
fill: "none",
|
|
654
|
-
stroke: resolvedColor,
|
|
655
|
-
strokeWidth: 32
|
|
656
|
-
}
|
|
657
|
-
), renderBaseline());
|
|
658
|
-
const renderSquareOutlined = () => /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
|
|
659
|
-
Rect5,
|
|
660
|
-
{
|
|
661
|
-
x: "64",
|
|
662
|
-
y: "64",
|
|
663
|
-
width: "384",
|
|
664
|
-
height: "384",
|
|
665
|
-
rx: "48",
|
|
666
|
-
fill: "none",
|
|
667
|
-
stroke: resolvedColor,
|
|
668
|
-
strokeWidth: 32
|
|
669
|
-
}
|
|
670
|
-
), renderBaseline());
|
|
671
|
-
const renderVariant = () => {
|
|
672
|
-
switch (variant) {
|
|
673
|
-
case "filled":
|
|
674
|
-
return renderFilled();
|
|
675
|
-
case "duotone":
|
|
676
|
-
return renderDuotone();
|
|
677
|
-
case "round-outlined":
|
|
678
|
-
return renderRoundOutlined();
|
|
679
|
-
case "square-outlined":
|
|
680
|
-
return renderSquareOutlined();
|
|
681
|
-
case "round-filled":
|
|
682
|
-
case "square-filled":
|
|
683
|
-
return renderFilled();
|
|
684
|
-
case "baseline":
|
|
685
|
-
default:
|
|
686
|
-
return renderBaseline();
|
|
687
|
-
}
|
|
688
|
-
};
|
|
689
|
-
return /* @__PURE__ */ React5.createElement(Svg5, { width: size, height: size, viewBox: "0 0 512 512" }, renderVariant());
|
|
690
|
-
};
|
|
691
|
-
|
|
692
|
-
// src/components/icon/icons/chevron-right.tsx
|
|
693
|
-
import React6, { useEffect as useEffect6, useMemo as useMemo6, useRef as useRef6 } from "react";
|
|
694
|
-
import { Animated as Animated6 } from "react-native";
|
|
695
|
-
import Svg6, { Circle as Circle6, Path as Path6, Rect as Rect6 } from "react-native-svg";
|
|
696
|
-
var AnimatedPath6 = Animated6.createAnimatedComponent(Path6);
|
|
697
|
-
var ChevronRightIcon = ({
|
|
698
|
-
variant = "baseline",
|
|
699
|
-
size = 24,
|
|
700
|
-
color = "default",
|
|
701
|
-
isAnimated = false
|
|
702
|
-
}) => {
|
|
703
|
-
const theme = useXUITheme();
|
|
704
|
-
const scaleAnim = useRef6(new Animated6.Value(isAnimated ? 0 : 1)).current;
|
|
705
|
-
const opacityAnim = useRef6(new Animated6.Value(isAnimated ? 0 : 1)).current;
|
|
706
|
-
const resolvedColor = useMemo6(() => {
|
|
707
|
-
if (typeof color === "string" && isThemeColor(color)) {
|
|
708
|
-
return theme.colors[color].main;
|
|
709
|
-
}
|
|
710
|
-
return color;
|
|
711
|
-
}, [color, theme]);
|
|
712
|
-
useEffect6(() => {
|
|
713
|
-
if (isAnimated) {
|
|
714
|
-
Animated6.parallel([
|
|
715
|
-
Animated6.spring(scaleAnim, {
|
|
716
|
-
toValue: 1,
|
|
717
|
-
useNativeDriver: true,
|
|
718
|
-
tension: 50,
|
|
719
|
-
friction: 7
|
|
720
|
-
}),
|
|
721
|
-
Animated6.timing(opacityAnim, {
|
|
722
|
-
toValue: 1,
|
|
723
|
-
duration: 200,
|
|
724
|
-
useNativeDriver: true
|
|
725
|
-
})
|
|
726
|
-
]).start();
|
|
727
|
-
}
|
|
728
|
-
}, [isAnimated, scaleAnim, opacityAnim]);
|
|
729
|
-
const animatedProps = isAnimated ? {
|
|
730
|
-
transform: [{ scale: scaleAnim }],
|
|
731
|
-
opacity: opacityAnim
|
|
732
|
-
} : void 0;
|
|
733
|
-
const renderBaseline = () => /* @__PURE__ */ React6.createElement(
|
|
734
|
-
AnimatedPath6,
|
|
735
|
-
{
|
|
736
|
-
fill: "none",
|
|
737
|
-
stroke: resolvedColor,
|
|
738
|
-
strokeLinecap: "round",
|
|
739
|
-
strokeLinejoin: "round",
|
|
740
|
-
strokeWidth: 48,
|
|
741
|
-
d: "M184 112l144 144-144 144",
|
|
742
|
-
...animatedProps
|
|
743
|
-
}
|
|
744
|
-
);
|
|
745
|
-
const renderFilled = () => /* @__PURE__ */ React6.createElement(
|
|
746
|
-
AnimatedPath6,
|
|
747
|
-
{
|
|
748
|
-
fill: resolvedColor,
|
|
749
|
-
d: "M256 294.1L383 167c9.4-9.4 24.6-9.4 33.9 0s9.3 24.6 0 34L273 345c-9.1 9.1-23.7 9.3-33.1.7L95 201.1c-4.7-4.7-7-10.9-7-17s2.3-12.3 7-17c9.4-9.4 24.6-9.4 33.9 0l127.1 127z",
|
|
750
|
-
rotation: -90,
|
|
751
|
-
origin: "256, 256",
|
|
752
|
-
...animatedProps
|
|
753
|
-
}
|
|
754
|
-
);
|
|
755
|
-
const renderDuotone = () => /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(
|
|
756
|
-
Path6,
|
|
757
|
-
{
|
|
758
|
-
fill: resolvedColor,
|
|
759
|
-
opacity: 0.3,
|
|
760
|
-
d: "M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48z"
|
|
761
|
-
}
|
|
762
|
-
), renderBaseline());
|
|
763
|
-
const renderRoundOutlined = () => /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(
|
|
764
|
-
Circle6,
|
|
765
|
-
{
|
|
766
|
-
cx: "256",
|
|
767
|
-
cy: "256",
|
|
768
|
-
r: "192",
|
|
769
|
-
fill: "none",
|
|
770
|
-
stroke: resolvedColor,
|
|
771
|
-
strokeWidth: 32
|
|
772
|
-
}
|
|
773
|
-
), renderBaseline());
|
|
774
|
-
const renderSquareOutlined = () => /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(
|
|
775
|
-
Rect6,
|
|
776
|
-
{
|
|
777
|
-
x: "64",
|
|
778
|
-
y: "64",
|
|
779
|
-
width: "384",
|
|
780
|
-
height: "384",
|
|
781
|
-
rx: "48",
|
|
782
|
-
fill: "none",
|
|
783
|
-
stroke: resolvedColor,
|
|
784
|
-
strokeWidth: 32
|
|
785
|
-
}
|
|
786
|
-
), renderBaseline());
|
|
787
|
-
const renderVariant = () => {
|
|
788
|
-
switch (variant) {
|
|
789
|
-
case "filled":
|
|
790
|
-
return renderFilled();
|
|
791
|
-
case "duotone":
|
|
792
|
-
return renderDuotone();
|
|
793
|
-
case "round-outlined":
|
|
794
|
-
return renderRoundOutlined();
|
|
795
|
-
case "square-outlined":
|
|
796
|
-
return renderSquareOutlined();
|
|
797
|
-
case "round-filled":
|
|
798
|
-
case "square-filled":
|
|
799
|
-
return renderFilled();
|
|
800
|
-
case "baseline":
|
|
801
|
-
default:
|
|
802
|
-
return renderBaseline();
|
|
803
|
-
}
|
|
804
|
-
};
|
|
805
|
-
return /* @__PURE__ */ React6.createElement(Svg6, { width: size, height: size, viewBox: "0 0 512 512" }, renderVariant());
|
|
806
|
-
};
|
|
807
|
-
|
|
808
|
-
export {
|
|
809
|
-
ArrowBackIcon,
|
|
810
|
-
CalendarIcon,
|
|
811
|
-
CheckmarkIcon,
|
|
812
|
-
ChevronDownIcon,
|
|
813
|
-
ChevronLeftIcon,
|
|
814
|
-
ChevronRightIcon
|
|
815
|
-
};
|