@xaui/native 0.0.16 → 0.0.17
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/accordion/index.cjs +1 -1
- package/dist/accordion/index.js +5 -4
- package/dist/alert/index.js +3 -2
- package/dist/autocomplete/index.cjs +5 -11
- package/dist/autocomplete/index.js +3 -2
- package/dist/avatar/index.js +3 -2
- package/dist/badge/index.js +3 -2
- package/dist/bottom-sheet/index.cjs +9 -20
- package/dist/bottom-sheet/index.js +3 -2
- package/dist/button/index.js +3 -2
- package/dist/carousel/index.cjs +458 -0
- package/dist/carousel/index.d.cts +147 -0
- package/dist/carousel/index.d.ts +147 -0
- package/dist/carousel/index.js +7 -0
- package/dist/checkbox/index.js +2 -1
- package/dist/chip/index.cjs +2 -8
- package/dist/chip/index.js +3 -2
- package/dist/{chunk-QLEQYKG5.js → chunk-6PXMB5CH.js} +3 -9
- package/dist/{chunk-EI5OMBFE.js → chunk-DBKVHMSA.js} +6 -15
- package/dist/chunk-DXXNBF5P.js +7 -0
- package/dist/chunk-EW5YLICE.js +382 -0
- package/dist/{chunk-7OFTYKK4.js → chunk-JJOVGRNI.js} +1 -1
- package/dist/{chunk-4LFRYVSR.js → chunk-K2HSVISE.js} +1 -1
- package/dist/{chunk-NBRASCX4.js → chunk-MZL77KV5.js} +5 -12
- package/dist/{chunk-2T6FKPJW.js → chunk-OXVIVNIJ.js} +1 -1
- package/dist/{chunk-ZYTBRHLJ.js → chunk-PWCUULAL.js} +1 -1
- package/dist/{chunk-GNJIET26.js → chunk-RIVFFZRO.js} +1 -1
- package/dist/{chunk-GAOI4KIV.js → chunk-S3MGBM3G.js} +10 -21
- package/dist/chunk-STUNTRKJ.js +405 -0
- package/dist/{chunk-II4QINLG.js → chunk-TJ2FPLLZ.js} +2 -2
- package/dist/{chunk-XJKA22BK.js → chunk-UGDGCMGC.js} +1 -1
- package/dist/{chunk-MKHBEJLO.js → chunk-VUVE6PK7.js} +1 -1
- package/dist/{chunk-NMZUPH3R.js → chunk-XUYIAA3A.js} +3 -9
- package/dist/core/index.js +5 -3
- package/dist/datepicker/index.js +3 -2
- package/dist/divider/index.js +3 -2
- package/dist/fab/index.js +4 -3
- package/dist/fab-menu/index.cjs +4 -13
- package/dist/fab-menu/index.js +5 -4
- package/dist/index.cjs +994 -257
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +24 -13
- package/dist/indicator/index.js +3 -2
- package/dist/menu/index.cjs +8 -7
- package/dist/menu/index.js +15 -9
- package/dist/progress/index.js +2 -1
- package/dist/segment-button/index.cjs +492 -0
- package/dist/segment-button/index.d.cts +141 -0
- package/dist/segment-button/index.d.ts +141 -0
- package/dist/segment-button/index.js +10 -0
- package/dist/select/index.js +2 -1
- package/dist/switch/index.js +2 -1
- package/dist/typography/index.js +3 -2
- package/dist/view/index.cjs +153 -78
- package/dist/view/index.d.cts +77 -1
- package/dist/view/index.d.ts +77 -1
- package/dist/view/index.js +125 -52
- package/package.json +11 -1
package/dist/index.d.cts
CHANGED
|
@@ -6,6 +6,8 @@ export { Alert } from './alert/index.cjs';
|
|
|
6
6
|
export { Autocomplete, AutocompleteItem } from './autocomplete/index.cjs';
|
|
7
7
|
export { DatePicker } from './datepicker/index.cjs';
|
|
8
8
|
export { Typography } from './typography/index.cjs';
|
|
9
|
+
export { Carousel } from './carousel/index.cjs';
|
|
10
|
+
export { SegmentButton, SegmentButtonItem } from './segment-button/index.cjs';
|
|
9
11
|
export { Chip, ChipGroup, ChipItem } from './chip/index.cjs';
|
|
10
12
|
export { BottomSheet } from './bottom-sheet/index.cjs';
|
|
11
13
|
export { Fab } from './fab/index.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export { Alert } from './alert/index.js';
|
|
|
6
6
|
export { Autocomplete, AutocompleteItem } from './autocomplete/index.js';
|
|
7
7
|
export { DatePicker } from './datepicker/index.js';
|
|
8
8
|
export { Typography } from './typography/index.js';
|
|
9
|
+
export { Carousel } from './carousel/index.js';
|
|
10
|
+
export { SegmentButton, SegmentButtonItem } from './segment-button/index.js';
|
|
9
11
|
export { Chip, ChipGroup, ChipItem } from './chip/index.js';
|
|
10
12
|
export { BottomSheet } from './bottom-sheet/index.js';
|
|
11
13
|
export { Fab } from './fab/index.js';
|
package/dist/index.js
CHANGED
|
@@ -2,45 +2,53 @@ import {
|
|
|
2
2
|
Chip,
|
|
3
3
|
ChipGroup,
|
|
4
4
|
ChipItem
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6PXMB5CH.js";
|
|
6
6
|
import {
|
|
7
7
|
BottomSheet
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-S3MGBM3G.js";
|
|
9
9
|
import {
|
|
10
10
|
FabMenu,
|
|
11
11
|
FabMenuItem
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DBKVHMSA.js";
|
|
13
13
|
import {
|
|
14
14
|
Fab
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TJ2FPLLZ.js";
|
|
16
|
+
import {
|
|
17
|
+
SegmentButton,
|
|
18
|
+
SegmentButtonItem
|
|
19
|
+
} from "./chunk-STUNTRKJ.js";
|
|
20
|
+
import {
|
|
21
|
+
Carousel
|
|
22
|
+
} from "./chunk-EW5YLICE.js";
|
|
16
23
|
import {
|
|
17
24
|
Avatar,
|
|
18
25
|
AvatarGroup
|
|
19
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-K2HSVISE.js";
|
|
20
27
|
import {
|
|
21
28
|
Badge
|
|
22
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-UGDGCMGC.js";
|
|
23
30
|
import {
|
|
24
31
|
Alert
|
|
25
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-OXVIVNIJ.js";
|
|
26
33
|
import {
|
|
27
34
|
Autocomplete,
|
|
28
35
|
AutocompleteItem
|
|
29
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-XUYIAA3A.js";
|
|
30
37
|
import "./chunk-GBHQCAKW.js";
|
|
31
38
|
import {
|
|
32
39
|
DatePicker
|
|
33
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-JJOVGRNI.js";
|
|
34
41
|
import {
|
|
35
42
|
Typography
|
|
36
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-PWCUULAL.js";
|
|
37
44
|
import {
|
|
38
45
|
Divider
|
|
39
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-RIVFFZRO.js";
|
|
40
47
|
import {
|
|
41
48
|
ActivityIndicator
|
|
42
|
-
} from "./chunk-
|
|
43
|
-
import "./chunk-
|
|
49
|
+
} from "./chunk-VUVE6PK7.js";
|
|
50
|
+
import "./chunk-DXXNBF5P.js";
|
|
51
|
+
import "./chunk-MZL77KV5.js";
|
|
44
52
|
export {
|
|
45
53
|
ActivityIndicator,
|
|
46
54
|
Alert,
|
|
@@ -50,6 +58,7 @@ export {
|
|
|
50
58
|
AvatarGroup,
|
|
51
59
|
Badge,
|
|
52
60
|
BottomSheet,
|
|
61
|
+
Carousel,
|
|
53
62
|
Chip,
|
|
54
63
|
ChipGroup,
|
|
55
64
|
ChipItem,
|
|
@@ -58,5 +67,7 @@ export {
|
|
|
58
67
|
Fab,
|
|
59
68
|
FabMenu,
|
|
60
69
|
FabMenuItem,
|
|
70
|
+
SegmentButton,
|
|
71
|
+
SegmentButtonItem,
|
|
61
72
|
Typography
|
|
62
73
|
};
|
package/dist/indicator/index.js
CHANGED
package/dist/menu/index.cjs
CHANGED
|
@@ -104,7 +104,9 @@ var import_react6 = require("react");
|
|
|
104
104
|
var import_react_native5 = require("react-native");
|
|
105
105
|
var useMenuTriggerMeasurements = (visible) => {
|
|
106
106
|
const triggerRef = (0, import_react6.useRef)(null);
|
|
107
|
-
const [triggerPosition, setTriggerPosition] = (0, import_react6.useState)(
|
|
107
|
+
const [triggerPosition, setTriggerPosition] = (0, import_react6.useState)(
|
|
108
|
+
null
|
|
109
|
+
);
|
|
108
110
|
(0, import_react6.useEffect)(() => {
|
|
109
111
|
if (!visible) {
|
|
110
112
|
setTriggerPosition(null);
|
|
@@ -181,7 +183,10 @@ var useMenuPosition = (triggerPosition, contentSize, position) => {
|
|
|
181
183
|
if (left < MENU_SCREEN_INDENT) {
|
|
182
184
|
left = MENU_SCREEN_INDENT;
|
|
183
185
|
}
|
|
184
|
-
const maxTop = Math.max(
|
|
186
|
+
const maxTop = Math.max(
|
|
187
|
+
MENU_SCREEN_INDENT,
|
|
188
|
+
screenHeight - MENU_SCREEN_INDENT - contentSize.height
|
|
189
|
+
);
|
|
185
190
|
const clampedTop = Math.min(maxTop, Math.max(MENU_SCREEN_INDENT, top));
|
|
186
191
|
return { top: clampedTop, left };
|
|
187
192
|
}, [triggerPosition, contentSize, position]);
|
|
@@ -331,11 +336,7 @@ var MenuItem = ({
|
|
|
331
336
|
return /* @__PURE__ */ import_react8.default.createElement(
|
|
332
337
|
import_react_native8.Text,
|
|
333
338
|
{
|
|
334
|
-
style: [
|
|
335
|
-
styles2.titleText,
|
|
336
|
-
{ color: titleColor },
|
|
337
|
-
customAppearance?.title
|
|
338
|
-
],
|
|
339
|
+
style: [styles2.titleText, { color: titleColor }, customAppearance?.title],
|
|
339
340
|
numberOfLines: 1
|
|
340
341
|
},
|
|
341
342
|
title
|
package/dist/menu/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import "../chunk-DXXNBF5P.js";
|
|
1
2
|
import {
|
|
2
3
|
useXUITheme
|
|
3
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-MZL77KV5.js";
|
|
4
5
|
|
|
5
6
|
// src/components/menu/menu.tsx
|
|
6
7
|
import React from "react";
|
|
@@ -29,10 +30,16 @@ var MENU_TRIGGER_GAP = MENU_GAP;
|
|
|
29
30
|
|
|
30
31
|
// src/components/menu/menu.hook.ts
|
|
31
32
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
32
|
-
import {
|
|
33
|
+
import {
|
|
34
|
+
Animated,
|
|
35
|
+
Dimensions,
|
|
36
|
+
Easing
|
|
37
|
+
} from "react-native";
|
|
33
38
|
var useMenuTriggerMeasurements = (visible) => {
|
|
34
39
|
const triggerRef = useRef(null);
|
|
35
|
-
const [triggerPosition, setTriggerPosition] = useState(
|
|
40
|
+
const [triggerPosition, setTriggerPosition] = useState(
|
|
41
|
+
null
|
|
42
|
+
);
|
|
36
43
|
useEffect(() => {
|
|
37
44
|
if (!visible) {
|
|
38
45
|
setTriggerPosition(null);
|
|
@@ -109,7 +116,10 @@ var useMenuPosition = (triggerPosition, contentSize, position) => {
|
|
|
109
116
|
if (left < MENU_SCREEN_INDENT) {
|
|
110
117
|
left = MENU_SCREEN_INDENT;
|
|
111
118
|
}
|
|
112
|
-
const maxTop = Math.max(
|
|
119
|
+
const maxTop = Math.max(
|
|
120
|
+
MENU_SCREEN_INDENT,
|
|
121
|
+
screenHeight - MENU_SCREEN_INDENT - contentSize.height
|
|
122
|
+
);
|
|
113
123
|
const clampedTop = Math.min(maxTop, Math.max(MENU_SCREEN_INDENT, top));
|
|
114
124
|
return { top: clampedTop, left };
|
|
115
125
|
}, [triggerPosition, contentSize, position]);
|
|
@@ -259,11 +269,7 @@ var MenuItem = ({
|
|
|
259
269
|
return /* @__PURE__ */ React2.createElement(
|
|
260
270
|
Text,
|
|
261
271
|
{
|
|
262
|
-
style: [
|
|
263
|
-
styles2.titleText,
|
|
264
|
-
{ color: titleColor },
|
|
265
|
-
customAppearance?.title
|
|
266
|
-
],
|
|
272
|
+
style: [styles2.titleText, { color: titleColor }, customAppearance?.title],
|
|
267
273
|
numberOfLines: 1
|
|
268
274
|
},
|
|
269
275
|
title
|