@idealyst/mcp-server 1.2.28 → 1.2.30
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/{chunk-QMHFAEAR.js → chunk-WJCICXOJ.js} +5 -5
- package/dist/{chunk-QMHFAEAR.js.map → chunk-WJCICXOJ.js.map} +1 -1
- package/dist/index.cjs +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/tools/index.cjs +6 -3
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.js +1 -1
- package/examples/components/ActivityIndicator.examples.tsx +22 -22
- package/examples/components/Alert.examples.tsx +14 -14
- package/examples/components/Avatar.examples.tsx +7 -7
- package/examples/components/Breadcrumb.examples.tsx +6 -6
- package/examples/components/Button.examples.tsx +1 -1
- package/examples/components/Card.examples.tsx +1 -1
- package/examples/components/Checkbox.examples.tsx +26 -26
- package/examples/components/Chip.examples.tsx +1 -1
- package/examples/components/Dialog.examples.tsx +25 -25
- package/examples/components/Divider.examples.tsx +31 -27
- package/examples/components/Icon.examples.tsx +12 -12
- package/examples/components/Menu.examples.tsx +3 -3
- package/examples/components/Popover.examples.tsx +36 -36
- package/examples/components/Progress.examples.tsx +42 -42
- package/examples/components/RadioButton.examples.tsx +21 -21
- package/examples/components/Screen.examples.tsx +35 -35
- package/examples/components/Select.examples.tsx +17 -17
- package/examples/components/Skeleton.examples.tsx +1 -1
- package/examples/components/Slider.examples.tsx +23 -23
- package/examples/components/Switch.examples.tsx +17 -17
- package/examples/components/TabBar.examples.tsx +13 -13
- package/examples/components/Text.examples.tsx +26 -26
- package/examples/components/{Input.examples.tsx → TextInput.examples.tsx} +47 -47
- package/examples/components/Tooltip.examples.tsx +11 -11
- package/examples/components/View.examples.tsx +22 -22
- package/package.json +4 -4
|
@@ -22,7 +22,7 @@ export function ScreenWithBackgrounds() {
|
|
|
22
22
|
return (
|
|
23
23
|
<Screen background="primary">
|
|
24
24
|
<View spacing="md">
|
|
25
|
-
<Text
|
|
25
|
+
<Text typography="subtitle1" weight="bold">
|
|
26
26
|
Primary Surface Screen
|
|
27
27
|
</Text>
|
|
28
28
|
<Text>This screen has a primary surface background</Text>
|
|
@@ -36,7 +36,7 @@ export function ScreenWithPadding() {
|
|
|
36
36
|
return (
|
|
37
37
|
<Screen padding="md">
|
|
38
38
|
<View spacing="md">
|
|
39
|
-
<Text
|
|
39
|
+
<Text typography="subtitle1" weight="bold">
|
|
40
40
|
Padded Screen
|
|
41
41
|
</Text>
|
|
42
42
|
<Text>This screen has medium padding around all edges</Text>
|
|
@@ -50,7 +50,7 @@ export function ScreenWithSafeArea() {
|
|
|
50
50
|
return (
|
|
51
51
|
<Screen safeArea padding="md">
|
|
52
52
|
<View spacing="md">
|
|
53
|
-
<Text
|
|
53
|
+
<Text typography="subtitle1" weight="bold">
|
|
54
54
|
Safe Area Screen
|
|
55
55
|
</Text>
|
|
56
56
|
<Text>
|
|
@@ -66,7 +66,7 @@ export function ScrollableScreen() {
|
|
|
66
66
|
return (
|
|
67
67
|
<Screen scrollable padding="md">
|
|
68
68
|
<View spacing="md">
|
|
69
|
-
<Text
|
|
69
|
+
<Text typography="h5" weight="bold">
|
|
70
70
|
Scrollable Content
|
|
71
71
|
</Text>
|
|
72
72
|
{Array.from({ length: 20 }, (_, i) => (
|
|
@@ -77,7 +77,7 @@ export function ScrollableScreen() {
|
|
|
77
77
|
radius="md"
|
|
78
78
|
>
|
|
79
79
|
<Text weight="semibold">Item {i + 1}</Text>
|
|
80
|
-
<Text
|
|
80
|
+
<Text typography="body2">
|
|
81
81
|
This is a scrollable item. Add enough items to see scrolling behavior.
|
|
82
82
|
</Text>
|
|
83
83
|
</View>
|
|
@@ -95,7 +95,7 @@ export function ScreenWithContentInset() {
|
|
|
95
95
|
contentInset={{ top: 20, bottom: 20, left: 16, right: 16 }}
|
|
96
96
|
>
|
|
97
97
|
<View spacing="md">
|
|
98
|
-
<Text
|
|
98
|
+
<Text typography="subtitle1" weight="bold">
|
|
99
99
|
Screen with Content Inset
|
|
100
100
|
</Text>
|
|
101
101
|
<Text>
|
|
@@ -122,10 +122,10 @@ export function ProfileScreen() {
|
|
|
122
122
|
<Screen background="secondary" padding="md" safeArea>
|
|
123
123
|
<View spacing="lg">
|
|
124
124
|
<View spacing="md">
|
|
125
|
-
<Text
|
|
125
|
+
<Text typography="h5" weight="bold">
|
|
126
126
|
John Doe
|
|
127
127
|
</Text>
|
|
128
|
-
<Text
|
|
128
|
+
<Text typography="body1">
|
|
129
129
|
john.doe@example.com
|
|
130
130
|
</Text>
|
|
131
131
|
</View>
|
|
@@ -137,10 +137,10 @@ export function ProfileScreen() {
|
|
|
137
137
|
>
|
|
138
138
|
<Text weight="semibold">Account Information</Text>
|
|
139
139
|
<View spacing="sm">
|
|
140
|
-
<Text
|
|
140
|
+
<Text typography="body2">
|
|
141
141
|
Member since: January 2024
|
|
142
142
|
</Text>
|
|
143
|
-
<Text
|
|
143
|
+
<Text typography="body2">
|
|
144
144
|
Status: Active
|
|
145
145
|
</Text>
|
|
146
146
|
</View>
|
|
@@ -153,9 +153,9 @@ export function ProfileScreen() {
|
|
|
153
153
|
>
|
|
154
154
|
<Text weight="semibold">Settings</Text>
|
|
155
155
|
<View spacing="sm">
|
|
156
|
-
<Text
|
|
157
|
-
<Text
|
|
158
|
-
<Text
|
|
156
|
+
<Text typography="body2">Notifications</Text>
|
|
157
|
+
<Text typography="body2">Privacy</Text>
|
|
158
|
+
<Text typography="body2">Security</Text>
|
|
159
159
|
</View>
|
|
160
160
|
</View>
|
|
161
161
|
</View>
|
|
@@ -168,7 +168,7 @@ export function DashboardScreen() {
|
|
|
168
168
|
return (
|
|
169
169
|
<Screen background="secondary" padding="lg" safeArea scrollable>
|
|
170
170
|
<View spacing="lg">
|
|
171
|
-
<Text
|
|
171
|
+
<Text typography="h5" weight="bold">
|
|
172
172
|
Dashboard
|
|
173
173
|
</Text>
|
|
174
174
|
|
|
@@ -178,23 +178,23 @@ export function DashboardScreen() {
|
|
|
178
178
|
spacing="lg"
|
|
179
179
|
radius="lg"
|
|
180
180
|
>
|
|
181
|
-
<Text weight="semibold"
|
|
181
|
+
<Text weight="semibold" typography="subtitle1">
|
|
182
182
|
Stats Overview
|
|
183
183
|
</Text>
|
|
184
184
|
<View spacing="md">
|
|
185
185
|
<View spacing="xs">
|
|
186
|
-
<Text
|
|
186
|
+
<Text typography="body2">
|
|
187
187
|
Total Users
|
|
188
188
|
</Text>
|
|
189
|
-
<Text
|
|
189
|
+
<Text typography="h5" weight="bold">
|
|
190
190
|
1,234
|
|
191
191
|
</Text>
|
|
192
192
|
</View>
|
|
193
193
|
<View spacing="xs">
|
|
194
|
-
<Text
|
|
194
|
+
<Text typography="body2">
|
|
195
195
|
Revenue
|
|
196
196
|
</Text>
|
|
197
|
-
<Text
|
|
197
|
+
<Text typography="h5" weight="bold">
|
|
198
198
|
$45,678
|
|
199
199
|
</Text>
|
|
200
200
|
</View>
|
|
@@ -206,13 +206,13 @@ export function DashboardScreen() {
|
|
|
206
206
|
spacing="lg"
|
|
207
207
|
radius="lg"
|
|
208
208
|
>
|
|
209
|
-
<Text weight="semibold"
|
|
209
|
+
<Text weight="semibold" typography="subtitle1">
|
|
210
210
|
Recent Activity
|
|
211
211
|
</Text>
|
|
212
212
|
<View spacing="sm">
|
|
213
|
-
<Text
|
|
214
|
-
<Text
|
|
215
|
-
<Text
|
|
213
|
+
<Text typography="body2">New user registered</Text>
|
|
214
|
+
<Text typography="body2">Payment received</Text>
|
|
215
|
+
<Text typography="body2">Order completed</Text>
|
|
216
216
|
</View>
|
|
217
217
|
</View>
|
|
218
218
|
</View>
|
|
@@ -227,17 +227,17 @@ export function FormScreen() {
|
|
|
227
227
|
<Screen background="secondary" padding="md" safeArea scrollable>
|
|
228
228
|
<View spacing="lg">
|
|
229
229
|
<View spacing="sm">
|
|
230
|
-
<Text
|
|
230
|
+
<Text typography="h5" weight="bold">
|
|
231
231
|
Create Account
|
|
232
232
|
</Text>
|
|
233
|
-
<Text
|
|
233
|
+
<Text typography="body1">
|
|
234
234
|
Fill in your information below
|
|
235
235
|
</Text>
|
|
236
236
|
</View>
|
|
237
237
|
|
|
238
238
|
<View spacing="md">
|
|
239
239
|
<View spacing="xs">
|
|
240
|
-
<Text
|
|
240
|
+
<Text typography="body2" weight="semibold">
|
|
241
241
|
Full Name
|
|
242
242
|
</Text>
|
|
243
243
|
<View
|
|
@@ -246,14 +246,14 @@ export function FormScreen() {
|
|
|
246
246
|
radius="md"
|
|
247
247
|
border="thin"
|
|
248
248
|
>
|
|
249
|
-
<Text
|
|
249
|
+
<Text typography="body2">
|
|
250
250
|
Enter your full name
|
|
251
251
|
</Text>
|
|
252
252
|
</View>
|
|
253
253
|
</View>
|
|
254
254
|
|
|
255
255
|
<View spacing="xs">
|
|
256
|
-
<Text
|
|
256
|
+
<Text typography="body2" weight="semibold">
|
|
257
257
|
Email
|
|
258
258
|
</Text>
|
|
259
259
|
<View
|
|
@@ -262,14 +262,14 @@ export function FormScreen() {
|
|
|
262
262
|
radius="md"
|
|
263
263
|
border="thin"
|
|
264
264
|
>
|
|
265
|
-
<Text
|
|
265
|
+
<Text typography="body2">
|
|
266
266
|
Enter your email
|
|
267
267
|
</Text>
|
|
268
268
|
</View>
|
|
269
269
|
</View>
|
|
270
270
|
|
|
271
271
|
<View spacing="xs">
|
|
272
|
-
<Text
|
|
272
|
+
<Text typography="body2" weight="semibold">
|
|
273
273
|
Password
|
|
274
274
|
</Text>
|
|
275
275
|
<View
|
|
@@ -278,7 +278,7 @@ export function FormScreen() {
|
|
|
278
278
|
radius="md"
|
|
279
279
|
border="thin"
|
|
280
280
|
>
|
|
281
|
-
<Text
|
|
281
|
+
<Text typography="body2">
|
|
282
282
|
Enter your password
|
|
283
283
|
</Text>
|
|
284
284
|
</View>
|
|
@@ -295,13 +295,13 @@ export function FormScreen() {
|
|
|
295
295
|
export function SettingsScreen() {
|
|
296
296
|
return (
|
|
297
297
|
<Screen background="secondary" padding="none" safeArea scrollable>
|
|
298
|
-
<View spacing="lg"
|
|
299
|
-
<Text
|
|
298
|
+
<View spacing="lg" margin="md">
|
|
299
|
+
<Text typography="h5" weight="bold">
|
|
300
300
|
Settings
|
|
301
301
|
</Text>
|
|
302
302
|
|
|
303
303
|
<View spacing="xs">
|
|
304
|
-
<Text
|
|
304
|
+
<Text typography="body2" weight="semibold">
|
|
305
305
|
ACCOUNT
|
|
306
306
|
</Text>
|
|
307
307
|
<View
|
|
@@ -322,7 +322,7 @@ export function SettingsScreen() {
|
|
|
322
322
|
</View>
|
|
323
323
|
|
|
324
324
|
<View spacing="xs">
|
|
325
|
-
<Text
|
|
325
|
+
<Text typography="body2" weight="semibold">
|
|
326
326
|
PREFERENCES
|
|
327
327
|
</Text>
|
|
328
328
|
<View
|
|
@@ -33,7 +33,7 @@ export function BasicSelect() {
|
|
|
33
33
|
<Select
|
|
34
34
|
options={fruitOptions}
|
|
35
35
|
value={value}
|
|
36
|
-
|
|
36
|
+
onChange={setValue}
|
|
37
37
|
placeholder="Select a fruit"
|
|
38
38
|
/>
|
|
39
39
|
);
|
|
@@ -49,14 +49,14 @@ export function SelectTypes() {
|
|
|
49
49
|
type="outlined"
|
|
50
50
|
options={fruitOptions}
|
|
51
51
|
value={value}
|
|
52
|
-
|
|
52
|
+
onChange={setValue}
|
|
53
53
|
placeholder="Outlined"
|
|
54
54
|
/>
|
|
55
55
|
<Select
|
|
56
56
|
type="filled"
|
|
57
57
|
options={fruitOptions}
|
|
58
58
|
value={value}
|
|
59
|
-
|
|
59
|
+
onChange={setValue}
|
|
60
60
|
placeholder="Filled"
|
|
61
61
|
/>
|
|
62
62
|
</View>
|
|
@@ -73,35 +73,35 @@ export function SelectSizes() {
|
|
|
73
73
|
size="xs"
|
|
74
74
|
options={fruitOptions}
|
|
75
75
|
value={value}
|
|
76
|
-
|
|
76
|
+
onChange={setValue}
|
|
77
77
|
placeholder="Extra Small"
|
|
78
78
|
/>
|
|
79
79
|
<Select
|
|
80
80
|
size="sm"
|
|
81
81
|
options={fruitOptions}
|
|
82
82
|
value={value}
|
|
83
|
-
|
|
83
|
+
onChange={setValue}
|
|
84
84
|
placeholder="Small"
|
|
85
85
|
/>
|
|
86
86
|
<Select
|
|
87
87
|
size="md"
|
|
88
88
|
options={fruitOptions}
|
|
89
89
|
value={value}
|
|
90
|
-
|
|
90
|
+
onChange={setValue}
|
|
91
91
|
placeholder="Medium"
|
|
92
92
|
/>
|
|
93
93
|
<Select
|
|
94
94
|
size="lg"
|
|
95
95
|
options={fruitOptions}
|
|
96
96
|
value={value}
|
|
97
|
-
|
|
97
|
+
onChange={setValue}
|
|
98
98
|
placeholder="Large"
|
|
99
99
|
/>
|
|
100
100
|
<Select
|
|
101
101
|
size="xl"
|
|
102
102
|
options={fruitOptions}
|
|
103
103
|
value={value}
|
|
104
|
-
|
|
104
|
+
onChange={setValue}
|
|
105
105
|
placeholder="Extra Large"
|
|
106
106
|
/>
|
|
107
107
|
</View>
|
|
@@ -117,7 +117,7 @@ export function SelectWithLabel() {
|
|
|
117
117
|
label="Country"
|
|
118
118
|
options={countryOptions}
|
|
119
119
|
value={value}
|
|
120
|
-
|
|
120
|
+
onChange={setValue}
|
|
121
121
|
placeholder="Select your country"
|
|
122
122
|
/>
|
|
123
123
|
);
|
|
@@ -132,7 +132,7 @@ export function SelectWithHelperText() {
|
|
|
132
132
|
label="Shipping Country"
|
|
133
133
|
options={countryOptions}
|
|
134
134
|
value={value}
|
|
135
|
-
|
|
135
|
+
onChange={setValue}
|
|
136
136
|
placeholder="Select country"
|
|
137
137
|
helperText="Choose where you want your order shipped"
|
|
138
138
|
/>
|
|
@@ -152,7 +152,7 @@ export function SelectWithError() {
|
|
|
152
152
|
label="Country *"
|
|
153
153
|
options={countryOptions}
|
|
154
154
|
value={value}
|
|
155
|
-
|
|
155
|
+
onChange={setValue}
|
|
156
156
|
placeholder="Select country"
|
|
157
157
|
error={hasError}
|
|
158
158
|
helperText={hasError ? 'Please select a country' : 'Required field'}
|
|
@@ -167,7 +167,7 @@ export function DisabledSelect() {
|
|
|
167
167
|
<Select
|
|
168
168
|
options={fruitOptions}
|
|
169
169
|
value="apple"
|
|
170
|
-
|
|
170
|
+
onChange={() => {}}
|
|
171
171
|
placeholder="Select a fruit"
|
|
172
172
|
disabled
|
|
173
173
|
/>
|
|
@@ -205,7 +205,7 @@ export function SearchableSelect() {
|
|
|
205
205
|
label="Country"
|
|
206
206
|
options={largeOptions}
|
|
207
207
|
value={value}
|
|
208
|
-
|
|
208
|
+
onChange={setValue}
|
|
209
209
|
placeholder="Search for a country..."
|
|
210
210
|
searchable
|
|
211
211
|
maxHeight={300}
|
|
@@ -230,7 +230,7 @@ export function SelectWithDisabledOptions() {
|
|
|
230
230
|
label="Select a fruit"
|
|
231
231
|
options={optionsWithDisabled}
|
|
232
232
|
value={value}
|
|
233
|
-
|
|
233
|
+
onChange={setValue}
|
|
234
234
|
placeholder="Some options are disabled"
|
|
235
235
|
helperText="Banana and Grape are out of stock"
|
|
236
236
|
/>
|
|
@@ -257,21 +257,21 @@ export function FormWithSelects() {
|
|
|
257
257
|
label="Country"
|
|
258
258
|
options={countryOptions}
|
|
259
259
|
value={country}
|
|
260
|
-
|
|
260
|
+
onChange={setCountry}
|
|
261
261
|
placeholder="Select country"
|
|
262
262
|
/>
|
|
263
263
|
<Select
|
|
264
264
|
label="Favorite Fruit"
|
|
265
265
|
options={fruitOptions}
|
|
266
266
|
value={fruit}
|
|
267
|
-
|
|
267
|
+
onChange={setFruit}
|
|
268
268
|
placeholder="Select fruit"
|
|
269
269
|
/>
|
|
270
270
|
<Select
|
|
271
271
|
label="Size"
|
|
272
272
|
options={sizeOptions}
|
|
273
273
|
value={size}
|
|
274
|
-
|
|
274
|
+
onChange={setSize}
|
|
275
275
|
placeholder="Select size"
|
|
276
276
|
/>
|
|
277
277
|
</View>
|
|
@@ -15,7 +15,7 @@ export function BasicSlider() {
|
|
|
15
15
|
return (
|
|
16
16
|
<Slider
|
|
17
17
|
value={value}
|
|
18
|
-
|
|
18
|
+
onChange={setValue}
|
|
19
19
|
min={0}
|
|
20
20
|
max={100}
|
|
21
21
|
/>
|
|
@@ -29,7 +29,7 @@ export function SliderWithValue() {
|
|
|
29
29
|
return (
|
|
30
30
|
<Slider
|
|
31
31
|
value={value}
|
|
32
|
-
|
|
32
|
+
onChange={setValue}
|
|
33
33
|
min={0}
|
|
34
34
|
max={100}
|
|
35
35
|
showValue
|
|
@@ -44,7 +44,7 @@ export function SliderWithMinMax() {
|
|
|
44
44
|
return (
|
|
45
45
|
<Slider
|
|
46
46
|
value={value}
|
|
47
|
-
|
|
47
|
+
onChange={setValue}
|
|
48
48
|
min={0}
|
|
49
49
|
max={100}
|
|
50
50
|
showMinMax
|
|
@@ -62,7 +62,7 @@ export function SliderWithSteps() {
|
|
|
62
62
|
<Text>Value: {value}</Text>
|
|
63
63
|
<Slider
|
|
64
64
|
value={value}
|
|
65
|
-
|
|
65
|
+
onChange={setValue}
|
|
66
66
|
min={0}
|
|
67
67
|
max={100}
|
|
68
68
|
step={10}
|
|
@@ -79,11 +79,11 @@ export function SliderSizes() {
|
|
|
79
79
|
|
|
80
80
|
return (
|
|
81
81
|
<View spacing="lg">
|
|
82
|
-
<Slider size="xs" value={value}
|
|
83
|
-
<Slider size="sm" value={value}
|
|
84
|
-
<Slider size="md" value={value}
|
|
85
|
-
<Slider size="lg" value={value}
|
|
86
|
-
<Slider size="xl" value={value}
|
|
82
|
+
<Slider size="xs" value={value} onChange={setValue} min={0} max={100} showValue />
|
|
83
|
+
<Slider size="sm" value={value} onChange={setValue} min={0} max={100} showValue />
|
|
84
|
+
<Slider size="md" value={value} onChange={setValue} min={0} max={100} showValue />
|
|
85
|
+
<Slider size="lg" value={value} onChange={setValue} min={0} max={100} showValue />
|
|
86
|
+
<Slider size="xl" value={value} onChange={setValue} min={0} max={100} showValue />
|
|
87
87
|
</View>
|
|
88
88
|
);
|
|
89
89
|
}
|
|
@@ -94,11 +94,11 @@ export function SliderIntents() {
|
|
|
94
94
|
|
|
95
95
|
return (
|
|
96
96
|
<View spacing="md">
|
|
97
|
-
<Slider intent="primary" value={value}
|
|
98
|
-
<Slider intent="success" value={value}
|
|
99
|
-
<Slider intent="
|
|
100
|
-
<Slider intent="warning" value={value}
|
|
101
|
-
<Slider intent="info" value={value}
|
|
97
|
+
<Slider intent="primary" value={value} onChange={setValue} min={0} max={100} showValue />
|
|
98
|
+
<Slider intent="success" value={value} onChange={setValue} min={0} max={100} showValue />
|
|
99
|
+
<Slider intent="danger" value={value} onChange={setValue} min={0} max={100} showValue />
|
|
100
|
+
<Slider intent="warning" value={value} onChange={setValue} min={0} max={100} showValue />
|
|
101
|
+
<Slider intent="info" value={value} onChange={setValue} min={0} max={100} showValue />
|
|
102
102
|
</View>
|
|
103
103
|
);
|
|
104
104
|
}
|
|
@@ -113,7 +113,7 @@ export function SliderWithIcon() {
|
|
|
113
113
|
<Slider
|
|
114
114
|
icon="volume-high"
|
|
115
115
|
value={volume}
|
|
116
|
-
|
|
116
|
+
onChange={setVolume}
|
|
117
117
|
min={0}
|
|
118
118
|
max={100}
|
|
119
119
|
showValue
|
|
@@ -137,7 +137,7 @@ export function SliderWithMarks() {
|
|
|
137
137
|
return (
|
|
138
138
|
<Slider
|
|
139
139
|
value={value}
|
|
140
|
-
|
|
140
|
+
onChange={setValue}
|
|
141
141
|
min={0}
|
|
142
142
|
max={100}
|
|
143
143
|
marks={marks}
|
|
@@ -151,7 +151,7 @@ export function DisabledSlider() {
|
|
|
151
151
|
return (
|
|
152
152
|
<Slider
|
|
153
153
|
value={60}
|
|
154
|
-
|
|
154
|
+
onChange={() => {}}
|
|
155
155
|
min={0}
|
|
156
156
|
max={100}
|
|
157
157
|
disabled
|
|
@@ -171,7 +171,7 @@ export function PriceRangeSlider() {
|
|
|
171
171
|
<Slider
|
|
172
172
|
icon="currency-usd"
|
|
173
173
|
value={price}
|
|
174
|
-
|
|
174
|
+
onChange={setPrice}
|
|
175
175
|
min={0}
|
|
176
176
|
max={1000}
|
|
177
177
|
step={50}
|
|
@@ -193,7 +193,7 @@ export function BrightnessControl() {
|
|
|
193
193
|
<Slider
|
|
194
194
|
icon="brightness-6"
|
|
195
195
|
value={brightness}
|
|
196
|
-
|
|
196
|
+
onChange={setBrightness}
|
|
197
197
|
min={0}
|
|
198
198
|
max={100}
|
|
199
199
|
step={5}
|
|
@@ -221,15 +221,15 @@ export function MultipleSliders() {
|
|
|
221
221
|
<View spacing="md">
|
|
222
222
|
<Slider
|
|
223
223
|
value={red}
|
|
224
|
-
|
|
224
|
+
onChange={setRed}
|
|
225
225
|
min={0}
|
|
226
226
|
max={255}
|
|
227
227
|
showValue
|
|
228
|
-
intent="
|
|
228
|
+
intent="danger"
|
|
229
229
|
/>
|
|
230
230
|
<Slider
|
|
231
231
|
value={green}
|
|
232
|
-
|
|
232
|
+
onChange={setGreen}
|
|
233
233
|
min={0}
|
|
234
234
|
max={255}
|
|
235
235
|
showValue
|
|
@@ -237,7 +237,7 @@ export function MultipleSliders() {
|
|
|
237
237
|
/>
|
|
238
238
|
<Slider
|
|
239
239
|
value={blue}
|
|
240
|
-
|
|
240
|
+
onChange={setBlue}
|
|
241
241
|
min={0}
|
|
242
242
|
max={255}
|
|
243
243
|
showValue
|
|
@@ -13,7 +13,7 @@ export function BasicSwitch() {
|
|
|
13
13
|
const [checked, setChecked] = React.useState(false);
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
|
-
<Switch checked={checked}
|
|
16
|
+
<Switch checked={checked} onChange={setChecked} />
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -23,11 +23,11 @@ export function SwitchSizes() {
|
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
25
|
<>
|
|
26
|
-
<Switch checked={checked}
|
|
27
|
-
<Switch checked={checked}
|
|
28
|
-
<Switch checked={checked}
|
|
29
|
-
<Switch checked={checked}
|
|
30
|
-
<Switch checked={checked}
|
|
26
|
+
<Switch checked={checked} onChange={setChecked} size="xs" />
|
|
27
|
+
<Switch checked={checked} onChange={setChecked} size="sm" />
|
|
28
|
+
<Switch checked={checked} onChange={setChecked} size="md" />
|
|
29
|
+
<Switch checked={checked} onChange={setChecked} size="lg" />
|
|
30
|
+
<Switch checked={checked} onChange={setChecked} size="xl" />
|
|
31
31
|
</>
|
|
32
32
|
);
|
|
33
33
|
}
|
|
@@ -38,11 +38,11 @@ export function SwitchIntents() {
|
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
40
|
<>
|
|
41
|
-
<Switch checked={checked}
|
|
42
|
-
<Switch checked={checked}
|
|
43
|
-
<Switch checked={checked}
|
|
44
|
-
<Switch checked={checked}
|
|
45
|
-
<Switch checked={checked}
|
|
41
|
+
<Switch checked={checked} onChange={setChecked} intent="primary" />
|
|
42
|
+
<Switch checked={checked} onChange={setChecked} intent="success" />
|
|
43
|
+
<Switch checked={checked} onChange={setChecked} intent="danger" />
|
|
44
|
+
<Switch checked={checked} onChange={setChecked} intent="warning" />
|
|
45
|
+
<Switch checked={checked} onChange={setChecked} intent="info" />
|
|
46
46
|
</>
|
|
47
47
|
);
|
|
48
48
|
}
|
|
@@ -51,8 +51,8 @@ export function SwitchIntents() {
|
|
|
51
51
|
export function DisabledSwitch() {
|
|
52
52
|
return (
|
|
53
53
|
<>
|
|
54
|
-
<Switch checked={false}
|
|
55
|
-
<Switch checked={true}
|
|
54
|
+
<Switch checked={false} onChange={() => {}} disabled />
|
|
55
|
+
<Switch checked={true} onChange={() => {}} disabled />
|
|
56
56
|
</>
|
|
57
57
|
);
|
|
58
58
|
}
|
|
@@ -63,7 +63,7 @@ export function SwitchWithLabel() {
|
|
|
63
63
|
|
|
64
64
|
return (
|
|
65
65
|
<View spacing="sm" style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
66
|
-
<Switch checked={checked}
|
|
66
|
+
<Switch checked={checked} onChange={setChecked} />
|
|
67
67
|
<Text>Enable notifications</Text>
|
|
68
68
|
</View>
|
|
69
69
|
);
|
|
@@ -79,15 +79,15 @@ export function FormWithSwitches() {
|
|
|
79
79
|
<View spacing="md">
|
|
80
80
|
<View spacing="sm" style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }}>
|
|
81
81
|
<Text>Push Notifications</Text>
|
|
82
|
-
<Switch checked={notifications}
|
|
82
|
+
<Switch checked={notifications} onChange={setNotifications} />
|
|
83
83
|
</View>
|
|
84
84
|
<View spacing="sm" style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }}>
|
|
85
85
|
<Text>Email Updates</Text>
|
|
86
|
-
<Switch checked={emailUpdates}
|
|
86
|
+
<Switch checked={emailUpdates} onChange={setEmailUpdates} />
|
|
87
87
|
</View>
|
|
88
88
|
<View spacing="sm" style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }}>
|
|
89
89
|
<Text>Dark Mode</Text>
|
|
90
|
-
<Switch checked={darkMode}
|
|
90
|
+
<Switch checked={darkMode} onChange={setDarkMode} />
|
|
91
91
|
</View>
|
|
92
92
|
</View>
|
|
93
93
|
);
|