@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.
Files changed (59) hide show
  1. package/dist/accordion/index.cjs +1 -1
  2. package/dist/accordion/index.js +5 -4
  3. package/dist/alert/index.js +3 -2
  4. package/dist/autocomplete/index.cjs +5 -11
  5. package/dist/autocomplete/index.js +3 -2
  6. package/dist/avatar/index.js +3 -2
  7. package/dist/badge/index.js +3 -2
  8. package/dist/bottom-sheet/index.cjs +9 -20
  9. package/dist/bottom-sheet/index.js +3 -2
  10. package/dist/button/index.js +3 -2
  11. package/dist/carousel/index.cjs +458 -0
  12. package/dist/carousel/index.d.cts +147 -0
  13. package/dist/carousel/index.d.ts +147 -0
  14. package/dist/carousel/index.js +7 -0
  15. package/dist/checkbox/index.js +2 -1
  16. package/dist/chip/index.cjs +2 -8
  17. package/dist/chip/index.js +3 -2
  18. package/dist/{chunk-QLEQYKG5.js → chunk-6PXMB5CH.js} +3 -9
  19. package/dist/{chunk-EI5OMBFE.js → chunk-DBKVHMSA.js} +6 -15
  20. package/dist/chunk-DXXNBF5P.js +7 -0
  21. package/dist/chunk-EW5YLICE.js +382 -0
  22. package/dist/{chunk-7OFTYKK4.js → chunk-JJOVGRNI.js} +1 -1
  23. package/dist/{chunk-4LFRYVSR.js → chunk-K2HSVISE.js} +1 -1
  24. package/dist/{chunk-NBRASCX4.js → chunk-MZL77KV5.js} +5 -12
  25. package/dist/{chunk-2T6FKPJW.js → chunk-OXVIVNIJ.js} +1 -1
  26. package/dist/{chunk-ZYTBRHLJ.js → chunk-PWCUULAL.js} +1 -1
  27. package/dist/{chunk-GNJIET26.js → chunk-RIVFFZRO.js} +1 -1
  28. package/dist/{chunk-GAOI4KIV.js → chunk-S3MGBM3G.js} +10 -21
  29. package/dist/chunk-STUNTRKJ.js +405 -0
  30. package/dist/{chunk-II4QINLG.js → chunk-TJ2FPLLZ.js} +2 -2
  31. package/dist/{chunk-XJKA22BK.js → chunk-UGDGCMGC.js} +1 -1
  32. package/dist/{chunk-MKHBEJLO.js → chunk-VUVE6PK7.js} +1 -1
  33. package/dist/{chunk-NMZUPH3R.js → chunk-XUYIAA3A.js} +3 -9
  34. package/dist/core/index.js +5 -3
  35. package/dist/datepicker/index.js +3 -2
  36. package/dist/divider/index.js +3 -2
  37. package/dist/fab/index.js +4 -3
  38. package/dist/fab-menu/index.cjs +4 -13
  39. package/dist/fab-menu/index.js +5 -4
  40. package/dist/index.cjs +994 -257
  41. package/dist/index.d.cts +2 -0
  42. package/dist/index.d.ts +2 -0
  43. package/dist/index.js +24 -13
  44. package/dist/indicator/index.js +3 -2
  45. package/dist/menu/index.cjs +8 -7
  46. package/dist/menu/index.js +15 -9
  47. package/dist/progress/index.js +2 -1
  48. package/dist/segment-button/index.cjs +492 -0
  49. package/dist/segment-button/index.d.cts +141 -0
  50. package/dist/segment-button/index.d.ts +141 -0
  51. package/dist/segment-button/index.js +10 -0
  52. package/dist/select/index.js +2 -1
  53. package/dist/switch/index.js +2 -1
  54. package/dist/typography/index.js +3 -2
  55. package/dist/view/index.cjs +153 -78
  56. package/dist/view/index.d.cts +77 -1
  57. package/dist/view/index.d.ts +77 -1
  58. package/dist/view/index.js +125 -52
  59. 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-QLEQYKG5.js";
5
+ } from "./chunk-6PXMB5CH.js";
6
6
  import {
7
7
  BottomSheet
8
- } from "./chunk-GAOI4KIV.js";
8
+ } from "./chunk-S3MGBM3G.js";
9
9
  import {
10
10
  FabMenu,
11
11
  FabMenuItem
12
- } from "./chunk-EI5OMBFE.js";
12
+ } from "./chunk-DBKVHMSA.js";
13
13
  import {
14
14
  Fab
15
- } from "./chunk-II4QINLG.js";
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-4LFRYVSR.js";
26
+ } from "./chunk-K2HSVISE.js";
20
27
  import {
21
28
  Badge
22
- } from "./chunk-XJKA22BK.js";
29
+ } from "./chunk-UGDGCMGC.js";
23
30
  import {
24
31
  Alert
25
- } from "./chunk-2T6FKPJW.js";
32
+ } from "./chunk-OXVIVNIJ.js";
26
33
  import {
27
34
  Autocomplete,
28
35
  AutocompleteItem
29
- } from "./chunk-NMZUPH3R.js";
36
+ } from "./chunk-XUYIAA3A.js";
30
37
  import "./chunk-GBHQCAKW.js";
31
38
  import {
32
39
  DatePicker
33
- } from "./chunk-7OFTYKK4.js";
40
+ } from "./chunk-JJOVGRNI.js";
34
41
  import {
35
42
  Typography
36
- } from "./chunk-ZYTBRHLJ.js";
43
+ } from "./chunk-PWCUULAL.js";
37
44
  import {
38
45
  Divider
39
- } from "./chunk-GNJIET26.js";
46
+ } from "./chunk-RIVFFZRO.js";
40
47
  import {
41
48
  ActivityIndicator
42
- } from "./chunk-MKHBEJLO.js";
43
- import "./chunk-NBRASCX4.js";
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
  };
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  ActivityIndicator
3
- } from "../chunk-MKHBEJLO.js";
4
- import "../chunk-NBRASCX4.js";
3
+ } from "../chunk-VUVE6PK7.js";
4
+ import "../chunk-DXXNBF5P.js";
5
+ import "../chunk-MZL77KV5.js";
5
6
  export {
6
7
  ActivityIndicator
7
8
  };
@@ -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)(null);
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(MENU_SCREEN_INDENT, screenHeight - MENU_SCREEN_INDENT - contentSize.height);
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
@@ -1,6 +1,7 @@
1
+ import "../chunk-DXXNBF5P.js";
1
2
  import {
2
3
  useXUITheme
3
- } from "../chunk-NBRASCX4.js";
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 { Animated, Dimensions, Easing } from "react-native";
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(null);
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(MENU_SCREEN_INDENT, screenHeight - MENU_SCREEN_INDENT - contentSize.height);
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
@@ -1,6 +1,7 @@
1
+ import "../chunk-DXXNBF5P.js";
1
2
  import {
2
3
  useXUITheme
3
- } from "../chunk-NBRASCX4.js";
4
+ } from "../chunk-MZL77KV5.js";
4
5
 
5
6
  // src/components/progress/progress.tsx
6
7
  import React3 from "react";