@app-studio/web 0.9.83 → 0.9.85
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/components/Button/Button/Button.view.d.ts +1 -1
- package/dist/components/Formik/Formik.ColorInput.d.ts +1 -1
- package/dist/components/Gradient/Gradient.d.ts +4 -4
- package/dist/components/Title/Title/Title.props.d.ts +3 -3
- package/dist/components/Title/Title/Title.type.d.ts +1 -1
- package/dist/web.cjs.development.js +755 -784
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +755 -784
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +755 -784
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/docs/app-studio/Components.md +8 -8
- package/docs/app-studio/Design.md +2 -2
- package/docs/app-studio/Events.md +31 -31
- package/docs/app-studio/Hooks.md +6 -6
- package/docs/app-studio/Providers.md +2 -2
- package/docs/app-studio/README.md +30 -30
- package/docs/app-studio/Responsive.md +3 -3
- package/docs/app-studio/Theming.md +114 -113
- package/docs/app-studio.md +2 -2
- package/docs/component-development/guide.md +10 -10
- package/docs/components/Background.mdx +2 -2
- package/docs/components/Badge.mdx +1 -1
- package/docs/components/Button.mdx +2 -2
- package/docs/components/Carousel.mdx +15 -15
- package/docs/components/Center.mdx +40 -40
- package/docs/components/Checkbox.mdx +5 -5
- package/docs/components/ColorInput.mdx +13 -13
- package/docs/components/ColorPicker.mdx +17 -17
- package/docs/components/ContextMenu.mdx +1 -1
- package/docs/components/DatePicker.mdx +6 -6
- package/docs/components/DragAndDrop.mdx +8 -8
- package/docs/components/Drawer.mdx +3 -3
- package/docs/components/Form.mdx +2 -2
- package/docs/components/Formik.mdx +3 -3
- package/docs/components/Gradient.mdx +32 -32
- package/docs/components/Horizontal.mdx +3 -3
- package/docs/components/HoverCard.mdx +3 -3
- package/docs/components/Icon.mdx +14 -14
- package/docs/components/Label.mdx +28 -28
- package/docs/components/Link.mdx +2 -2
- package/docs/components/Loader.mdx +16 -16
- package/docs/components/OTPInput.mdx +9 -9
- package/docs/components/Password.mdx +1 -1
- package/docs/components/ProgressBar.mdx +9 -9
- package/docs/components/Resizable.mdx +6 -6
- package/docs/components/Selector.mdx +4 -4
- package/docs/components/Sidebar.mdx +2 -2
- package/docs/components/Slider.mdx +10 -10
- package/docs/components/StatusIndicator.mdx +5 -5
- package/docs/components/Switch.mdx +1 -1
- package/docs/components/TagInput.mdx +8 -8
- package/docs/components/Text.mdx +1 -1
- package/docs/components/TextArea.mdx +2 -2
- package/docs/components/TextField.mdx +2 -2
- package/docs/components/Title.mdx +1 -1
- package/docs/components/Vertical.mdx +64 -64
- package/docs/components.md +4 -4
- package/docs/conventions.md +1 -1
- package/docs/design-system/theming.md +19 -19
- package/docs/tutorials/README.md +1 -1
- package/docs/tutorials/basic/creating-a-simple-form.md +2 -2
- package/package.json +2 -2
|
@@ -16,7 +16,7 @@ import { Center } from '@app-studio/web';
|
|
|
16
16
|
import { Text } from '@app-studio/web';
|
|
17
17
|
|
|
18
18
|
export const BasicCenter = () => (
|
|
19
|
-
<Center height={200} backgroundColor="color
|
|
19
|
+
<Center height={200} backgroundColor="color-gray-100">
|
|
20
20
|
<Text fontSize={18} fontWeight="bold">
|
|
21
21
|
Centered Content
|
|
22
22
|
</Text>
|
|
@@ -32,10 +32,10 @@ import { Loader } from '@app-studio/web';
|
|
|
32
32
|
import { Text, Vertical } from '@app-studio/web';
|
|
33
33
|
|
|
34
34
|
export const LoadingCenter = () => (
|
|
35
|
-
<Center height="100vh" backgroundColor="color
|
|
35
|
+
<Center height="100vh" backgroundColor="color-white">
|
|
36
36
|
<Vertical gap={16} alignItems="center">
|
|
37
37
|
<Loader size="lg" />
|
|
38
|
-
<Text color="color
|
|
38
|
+
<Text color="color-gray-600">Loading...</Text>
|
|
39
39
|
</Vertical>
|
|
40
40
|
</Center>
|
|
41
41
|
);
|
|
@@ -50,18 +50,18 @@ import { Text, Vertical } from '@app-studio/web';
|
|
|
50
50
|
import { EmptyIcon } from '@app-studio/web';
|
|
51
51
|
|
|
52
52
|
export const EmptyStateCenter = () => (
|
|
53
|
-
<Center height={400} backgroundColor="color
|
|
53
|
+
<Center height={400} backgroundColor="color-gray.50" borderRadius={12}>
|
|
54
54
|
<Vertical gap={20} alignItems="center" textAlign="center">
|
|
55
|
-
<EmptyIcon widthHeight={64} color="color
|
|
55
|
+
<EmptyIcon widthHeight={64} color="color-gray-400" />
|
|
56
56
|
<Vertical gap={8} alignItems="center">
|
|
57
|
-
<Text fontSize={20} fontWeight="bold" color="color
|
|
57
|
+
<Text fontSize={20} fontWeight="bold" color="color-gray-700">
|
|
58
58
|
No items found
|
|
59
59
|
</Text>
|
|
60
|
-
<Text color="color
|
|
60
|
+
<Text color="color-gray-500" maxWidth={300}>
|
|
61
61
|
There are no items to display. Create your first item to get started.
|
|
62
62
|
</Text>
|
|
63
63
|
</Vertical>
|
|
64
|
-
<Button variant="filled" colorScheme="theme
|
|
64
|
+
<Button variant="filled" colorScheme="theme-primary">
|
|
65
65
|
Create Item
|
|
66
66
|
</Button>
|
|
67
67
|
</Vertical>
|
|
@@ -91,7 +91,7 @@ export const ModalCenter = () => {
|
|
|
91
91
|
<Text fontSize={24} fontWeight="bold">
|
|
92
92
|
Confirm Action
|
|
93
93
|
</Text>
|
|
94
|
-
<Text color="color
|
|
94
|
+
<Text color="color-gray-600" maxWidth={300}>
|
|
95
95
|
Are you sure you want to delete this item? This action cannot be undone.
|
|
96
96
|
</Text>
|
|
97
97
|
<Horizontal gap={12}>
|
|
@@ -103,7 +103,7 @@ export const ModalCenter = () => {
|
|
|
103
103
|
</Button>
|
|
104
104
|
<Button
|
|
105
105
|
variant="filled"
|
|
106
|
-
colorScheme="theme
|
|
106
|
+
colorScheme="theme-error"
|
|
107
107
|
onClick={() => setIsOpen(false)}
|
|
108
108
|
>
|
|
109
109
|
Delete
|
|
@@ -128,7 +128,7 @@ export const HeroCenter = () => (
|
|
|
128
128
|
<Center
|
|
129
129
|
height="100vh"
|
|
130
130
|
backgroundImage="linear-gradient(135deg, #667eea 0%, #764ba2 100%)"
|
|
131
|
-
color="color
|
|
131
|
+
color="color-white"
|
|
132
132
|
>
|
|
133
133
|
<Vertical gap={32} alignItems="center" textAlign="center" maxWidth={600}>
|
|
134
134
|
<Vertical gap={16} alignItems="center">
|
|
@@ -145,16 +145,16 @@ export const HeroCenter = () => (
|
|
|
145
145
|
<Button
|
|
146
146
|
variant="filled"
|
|
147
147
|
size="lg"
|
|
148
|
-
backgroundColor="color
|
|
149
|
-
color="color
|
|
148
|
+
backgroundColor="color-white"
|
|
149
|
+
color="color-gray-900"
|
|
150
150
|
>
|
|
151
151
|
Get Started
|
|
152
152
|
</Button>
|
|
153
153
|
<Button
|
|
154
154
|
variant="outline"
|
|
155
155
|
size="lg"
|
|
156
|
-
borderColor="color
|
|
157
|
-
color="color
|
|
156
|
+
borderColor="color-white"
|
|
157
|
+
color="color-white"
|
|
158
158
|
>
|
|
159
159
|
Learn More
|
|
160
160
|
</Button>
|
|
@@ -176,18 +176,18 @@ export const CardCenter = () => (
|
|
|
176
176
|
width={300}
|
|
177
177
|
height={200}
|
|
178
178
|
border="1px solid"
|
|
179
|
-
borderColor="color
|
|
179
|
+
borderColor="color-gray-200"
|
|
180
180
|
borderRadius={12}
|
|
181
|
-
backgroundColor="color
|
|
181
|
+
backgroundColor="color-white"
|
|
182
182
|
boxShadow="0 4px 12px rgba(0,0,0,0.1)"
|
|
183
183
|
>
|
|
184
184
|
<Center height="100%">
|
|
185
185
|
<Vertical gap={12} alignItems="center">
|
|
186
|
-
<StarIcon widthHeight={32} color="color
|
|
186
|
+
<StarIcon widthHeight={32} color="color-yellow-500" filled />
|
|
187
187
|
<Text fontSize={18} fontWeight="bold">
|
|
188
188
|
Premium Feature
|
|
189
189
|
</Text>
|
|
190
|
-
<Text color="color
|
|
190
|
+
<Text color="color-gray-600" textAlign="center" fontSize={14}>
|
|
191
191
|
Unlock advanced features with our premium plan
|
|
192
192
|
</Text>
|
|
193
193
|
</Vertical>
|
|
@@ -238,7 +238,7 @@ export const ResponsiveCenter = () => (
|
|
|
238
238
|
</Text>
|
|
239
239
|
<Text
|
|
240
240
|
fontSize={{ mobile: 14, tablet: 16, desktop: 18 }}
|
|
241
|
-
color="color
|
|
241
|
+
color="color-gray-600"
|
|
242
242
|
>
|
|
243
243
|
This content adapts to different screen sizes
|
|
244
244
|
</Text>
|
|
@@ -258,19 +258,19 @@ export const CenterWithGap = () => (
|
|
|
258
258
|
<View
|
|
259
259
|
width={60}
|
|
260
260
|
height={60}
|
|
261
|
-
backgroundColor="color
|
|
261
|
+
backgroundColor="color-red-400"
|
|
262
262
|
borderRadius={8}
|
|
263
263
|
/>
|
|
264
264
|
<View
|
|
265
265
|
width={60}
|
|
266
266
|
height={60}
|
|
267
|
-
backgroundColor="color
|
|
267
|
+
backgroundColor="color-blue-400"
|
|
268
268
|
borderRadius={8}
|
|
269
269
|
/>
|
|
270
270
|
<View
|
|
271
271
|
width={60}
|
|
272
272
|
height={60}
|
|
273
|
-
backgroundColor="color
|
|
273
|
+
backgroundColor="color-green-400"
|
|
274
274
|
borderRadius={8}
|
|
275
275
|
/>
|
|
276
276
|
</Center>
|
|
@@ -288,25 +288,25 @@ import { ErrorIcon } from '@app-studio/web';
|
|
|
288
288
|
export const ErrorStateCenter = () => (
|
|
289
289
|
<Center
|
|
290
290
|
height={400}
|
|
291
|
-
backgroundColor="color
|
|
291
|
+
backgroundColor="color-red.50"
|
|
292
292
|
borderRadius={12}
|
|
293
293
|
border="1px solid"
|
|
294
|
-
borderColor="color
|
|
294
|
+
borderColor="color-red-200"
|
|
295
295
|
>
|
|
296
296
|
<Vertical gap={20} alignItems="center" textAlign="center">
|
|
297
|
-
<ErrorIcon widthHeight={48} color="color
|
|
297
|
+
<ErrorIcon widthHeight={48} color="color-red-500" />
|
|
298
298
|
<Vertical gap={8} alignItems="center">
|
|
299
|
-
<Text fontSize={18} fontWeight="bold" color="color
|
|
299
|
+
<Text fontSize={18} fontWeight="bold" color="color-red-700">
|
|
300
300
|
Something went wrong
|
|
301
301
|
</Text>
|
|
302
|
-
<Text color="color
|
|
302
|
+
<Text color="color-red-600" maxWidth={300}>
|
|
303
303
|
We encountered an error while processing your request.
|
|
304
304
|
Please try again or contact support.
|
|
305
305
|
</Text>
|
|
306
306
|
</Vertical>
|
|
307
307
|
<Button
|
|
308
308
|
variant="filled"
|
|
309
|
-
colorScheme="theme
|
|
309
|
+
colorScheme="theme-error"
|
|
310
310
|
onClick={() => window.location.reload()}
|
|
311
311
|
>
|
|
312
312
|
Try Again
|
|
@@ -327,19 +327,19 @@ export const ImagePlaceholder = () => (
|
|
|
327
327
|
<Center
|
|
328
328
|
width={300}
|
|
329
329
|
height={200}
|
|
330
|
-
backgroundColor="color
|
|
330
|
+
backgroundColor="color-gray-100"
|
|
331
331
|
border="2px dashed"
|
|
332
|
-
borderColor="color
|
|
332
|
+
borderColor="color-gray-300"
|
|
333
333
|
borderRadius={8}
|
|
334
334
|
cursor="pointer"
|
|
335
335
|
_hover={{
|
|
336
|
-
backgroundColor: 'color
|
|
337
|
-
borderColor: 'color
|
|
336
|
+
backgroundColor: 'color-gray-200',
|
|
337
|
+
borderColor: 'color-gray-400',
|
|
338
338
|
}}
|
|
339
339
|
>
|
|
340
340
|
<Vertical gap={8} alignItems="center">
|
|
341
|
-
<ImageIcon widthHeight={32} color="color
|
|
342
|
-
<Text color="color
|
|
341
|
+
<ImageIcon widthHeight={32} color="color-gray-500" />
|
|
342
|
+
<Text color="color-gray-600" fontSize={14}>
|
|
343
343
|
Click to upload image
|
|
344
344
|
</Text>
|
|
345
345
|
</Vertical>
|
|
@@ -378,28 +378,28 @@ export const ImagePlaceholder = () => (
|
|
|
378
378
|
|
|
379
379
|
**Splash Screen:**
|
|
380
380
|
```tsx
|
|
381
|
-
<Center height="100vh" backgroundColor="theme
|
|
381
|
+
<Center height="100vh" backgroundColor="theme-primary">
|
|
382
382
|
<Vertical gap={24} alignItems="center">
|
|
383
383
|
<Logo size="lg" />
|
|
384
|
-
<Loader color="color
|
|
384
|
+
<Loader color="color-white" />
|
|
385
385
|
</Vertical>
|
|
386
386
|
</Center>
|
|
387
387
|
```
|
|
388
388
|
|
|
389
389
|
**Feature Highlight:**
|
|
390
390
|
```tsx
|
|
391
|
-
<Center height={300} backgroundColor="color
|
|
391
|
+
<Center height={300} backgroundColor="color-blue.50">
|
|
392
392
|
<Vertical gap={16} alignItems="center" textAlign="center">
|
|
393
393
|
<FeatureIcon widthHeight={48} />
|
|
394
394
|
<Text fontSize={20} fontWeight="bold">Feature Name</Text>
|
|
395
|
-
<Text color="color
|
|
395
|
+
<Text color="color-gray-600">Feature description</Text>
|
|
396
396
|
</Vertical>
|
|
397
397
|
</Center>
|
|
398
398
|
```
|
|
399
399
|
|
|
400
400
|
**Call to Action:**
|
|
401
401
|
```tsx
|
|
402
|
-
<Center padding={40} backgroundColor="color
|
|
402
|
+
<Center padding={40} backgroundColor="color-gray-900" color="color-white">
|
|
403
403
|
<Vertical gap={20} alignItems="center" textAlign="center">
|
|
404
404
|
<Text fontSize={24} fontWeight="bold">Ready to get started?</Text>
|
|
405
405
|
<Button variant="filled" size="lg">Get Started Now</Button>
|
|
@@ -27,11 +27,11 @@ import { Vertical, Checkbox } from '@app-studio/web';
|
|
|
27
27
|
export const ColorCheckbox = () => (
|
|
28
28
|
<Vertical gap={15}>
|
|
29
29
|
{[
|
|
30
|
-
'theme
|
|
31
|
-
'theme
|
|
32
|
-
'theme
|
|
33
|
-
'theme
|
|
34
|
-
'theme
|
|
30
|
+
'theme-primary',
|
|
31
|
+
'theme-secondary',
|
|
32
|
+
'theme-error',
|
|
33
|
+
'theme-success',
|
|
34
|
+
'theme-warning',
|
|
35
35
|
].map((color) => (
|
|
36
36
|
<Checkbox
|
|
37
37
|
key={color}
|
|
@@ -15,7 +15,7 @@ import React, { useState } from 'react';
|
|
|
15
15
|
import { ColorInput } from '@app-studio/web';
|
|
16
16
|
|
|
17
17
|
export const BasicColorInput = () => {
|
|
18
|
-
const [color, setColor] = useState('color
|
|
18
|
+
const [color, setColor] = useState('color-blue-500');
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
21
|
<ColorInput
|
|
@@ -43,19 +43,19 @@ export const ColorInputVariants = () => {
|
|
|
43
43
|
<ColorInput
|
|
44
44
|
label="Default Variant"
|
|
45
45
|
variant="default"
|
|
46
|
-
defaultValue="color
|
|
46
|
+
defaultValue="color-blue-500"
|
|
47
47
|
/>
|
|
48
48
|
|
|
49
49
|
<ColorInput
|
|
50
50
|
label="Outline Variant"
|
|
51
51
|
variant="outline"
|
|
52
|
-
defaultValue="color
|
|
52
|
+
defaultValue="color-green-500"
|
|
53
53
|
/>
|
|
54
54
|
|
|
55
55
|
<ColorInput
|
|
56
56
|
label="None Variant"
|
|
57
57
|
variant="none"
|
|
58
|
-
defaultValue="color
|
|
58
|
+
defaultValue="color-purple-500"
|
|
59
59
|
/>
|
|
60
60
|
</Vertical>
|
|
61
61
|
);
|
|
@@ -73,11 +73,11 @@ import { ColorInput } from '@app-studio/web';
|
|
|
73
73
|
export const ColorInputSizes = () => {
|
|
74
74
|
return (
|
|
75
75
|
<Vertical gap={16} width="300px">
|
|
76
|
-
<ColorInput label="Extra Small" size="xs" defaultValue="color
|
|
77
|
-
<ColorInput label="Small" size="sm" defaultValue="color
|
|
78
|
-
<ColorInput label="Medium" size="md" defaultValue="color
|
|
79
|
-
<ColorInput label="Large" size="lg" defaultValue="color
|
|
80
|
-
<ColorInput label="Extra Large" size="xl" defaultValue="color
|
|
76
|
+
<ColorInput label="Extra Small" size="xs" defaultValue="color-red-500" />
|
|
77
|
+
<ColorInput label="Small" size="sm" defaultValue="color-orange-500" />
|
|
78
|
+
<ColorInput label="Medium" size="md" defaultValue="color-yellow-500" />
|
|
79
|
+
<ColorInput label="Large" size="lg" defaultValue="color-green-500" />
|
|
80
|
+
<ColorInput label="Extra Large" size="xl" defaultValue="color-blue-500" />
|
|
81
81
|
</Vertical>
|
|
82
82
|
);
|
|
83
83
|
};
|
|
@@ -125,8 +125,8 @@ import { Button } from '@app-studio/web';
|
|
|
125
125
|
import { Text } from '@app-studio/web';
|
|
126
126
|
|
|
127
127
|
export const ColorInputForm = () => {
|
|
128
|
-
const [backgroundColor, setBackgroundColor] = useState('color
|
|
129
|
-
const [textColor, setTextColor] = useState('color
|
|
128
|
+
const [backgroundColor, setBackgroundColor] = useState('color-blue-500');
|
|
129
|
+
const [textColor, setTextColor] = useState('color-white');
|
|
130
130
|
|
|
131
131
|
const handleSubmit = (e) => {
|
|
132
132
|
e.preventDefault();
|
|
@@ -172,8 +172,8 @@ export const ColorInputForm = () => {
|
|
|
172
172
|
type="button"
|
|
173
173
|
variant="outline"
|
|
174
174
|
onClick={() => {
|
|
175
|
-
setBackgroundColor('color
|
|
176
|
-
setTextColor('color
|
|
175
|
+
setBackgroundColor('color-blue-500');
|
|
176
|
+
setTextColor('color-white');
|
|
177
177
|
}}
|
|
178
178
|
>
|
|
179
179
|
Reset
|
|
@@ -52,7 +52,7 @@ import { ColorPicker } from '@app-studio/web';
|
|
|
52
52
|
|
|
53
53
|
export const DefaultValueColorPicker = () => (
|
|
54
54
|
<ColorPicker
|
|
55
|
-
defaultValue="color
|
|
55
|
+
defaultValue="color-emerald-500"
|
|
56
56
|
onChange={(color) => console.log(color)}
|
|
57
57
|
/>
|
|
58
58
|
);
|
|
@@ -69,11 +69,11 @@ import { ColorPicker } from '@app-studio/web';
|
|
|
69
69
|
|
|
70
70
|
export const PredefinedColorPicker = () => {
|
|
71
71
|
const colors = [
|
|
72
|
-
{ color: 'color
|
|
73
|
-
{ color: 'color
|
|
74
|
-
{ color: 'color
|
|
75
|
-
{ color: 'color
|
|
76
|
-
{ color: 'color
|
|
72
|
+
{ color: 'color-red-500', label: 'Red' },
|
|
73
|
+
{ color: 'color-blue-500', label: 'Blue' },
|
|
74
|
+
{ color: 'color-emerald-500', label: 'Green' },
|
|
75
|
+
{ color: 'color-amber-500', label: 'Orange' },
|
|
76
|
+
{ color: 'color-violet-500', label: 'Purple' },
|
|
77
77
|
];
|
|
78
78
|
|
|
79
79
|
return (
|
|
@@ -170,7 +170,7 @@ export const ColorFormatPickers = () => (
|
|
|
170
170
|
```
|
|
171
171
|
|
|
172
172
|
### **closeOnSelect**
|
|
173
|
-
Whether to close the dropdown after selecting a color
|
|
173
|
+
Whether to close the dropdown after selecting a color-
|
|
174
174
|
|
|
175
175
|
- **Type:** `boolean`
|
|
176
176
|
- **Default:** `true`
|
|
@@ -200,7 +200,7 @@ import { ColorPicker } from '@app-studio/web';
|
|
|
200
200
|
export const DisabledColorPicker = () => (
|
|
201
201
|
<ColorPicker
|
|
202
202
|
isDisabled
|
|
203
|
-
value="color
|
|
203
|
+
value="color-blue-500"
|
|
204
204
|
onChange={(color) => console.log(color)}
|
|
205
205
|
/>
|
|
206
206
|
);
|
|
@@ -219,7 +219,7 @@ import { ColorPicker } from '@app-studio/web';
|
|
|
219
219
|
export const ReadOnlyColorPicker = () => (
|
|
220
220
|
<ColorPicker
|
|
221
221
|
isReadOnly
|
|
222
|
-
value="color
|
|
222
|
+
value="color-blue-500"
|
|
223
223
|
onChange={(color) => console.log(color)}
|
|
224
224
|
/>
|
|
225
225
|
);
|
|
@@ -385,10 +385,10 @@ export const StyledColorPicker = () => (
|
|
|
385
385
|
views={{
|
|
386
386
|
trigger: {
|
|
387
387
|
borderWidth: 2,
|
|
388
|
-
borderColor: 'color
|
|
388
|
+
borderColor: 'color-blue-500',
|
|
389
389
|
},
|
|
390
390
|
dropdown: {
|
|
391
|
-
backgroundColor: 'color
|
|
391
|
+
backgroundColor: 'color-coolGray.50',
|
|
392
392
|
padding: 20,
|
|
393
393
|
},
|
|
394
394
|
colorSwatch: {
|
|
@@ -411,12 +411,12 @@ export const CompleteColorPicker = () => {
|
|
|
411
411
|
const [color, setColor] = useState('#3b82f6');
|
|
412
412
|
|
|
413
413
|
const predefinedColors = [
|
|
414
|
-
{ color: 'color
|
|
415
|
-
{ color: 'color
|
|
416
|
-
{ color: 'color
|
|
417
|
-
{ color: 'color
|
|
418
|
-
{ color: 'color
|
|
419
|
-
{ color: 'color
|
|
414
|
+
{ color: 'color-red-500', label: 'Red' },
|
|
415
|
+
{ color: 'color-blue-500', label: 'Blue' },
|
|
416
|
+
{ color: 'color-emerald-500', label: 'Green' },
|
|
417
|
+
{ color: 'color-amber-500', label: 'Orange' },
|
|
418
|
+
{ color: 'color-violet-500', label: 'Purple' },
|
|
419
|
+
{ color: 'color-pink-500', label: 'Pink' },
|
|
420
420
|
];
|
|
421
421
|
|
|
422
422
|
return (
|
|
@@ -28,11 +28,11 @@ import { DatePicker } from '@app-studio/web';
|
|
|
28
28
|
export const ColorDatePicker = () => (
|
|
29
29
|
<Vertical gap={15}>
|
|
30
30
|
{[
|
|
31
|
-
'theme
|
|
32
|
-
'theme
|
|
33
|
-
'theme
|
|
34
|
-
'theme
|
|
35
|
-
'theme
|
|
31
|
+
'theme-primary',
|
|
32
|
+
'theme-secondary',
|
|
33
|
+
'theme-error',
|
|
34
|
+
'theme-success',
|
|
35
|
+
'theme-warning',
|
|
36
36
|
].map((color) => (
|
|
37
37
|
<DatePicker
|
|
38
38
|
key={color}
|
|
@@ -68,7 +68,7 @@ export const ShadowDatePicker = () => (
|
|
|
68
68
|
| Prop | Type | Description | Default |
|
|
69
69
|
| ------------ | ------------- | ------------------------------------------------------------------------ | ----------- |
|
|
70
70
|
| label | string | The label text for the date picker. | |
|
|
71
|
-
| colorScheme | string | The color scheme that changes the background color
|
|
71
|
+
| colorScheme | string | The color scheme that changes the background color- | |
|
|
72
72
|
| shadow | Shadow/Elevation | Adds a shadow effect to the DatePicker. | |
|
|
73
73
|
| styles | CSSProperties | Optional custom styles for the DatePicker (container, input, calendar). | |
|
|
74
74
|
| className | string | Optional className for the DatePicker container. | |
|
|
@@ -115,7 +115,7 @@ export const CustomRenderDragAndDrop = () => {
|
|
|
115
115
|
gap={10}
|
|
116
116
|
alignItems="center"
|
|
117
117
|
padding={12}
|
|
118
|
-
backgroundColor={item.completed ? 'color
|
|
118
|
+
backgroundColor={item.completed ? 'color-emerald-100' : 'color-red-100'}
|
|
119
119
|
borderRadius={8}
|
|
120
120
|
>
|
|
121
121
|
<Text fontWeight="bold">#{index + 1}</Text>
|
|
@@ -147,7 +147,7 @@ export const ContainerPropsDragAndDrop = () => {
|
|
|
147
147
|
onChange={setItems}
|
|
148
148
|
renderItem={(item) => <Text>{item}</Text>}
|
|
149
149
|
containerProps={{
|
|
150
|
-
backgroundColor: 'color
|
|
150
|
+
backgroundColor: 'color-coolGray-100',
|
|
151
151
|
padding: 20,
|
|
152
152
|
borderRadius: 12,
|
|
153
153
|
gap: 10,
|
|
@@ -207,12 +207,12 @@ export const StyledDragAndDrop = () => {
|
|
|
207
207
|
renderItem={(item) => <Text>{item}</Text>}
|
|
208
208
|
views={{
|
|
209
209
|
container: {
|
|
210
|
-
backgroundColor: 'color
|
|
210
|
+
backgroundColor: 'color-coolGray-800',
|
|
211
211
|
padding: 20,
|
|
212
212
|
borderRadius: 16,
|
|
213
213
|
},
|
|
214
214
|
item: {
|
|
215
|
-
backgroundColor: 'color
|
|
215
|
+
backgroundColor: 'color-coolGray-700',
|
|
216
216
|
color: 'white',
|
|
217
217
|
padding: 16,
|
|
218
218
|
borderRadius: 8,
|
|
@@ -266,9 +266,9 @@ export const TaskListDragAndDrop = () => {
|
|
|
266
266
|
]);
|
|
267
267
|
|
|
268
268
|
const priorityColors = {
|
|
269
|
-
high: 'color
|
|
270
|
-
medium: 'color
|
|
271
|
-
low: 'color
|
|
269
|
+
high: 'color-red-500',
|
|
270
|
+
medium: 'color-amber-500',
|
|
271
|
+
low: 'color-emerald-500',
|
|
272
272
|
};
|
|
273
273
|
|
|
274
274
|
return (
|
|
@@ -298,7 +298,7 @@ export const TaskListDragAndDrop = () => {
|
|
|
298
298
|
{task.priority}
|
|
299
299
|
</Text>
|
|
300
300
|
</Horizontal>
|
|
301
|
-
<Text fontSize={14} color="color
|
|
301
|
+
<Text fontSize={14} color="color-coolGray-500">
|
|
302
302
|
{task.description}
|
|
303
303
|
</Text>
|
|
304
304
|
</Vertical>
|
|
@@ -434,15 +434,15 @@ export const DetailsDrawer = () => {
|
|
|
434
434
|
<Drawer.Body>
|
|
435
435
|
<Vertical gap={20}>
|
|
436
436
|
<div>
|
|
437
|
-
<Text fontSize={14} color="color
|
|
437
|
+
<Text fontSize={14} color="color-coolGray-500">Name</Text>
|
|
438
438
|
<Text fontSize={16}>Premium Widget</Text>
|
|
439
439
|
</div>
|
|
440
440
|
<div>
|
|
441
|
-
<Text fontSize={14} color="color
|
|
441
|
+
<Text fontSize={14} color="color-coolGray-500">Price</Text>
|
|
442
442
|
<Text fontSize={16}>$99.99</Text>
|
|
443
443
|
</div>
|
|
444
444
|
<div>
|
|
445
|
-
<Text fontSize={14} color="color
|
|
445
|
+
<Text fontSize={14} color="color-coolGray-500">Description</Text>
|
|
446
446
|
<Text fontSize={16}>
|
|
447
447
|
A high-quality widget with advanced features
|
|
448
448
|
and premium materials.
|
package/docs/components/Form.mdx
CHANGED
|
@@ -402,7 +402,7 @@ export const DynamicForm = () => {
|
|
|
402
402
|
gap={12}
|
|
403
403
|
padding={16}
|
|
404
404
|
border="1px solid"
|
|
405
|
-
borderColor="color
|
|
405
|
+
borderColor="color-gray-200"
|
|
406
406
|
borderRadius={8}
|
|
407
407
|
>
|
|
408
408
|
<Horizontal justifyContent="space-between" alignItems="center">
|
|
@@ -414,7 +414,7 @@ export const DynamicForm = () => {
|
|
|
414
414
|
onClick={() => remove(index)}
|
|
415
415
|
variant="ghost"
|
|
416
416
|
size="sm"
|
|
417
|
-
colorScheme="theme
|
|
417
|
+
colorScheme="theme-error"
|
|
418
418
|
>
|
|
419
419
|
Remove
|
|
420
420
|
</Button>
|
|
@@ -245,7 +245,7 @@ export const FormikChatInputExample = () => {
|
|
|
245
245
|
<Text
|
|
246
246
|
key={index}
|
|
247
247
|
padding={8}
|
|
248
|
-
backgroundColor="color
|
|
248
|
+
backgroundColor="color-gray-100"
|
|
249
249
|
borderRadius={8}
|
|
250
250
|
>
|
|
251
251
|
{msg}
|
|
@@ -297,8 +297,8 @@ export const FormikColorInputExample = () => {
|
|
|
297
297
|
return (
|
|
298
298
|
<Formik
|
|
299
299
|
initialValues={{
|
|
300
|
-
backgroundColor: 'color
|
|
301
|
-
textColor: 'color
|
|
300
|
+
backgroundColor: 'color-blue-500',
|
|
301
|
+
textColor: 'color-white'
|
|
302
302
|
}}
|
|
303
303
|
validationSchema={Yup.object({
|
|
304
304
|
backgroundColor: Yup.string().required('Background color is required'),
|