@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
|
@@ -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 };
|
package/dist/select/index.js
CHANGED
|
@@ -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-
|
|
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";
|
package/dist/switch/index.js
CHANGED