@idealyst/components 1.2.4 → 1.2.7
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/package.json +4 -3
- package/src/Accordion/docs.ts +22 -0
- package/src/ActivityIndicator/docs.ts +9 -0
- package/src/Alert/docs.ts +12 -0
- package/src/Avatar/docs.ts +11 -0
- package/src/Badge/docs.ts +9 -0
- package/src/Breadcrumb/docs.ts +15 -0
- package/src/Button/docs.ts +9 -0
- package/src/Card/docs.ts +9 -0
- package/src/Checkbox/docs.ts +17 -0
- package/src/Chip/docs.ts +11 -0
- package/src/Dialog/docs.ts +18 -0
- package/src/Divider/docs.ts +9 -0
- package/src/Icon/docs.ts +11 -0
- package/src/Image/docs.ts +13 -0
- package/src/Input/docs.ts +17 -0
- package/src/Link/docs.ts +12 -0
- package/src/List/docs.ts +9 -0
- package/src/Menu/docs.ts +16 -0
- package/src/Popover/docs.ts +12 -0
- package/src/Pressable/docs.ts +9 -0
- package/src/Progress/docs.ts +11 -0
- package/src/RadioButton/docs.ts +19 -0
- package/src/SVGImage/docs.ts +13 -0
- package/src/Screen/docs.ts +9 -0
- package/src/Select/docs.ts +22 -0
- package/src/Skeleton/docs.ts +12 -0
- package/src/Slider/docs.ts +15 -0
- package/src/Switch/docs.ts +15 -0
- package/src/TabBar/docs.ts +16 -0
- package/src/Table/docs.ts +20 -0
- package/src/Text/docs.ts +9 -0
- package/src/TextArea/docs.ts +18 -0
- package/src/Tooltip/docs.ts +12 -0
- package/src/Video/docs.ts +14 -0
- package/src/View/docs.ts +9 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idealyst/components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.7",
|
|
4
4
|
"description": "Shared component library for React and React Native",
|
|
5
5
|
"documentation": "https://github.com/IdealystIO/idealyst-framework/tree/main/packages/components#readme",
|
|
6
6
|
"readme": "README.md",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"publish:npm": "npm publish"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@idealyst/theme": "^1.2.
|
|
59
|
+
"@idealyst/theme": "^1.2.7",
|
|
60
60
|
"@mdi/js": ">=7.0.0",
|
|
61
61
|
"@mdi/react": ">=1.0.0",
|
|
62
62
|
"@react-native-vector-icons/common": ">=12.0.0",
|
|
@@ -106,7 +106,8 @@
|
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
|
-
"@idealyst/theme": "^1.2.
|
|
109
|
+
"@idealyst/theme": "^1.2.7",
|
|
110
|
+
"@idealyst/tooling": "^1.2.4",
|
|
110
111
|
"@mdi/react": "^1.6.1",
|
|
111
112
|
"@types/react": "^19.1.0",
|
|
112
113
|
"react": "^19.1.0",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accordion Documentation Sample Props
|
|
3
|
+
*
|
|
4
|
+
* This file defines the sample props needed to render the Accordion component
|
|
5
|
+
* in documentation. These are extracted by the component analyzer.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { SampleProps } from '@idealyst/tooling';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Sample props for rendering Accordion in documentation.
|
|
12
|
+
* The `items` prop is required for Accordion to render.
|
|
13
|
+
*/
|
|
14
|
+
export const sampleProps: SampleProps = {
|
|
15
|
+
props: {
|
|
16
|
+
items: [
|
|
17
|
+
{ id: '1', title: 'Section 1', content: 'Content for section 1' },
|
|
18
|
+
{ id: '2', title: 'Section 2', content: 'Content for section 2' },
|
|
19
|
+
{ id: '3', title: 'Section 3', content: 'Content for section 3' },
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Alert Documentation Sample Props
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { SampleProps } from '@idealyst/tooling';
|
|
6
|
+
|
|
7
|
+
export const sampleProps: SampleProps = {
|
|
8
|
+
props: {
|
|
9
|
+
title: 'Alert Title',
|
|
10
|
+
message: 'This is an alert message with important information.',
|
|
11
|
+
},
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breadcrumb Documentation Sample Props
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { SampleProps } from '@idealyst/tooling';
|
|
6
|
+
|
|
7
|
+
export const sampleProps: SampleProps = {
|
|
8
|
+
props: {
|
|
9
|
+
items: [
|
|
10
|
+
{ label: 'Home' },
|
|
11
|
+
{ label: 'Products' },
|
|
12
|
+
{ label: 'Current Page' },
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
};
|
package/src/Card/docs.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checkbox Documentation Sample Props
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { SampleProps } from '@idealyst/tooling';
|
|
6
|
+
|
|
7
|
+
export const sampleProps: SampleProps = {
|
|
8
|
+
props: {
|
|
9
|
+
label: 'Check me',
|
|
10
|
+
},
|
|
11
|
+
state: {
|
|
12
|
+
checked: {
|
|
13
|
+
initial: false,
|
|
14
|
+
onChangeProp: 'onCheckedChange',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
package/src/Chip/docs.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dialog Documentation Sample Props
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { SampleProps } from '@idealyst/tooling';
|
|
6
|
+
|
|
7
|
+
export const sampleProps: SampleProps = {
|
|
8
|
+
props: {
|
|
9
|
+
title: 'Dialog Title',
|
|
10
|
+
},
|
|
11
|
+
children: 'Dialog content goes here. Click the X or backdrop to close.',
|
|
12
|
+
state: {
|
|
13
|
+
open: {
|
|
14
|
+
initial: true,
|
|
15
|
+
onChangeProp: 'onOpenChange',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
package/src/Icon/docs.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Image Documentation Sample Props
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { SampleProps } from '@idealyst/tooling';
|
|
6
|
+
|
|
7
|
+
export const sampleProps: SampleProps = {
|
|
8
|
+
props: {
|
|
9
|
+
source: { uri: 'https://picsum.photos/200/150' },
|
|
10
|
+
width: 200,
|
|
11
|
+
height: 150,
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Input Documentation Sample Props
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { SampleProps } from '@idealyst/tooling';
|
|
6
|
+
|
|
7
|
+
export const sampleProps: SampleProps = {
|
|
8
|
+
props: {
|
|
9
|
+
placeholder: 'Enter text...',
|
|
10
|
+
},
|
|
11
|
+
state: {
|
|
12
|
+
value: {
|
|
13
|
+
initial: '',
|
|
14
|
+
onChangeProp: 'onChangeText',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
};
|
package/src/Link/docs.ts
ADDED
package/src/List/docs.ts
ADDED
package/src/Menu/docs.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Menu Documentation Sample Props
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { SampleProps } from '@idealyst/tooling';
|
|
6
|
+
|
|
7
|
+
export const sampleProps: SampleProps = {
|
|
8
|
+
props: {
|
|
9
|
+
items: [
|
|
10
|
+
{ id: '1', label: 'Edit' },
|
|
11
|
+
{ id: '2', label: 'Duplicate' },
|
|
12
|
+
{ id: '3', label: 'Delete', intent: 'error' },
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
children: 'Click for menu',
|
|
16
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RadioButton Documentation Sample Props
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { SampleProps } from '@idealyst/tooling';
|
|
6
|
+
|
|
7
|
+
export const sampleProps: SampleProps = {
|
|
8
|
+
props: {
|
|
9
|
+
value: 'option1',
|
|
10
|
+
label: 'Option 1',
|
|
11
|
+
},
|
|
12
|
+
state: {
|
|
13
|
+
checked: {
|
|
14
|
+
initial: false,
|
|
15
|
+
onChangeProp: 'onPress',
|
|
16
|
+
toggle: true,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SVGImage Documentation Sample Props
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { SampleProps } from '@idealyst/tooling';
|
|
6
|
+
|
|
7
|
+
export const sampleProps: SampleProps = {
|
|
8
|
+
props: {
|
|
9
|
+
source: '<svg viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="currentColor"/></svg>',
|
|
10
|
+
width: 50,
|
|
11
|
+
height: 50,
|
|
12
|
+
},
|
|
13
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Select Documentation Sample Props
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { SampleProps } from '@idealyst/tooling';
|
|
6
|
+
|
|
7
|
+
export const sampleProps: SampleProps = {
|
|
8
|
+
props: {
|
|
9
|
+
options: [
|
|
10
|
+
{ value: 'opt1', label: 'Option 1' },
|
|
11
|
+
{ value: 'opt2', label: 'Option 2' },
|
|
12
|
+
{ value: 'opt3', label: 'Option 3' },
|
|
13
|
+
],
|
|
14
|
+
placeholder: 'Select an option',
|
|
15
|
+
},
|
|
16
|
+
state: {
|
|
17
|
+
value: {
|
|
18
|
+
initial: '',
|
|
19
|
+
onChangeProp: 'onValueChange',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slider Documentation Sample Props
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { SampleProps } from '@idealyst/tooling';
|
|
6
|
+
|
|
7
|
+
export const sampleProps: SampleProps = {
|
|
8
|
+
props: {},
|
|
9
|
+
state: {
|
|
10
|
+
value: {
|
|
11
|
+
initial: 50,
|
|
12
|
+
onChangeProp: 'onValueChange',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Switch Documentation Sample Props
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { SampleProps } from '@idealyst/tooling';
|
|
6
|
+
|
|
7
|
+
export const sampleProps: SampleProps = {
|
|
8
|
+
props: {},
|
|
9
|
+
state: {
|
|
10
|
+
checked: {
|
|
11
|
+
initial: false,
|
|
12
|
+
onChangeProp: 'onCheckedChange',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TabBar Documentation Sample Props
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { SampleProps } from '@idealyst/tooling';
|
|
6
|
+
|
|
7
|
+
export const sampleProps: SampleProps = {
|
|
8
|
+
props: {
|
|
9
|
+
items: [
|
|
10
|
+
{ value: 'tab1', label: 'Tab 1' },
|
|
11
|
+
{ value: 'tab2', label: 'Tab 2' },
|
|
12
|
+
{ value: 'tab3', label: 'Tab 3' },
|
|
13
|
+
],
|
|
14
|
+
defaultValue: 'tab1',
|
|
15
|
+
},
|
|
16
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Table Documentation Sample Props
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { SampleProps } from '@idealyst/tooling';
|
|
6
|
+
|
|
7
|
+
export const sampleProps: SampleProps = {
|
|
8
|
+
props: {
|
|
9
|
+
columns: [
|
|
10
|
+
{ key: 'name', title: 'Name', dataIndex: 'name' },
|
|
11
|
+
{ key: 'role', title: 'Role', dataIndex: 'role' },
|
|
12
|
+
{ key: 'status', title: 'Status', dataIndex: 'status' },
|
|
13
|
+
],
|
|
14
|
+
data: [
|
|
15
|
+
{ name: 'Alice', role: 'Developer', status: 'Active' },
|
|
16
|
+
{ name: 'Bob', role: 'Designer', status: 'Active' },
|
|
17
|
+
{ name: 'Charlie', role: 'Manager', status: 'Away' },
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
};
|
package/src/Text/docs.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TextArea Documentation Sample Props
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { SampleProps } from '@idealyst/tooling';
|
|
6
|
+
|
|
7
|
+
export const sampleProps: SampleProps = {
|
|
8
|
+
props: {
|
|
9
|
+
placeholder: 'Enter text...',
|
|
10
|
+
rows: 3,
|
|
11
|
+
},
|
|
12
|
+
state: {
|
|
13
|
+
value: {
|
|
14
|
+
initial: '',
|
|
15
|
+
onChangeProp: 'onChange',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Video Documentation Sample Props
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { SampleProps } from '@idealyst/tooling';
|
|
6
|
+
|
|
7
|
+
export const sampleProps: SampleProps = {
|
|
8
|
+
props: {
|
|
9
|
+
source: 'https://www.w3schools.com/html/mov_bbb.mp4',
|
|
10
|
+
width: 320,
|
|
11
|
+
height: 180,
|
|
12
|
+
controls: true,
|
|
13
|
+
},
|
|
14
|
+
};
|