@xsolla/xui-segmented-native 0.64.0-pr56.1768348754
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/index.d.mts +38 -0
- package/index.d.ts +38 -0
- package/index.js +661 -0
- package/index.js.map +1 -0
- package/index.mjs +628 -0
- package/index.mjs.map +1 -0
- package/package.json +26 -0
package/index.d.mts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface SegmentedItemType {
|
|
4
|
+
/** Unique identifier for the item */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Display label for the item */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Optional icon to display */
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
/** Whether the item is disabled */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** Accessible label for screen readers */
|
|
13
|
+
"aria-label"?: string;
|
|
14
|
+
}
|
|
15
|
+
interface SegmentedProps {
|
|
16
|
+
/** Array of items */
|
|
17
|
+
items: SegmentedItemType[];
|
|
18
|
+
/** ID of the currently active item */
|
|
19
|
+
activeId?: string;
|
|
20
|
+
/** Callback when an item is selected */
|
|
21
|
+
onChange?: (id: string) => void;
|
|
22
|
+
/** Size variant */
|
|
23
|
+
size?: "xl" | "l" | "m" | "s";
|
|
24
|
+
/** Whether to show a border around the container */
|
|
25
|
+
stroke?: boolean;
|
|
26
|
+
/** HTML id attribute */
|
|
27
|
+
id?: string;
|
|
28
|
+
/** Test ID for testing frameworks */
|
|
29
|
+
testID?: string;
|
|
30
|
+
/** Full width of the container */
|
|
31
|
+
fullWidth?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Segmented - A control for switching between related views or filters
|
|
35
|
+
*/
|
|
36
|
+
declare const Segmented: React.FC<SegmentedProps>;
|
|
37
|
+
|
|
38
|
+
export { Segmented, type SegmentedItemType, type SegmentedProps };
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface SegmentedItemType {
|
|
4
|
+
/** Unique identifier for the item */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Display label for the item */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Optional icon to display */
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
/** Whether the item is disabled */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** Accessible label for screen readers */
|
|
13
|
+
"aria-label"?: string;
|
|
14
|
+
}
|
|
15
|
+
interface SegmentedProps {
|
|
16
|
+
/** Array of items */
|
|
17
|
+
items: SegmentedItemType[];
|
|
18
|
+
/** ID of the currently active item */
|
|
19
|
+
activeId?: string;
|
|
20
|
+
/** Callback when an item is selected */
|
|
21
|
+
onChange?: (id: string) => void;
|
|
22
|
+
/** Size variant */
|
|
23
|
+
size?: "xl" | "l" | "m" | "s";
|
|
24
|
+
/** Whether to show a border around the container */
|
|
25
|
+
stroke?: boolean;
|
|
26
|
+
/** HTML id attribute */
|
|
27
|
+
id?: string;
|
|
28
|
+
/** Test ID for testing frameworks */
|
|
29
|
+
testID?: string;
|
|
30
|
+
/** Full width of the container */
|
|
31
|
+
fullWidth?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Segmented - A control for switching between related views or filters
|
|
35
|
+
*/
|
|
36
|
+
declare const Segmented: React.FC<SegmentedProps>;
|
|
37
|
+
|
|
38
|
+
export { Segmented, type SegmentedItemType, type SegmentedProps };
|