@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
@@ -0,0 +1,141 @@
1
+ import React, { ReactNode } from 'react';
2
+ import { ViewStyle, TextStyle } from 'react-native';
3
+ import { T as ThemeColor, S as Size } from '../index-BOw6tbkc.js';
4
+
5
+ type SegmentButtonVariant = 'outlined' | 'flat' | 'light' | 'faded';
6
+ type ElevationLevel = 0 | 1 | 2 | 3 | 4;
7
+ type SegmentButtonRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
8
+ type SegmentButtonSelectionMode = 'single' | 'multiple';
9
+ type SegmentButtonProps = {
10
+ /**
11
+ * SegmentButtonItem children
12
+ */
13
+ children: ReactNode;
14
+ /**
15
+ * The currently selected key(s) (controlled mode).
16
+ * Use a string for single-select, string array for multi-select.
17
+ */
18
+ selected?: string | string[];
19
+ /**
20
+ * Default selected key(s) for uncontrolled mode.
21
+ * Use a string for single-select, string array for multi-select.
22
+ */
23
+ defaultSelected?: string | string[];
24
+ /**
25
+ * Callback fired when selection changes.
26
+ * Returns a string for single-select mode, string array for multi-select.
27
+ */
28
+ onSelectionChange?: (selected: string | string[]) => void;
29
+ /**
30
+ * Selection mode: single or multiple
31
+ * @default 'single'
32
+ */
33
+ selectionMode?: SegmentButtonSelectionMode;
34
+ /**
35
+ * The theme color of the segment button
36
+ * @default 'primary'
37
+ */
38
+ themeColor?: ThemeColor;
39
+ /**
40
+ * The variant of the segment button
41
+ * @default 'outlined'
42
+ */
43
+ variant?: SegmentButtonVariant;
44
+ /**
45
+ * The size of the segment button
46
+ * @default 'md'
47
+ */
48
+ size?: Size;
49
+ /**
50
+ * The border radius of the segment button
51
+ * @default 'full'
52
+ */
53
+ radius?: SegmentButtonRadius;
54
+ /**
55
+ * Whether the segment button should take the full width of its container
56
+ * @default false
57
+ */
58
+ fullWidth?: boolean;
59
+ /**
60
+ * Whether the entire segment button group is disabled
61
+ * @default false
62
+ */
63
+ isDisabled?: boolean;
64
+ /**
65
+ * Whether to show a checkmark icon on selected segments
66
+ * @default true
67
+ */
68
+ showCheckmark?: boolean;
69
+ /**
70
+ * Android elevation level from 0 to 4.
71
+ * Does not apply to `outlined` and `light` variants.
72
+ * @default 0
73
+ */
74
+ elevation?: ElevationLevel;
75
+ /**
76
+ * Custom styles for the outer container
77
+ */
78
+ customAppearance?: {
79
+ container?: ViewStyle;
80
+ };
81
+ };
82
+
83
+ declare const SegmentButton: React.FC<SegmentButtonProps>;
84
+
85
+ type SegmentButtonItemCustomAppearance = {
86
+ /**
87
+ * Custom styles for the segment container
88
+ */
89
+ segment?: ViewStyle;
90
+ /**
91
+ * Custom styles for the selected segment
92
+ */
93
+ selectedSegment?: ViewStyle;
94
+ /**
95
+ * Custom styles for segment label text
96
+ */
97
+ text?: TextStyle;
98
+ /**
99
+ * Custom styles for selected segment label text
100
+ */
101
+ selectedText?: TextStyle;
102
+ };
103
+ type SegmentButtonItemProps = {
104
+ /**
105
+ * Unique key for the segment item
106
+ */
107
+ itemKey: string;
108
+ /**
109
+ * Label text for the segment
110
+ */
111
+ label: string;
112
+ /**
113
+ * Content to display at the start of the segment item
114
+ */
115
+ startContent?: ReactNode;
116
+ /**
117
+ * @deprecated Use `startContent` instead
118
+ */
119
+ icon?: ReactNode;
120
+ /**
121
+ * Content to display at the end of the segment item
122
+ */
123
+ endContent?: ReactNode;
124
+ /**
125
+ * Custom indicator shown when the segment item is selected
126
+ */
127
+ checkIndicator?: ReactNode;
128
+ /**
129
+ * Whether the segment item is disabled
130
+ * @default false
131
+ */
132
+ isDisabled?: boolean;
133
+ /**
134
+ * Custom appearance styles for this segment item
135
+ */
136
+ customAppearance?: SegmentButtonItemCustomAppearance;
137
+ };
138
+
139
+ declare const SegmentButtonItem: React.FC<SegmentButtonItemProps>;
140
+
141
+ export { type ElevationLevel, SegmentButton, SegmentButtonItem, type SegmentButtonItemProps, type SegmentButtonProps, type SegmentButtonRadius, type SegmentButtonSelectionMode, type SegmentButtonVariant };
@@ -0,0 +1,10 @@
1
+ import {
2
+ SegmentButton,
3
+ SegmentButtonItem
4
+ } from "../chunk-STUNTRKJ.js";
5
+ import "../chunk-DXXNBF5P.js";
6
+ import "../chunk-MZL77KV5.js";
7
+ export {
8
+ SegmentButton,
9
+ SegmentButtonItem
10
+ };
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  CheckmarkIcon
3
3
  } from "../chunk-GBHQCAKW.js";
4
+ import "../chunk-DXXNBF5P.js";
4
5
  import {
5
6
  useXUITheme
6
- } from "../chunk-NBRASCX4.js";
7
+ } from "../chunk-MZL77KV5.js";
7
8
 
8
9
  // src/components/select/select.tsx
9
10
  import React3, { useCallback as useCallback2, useMemo as useMemo2 } from "react";
@@ -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/switch/switch.tsx
6
7
  import React, { useEffect, useMemo as useMemo2, useRef, useState } from "react";
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  Typography
3
- } from "../chunk-ZYTBRHLJ.js";
4
- import "../chunk-NBRASCX4.js";
3
+ } from "../chunk-PWCUULAL.js";
4
+ import "../chunk-DXXNBF5P.js";
5
+ import "../chunk-MZL77KV5.js";
5
6
  export {
6
7
  Typography
7
8
  };