@appdirect/design-system 0.0.10 → 0.0.11
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/README.md +2 -0
- package/dist/ComplexComponents/PageContentHeader/PageContentHeader.tsx +24 -34
- package/dist/ComplexComponents/PageContentHeader/index.ts +0 -2
- package/dist/contracts/PageContentHeader.json +10 -5
- package/dist/contracts/index.json +1 -1
- package/dist/index.ts +3 -4
- package/dist/stories/Buttons/ActionIcon.stories.tsx +159 -0
- package/dist/stories/Buttons/Button.stories.tsx +145 -0
- package/dist/stories/Buttons/CloseButton.stories.tsx +121 -0
- package/dist/stories/Combobox/AutocompleteClearable.stories.tsx +554 -0
- package/dist/stories/Combobox/Combobox.stories.tsx +106 -0
- package/dist/stories/Combobox/Multiselect.stories.tsx +664 -0
- package/dist/stories/Combobox/SearchableSelect.stories.tsx +640 -0
- package/dist/stories/Combobox/Select.stories.tsx +311 -0
- package/dist/stories/ComplexComponents/DashboardWidget/DashboardWidget.stories.tsx +822 -0
- package/dist/stories/ComplexComponents/DataTable/DataTable.stories.tsx +502 -0
- package/dist/stories/ComplexComponents/KeyInsight/KeyInsights.stories.tsx +386 -0
- package/dist/stories/ComplexComponents/NameValue/NameValue.stories.tsx +405 -0
- package/dist/stories/ComplexComponents/PageContentHeader/PageContentHeader.stories.tsx +527 -0
- package/dist/stories/ComplexComponents/Placeholder/Placeholder.stories.tsx +76 -0
- package/dist/stories/ComplexComponents/Slat/Slat.stories.tsx +79 -0
- package/dist/stories/ComplexComponents/Utilities/CopyButton.stories.tsx +479 -0
- package/dist/stories/DataDisplay/Alert.stories.tsx +296 -0
- package/dist/stories/DataDisplay/Avatar.stories.tsx +251 -0
- package/dist/stories/DataDisplay/Badge.stories.tsx +176 -0
- package/dist/stories/DataDisplay/Card.stories.tsx +406 -0
- package/dist/stories/DataDisplay/Chip.stories.tsx +495 -0
- package/dist/stories/DataDisplay/Indicator.stories.tsx +571 -0
- package/dist/stories/DataDisplay/List.stories.tsx +376 -0
- package/dist/stories/DataDisplay/Pill.stories.tsx +506 -0
- package/dist/stories/DataDisplay/Progress.stories.tsx +352 -0
- package/dist/stories/DataDisplay/Table.stories.tsx +346 -0
- package/dist/stories/DataDisplay/ThemeIcon.stories.tsx +125 -0
- package/dist/stories/Inputs/Checkbox.stories.tsx +263 -0
- package/dist/stories/Inputs/ColorInput.stories.tsx +434 -0
- package/dist/stories/Inputs/DropZone.stories.tsx +401 -0
- package/dist/stories/Inputs/FileInput.stories.tsx +383 -0
- package/dist/stories/Inputs/NumberInput.stories.tsx +342 -0
- package/dist/stories/Inputs/Radio.stories.tsx +437 -0
- package/dist/stories/Inputs/RadioGroup.stories.tsx +526 -0
- package/dist/stories/Inputs/SegmentedControl.stories.tsx +60 -0
- package/dist/stories/Inputs/Slider.stories.tsx +22 -0
- package/dist/stories/Inputs/SliderWithLabel.stories.tsx +37 -0
- package/dist/stories/Inputs/Switch.stories.tsx +361 -0
- package/dist/stories/Inputs/TextArea.stories.tsx +355 -0
- package/dist/stories/Inputs/TextInput.stories.tsx +266 -0
- package/dist/stories/Misc/Divider.stories.tsx +581 -0
- package/dist/stories/Misc/Paper.stories.tsx +557 -0
- package/dist/stories/Navigation/Breadcrumb.stories.tsx +489 -0
- package/dist/stories/Navigation/NavLink.stories.tsx +601 -0
- package/dist/stories/Navigation/Stepper.stories.tsx +413 -0
- package/dist/stories/Navigation/Tabs.stories.tsx +528 -0
- package/dist/stories/Overlays/Drawer.stories.tsx +802 -0
- package/dist/stories/Overlays/Menu.stories.tsx +941 -0
- package/dist/stories/Overlays/Modal.stories.tsx +249 -0
- package/dist/stories/Overlays/Popover.stories.tsx +780 -0
- package/dist/stories/Overlays/Tooltip.stories.tsx +52 -0
- package/dist/stories/Typography/Code.stories.tsx +368 -0
- package/dist/stories/Typography/Kbd.stories.tsx +514 -0
- package/dist/stories/Typography/Text.stories.tsx +117 -0
- package/dist/stories/Typography/Title.stories.tsx +112 -0
- package/dist/stories/index.json +1435 -0
- package/package.json +5 -3
- package/dist/ComplexComponents/PageContentHeader/DescriptionBlock.tsx +0 -65
|
@@ -0,0 +1,434 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/nextjs-vite';
|
|
2
|
+
import { Stack } from '@mantine/core';
|
|
3
|
+
import { Inline, ColorInput, Title, Text } from '@appdirect/design-system';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof ColorInput> = {
|
|
7
|
+
title: 'Design System/Inputs/ColorInput',
|
|
8
|
+
component: ColorInput,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'centered',
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component: 'ColorInput component for color selection with consistent design system styling and multiple format support.',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
tags: ['autodocs', 'code-connected'],
|
|
18
|
+
argTypes: {
|
|
19
|
+
size: {
|
|
20
|
+
control: 'select',
|
|
21
|
+
options: ['xs', 'sm', 'md', 'lg', 'xl'],
|
|
22
|
+
description: 'Input size',
|
|
23
|
+
},
|
|
24
|
+
label: {
|
|
25
|
+
control: 'text',
|
|
26
|
+
description: 'Input label',
|
|
27
|
+
},
|
|
28
|
+
placeholder: {
|
|
29
|
+
control: 'text',
|
|
30
|
+
description: 'Placeholder text',
|
|
31
|
+
},
|
|
32
|
+
required: {
|
|
33
|
+
control: 'boolean',
|
|
34
|
+
description: 'Required field (shows asterisk)',
|
|
35
|
+
},
|
|
36
|
+
showOptional: {
|
|
37
|
+
control: 'boolean',
|
|
38
|
+
description: 'Show "(Optional)" text after label',
|
|
39
|
+
},
|
|
40
|
+
disabled: {
|
|
41
|
+
control: 'boolean',
|
|
42
|
+
description: 'Disabled state',
|
|
43
|
+
},
|
|
44
|
+
error: {
|
|
45
|
+
control: 'text',
|
|
46
|
+
description: 'Error message',
|
|
47
|
+
},
|
|
48
|
+
description: {
|
|
49
|
+
control: 'text',
|
|
50
|
+
description: 'Help text below input',
|
|
51
|
+
},
|
|
52
|
+
format: {
|
|
53
|
+
control: 'select',
|
|
54
|
+
options: ['hex', 'rgb', 'rgba', 'hsl', 'hsla'],
|
|
55
|
+
description: 'Color format',
|
|
56
|
+
},
|
|
57
|
+
withPicker: {
|
|
58
|
+
control: 'boolean',
|
|
59
|
+
description: 'Show color picker dropdown',
|
|
60
|
+
},
|
|
61
|
+
withEyeDropper: {
|
|
62
|
+
control: 'boolean',
|
|
63
|
+
description: 'Show eye dropper tool',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export default meta;
|
|
69
|
+
type Story = StoryObj<typeof meta>;
|
|
70
|
+
|
|
71
|
+
export const Default: Story = {
|
|
72
|
+
args: {
|
|
73
|
+
label: 'Color',
|
|
74
|
+
placeholder: 'Pick a color',
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const Sizes: Story = {
|
|
79
|
+
render: () => (
|
|
80
|
+
<Stack gap="md" w={300}>
|
|
81
|
+
<ColorInput size="xs" label="Extra Small" placeholder="Pick color" />
|
|
82
|
+
<ColorInput size="sm" label="Small" placeholder="Pick color" />
|
|
83
|
+
<ColorInput size="md" label="Medium" placeholder="Pick color" />
|
|
84
|
+
<ColorInput size="lg" label="Large" placeholder="Pick color" />
|
|
85
|
+
<ColorInput size="xl" label="Extra Large" placeholder="Pick color" />
|
|
86
|
+
</Stack>
|
|
87
|
+
),
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export const LabelVariants: Story = {
|
|
91
|
+
render: () => (
|
|
92
|
+
<Stack gap="md" w={300}>
|
|
93
|
+
<ColorInput label="Required Color" placeholder="Pick a color" required />
|
|
94
|
+
<ColorInput label="Optional Color" placeholder="Pick a color" showOptional />
|
|
95
|
+
<ColorInput placeholder="No label" />
|
|
96
|
+
</Stack>
|
|
97
|
+
),
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export const States: Story = {
|
|
101
|
+
render: () => (
|
|
102
|
+
<Stack gap="md" w={300}>
|
|
103
|
+
<ColorInput label="Default" placeholder="Pick a color" />
|
|
104
|
+
<ColorInput label="Disabled" placeholder="Disabled input" disabled />
|
|
105
|
+
<ColorInput label="With Error" placeholder="Pick a color" error="Invalid color format" />
|
|
106
|
+
<ColorInput label="With Value" defaultValue="#3b82f6" />
|
|
107
|
+
</Stack>
|
|
108
|
+
),
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export const Formats: Story = {
|
|
112
|
+
render: () => (
|
|
113
|
+
<Stack gap="md" w={350}>
|
|
114
|
+
<ColorInput
|
|
115
|
+
label="HEX Format"
|
|
116
|
+
placeholder="#000000"
|
|
117
|
+
format="hex"
|
|
118
|
+
description="Hexadecimal color format"
|
|
119
|
+
defaultValue="#3b82f6"
|
|
120
|
+
/>
|
|
121
|
+
<ColorInput
|
|
122
|
+
label="RGB Format"
|
|
123
|
+
placeholder="rgb(0, 0, 0)"
|
|
124
|
+
format="rgb"
|
|
125
|
+
description="RGB color format"
|
|
126
|
+
defaultValue="rgb(59, 130, 246)"
|
|
127
|
+
/>
|
|
128
|
+
<ColorInput
|
|
129
|
+
label="RGBA Format"
|
|
130
|
+
placeholder="rgba(0, 0, 0, 1)"
|
|
131
|
+
format="rgba"
|
|
132
|
+
description="RGBA color format with alpha"
|
|
133
|
+
defaultValue="rgba(59, 130, 246, 0.8)"
|
|
134
|
+
/>
|
|
135
|
+
<ColorInput
|
|
136
|
+
label="HSL Format"
|
|
137
|
+
placeholder="hsl(0, 0%, 0%)"
|
|
138
|
+
format="hsl"
|
|
139
|
+
description="HSL color format"
|
|
140
|
+
defaultValue="hsl(217, 91%, 60%)"
|
|
141
|
+
/>
|
|
142
|
+
<ColorInput
|
|
143
|
+
label="HSLA Format"
|
|
144
|
+
placeholder="hsla(0, 0%, 0%, 1)"
|
|
145
|
+
format="hsla"
|
|
146
|
+
description="HSLA color format with alpha"
|
|
147
|
+
defaultValue="hsla(217, 91%, 60%, 0.9)"
|
|
148
|
+
/>
|
|
149
|
+
</Stack>
|
|
150
|
+
),
|
|
151
|
+
parameters: {
|
|
152
|
+
docs: {
|
|
153
|
+
description: {
|
|
154
|
+
story: 'ColorInput with different color formats (HEX, RGB, RGBA, HSL, HSLA).',
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export const WithSwatches: Story = {
|
|
161
|
+
render: () => (
|
|
162
|
+
<Stack gap="md" w={400}>
|
|
163
|
+
<ColorInput
|
|
164
|
+
label="Brand Colors"
|
|
165
|
+
placeholder="Select brand color"
|
|
166
|
+
swatches={[
|
|
167
|
+
'#FF6B6B', '#4ECDC4', '#45B7D1', '#96CEB4', '#FFEAA7',
|
|
168
|
+
'#DDA0DD', '#98D8C8', '#F7DC6F', '#BB8FCE', '#85C1E9'
|
|
169
|
+
]}
|
|
170
|
+
description="Choose from predefined brand colors"
|
|
171
|
+
/>
|
|
172
|
+
<ColorInput
|
|
173
|
+
label="Material Colors"
|
|
174
|
+
placeholder="Select material color"
|
|
175
|
+
swatches={[
|
|
176
|
+
'#f44336', '#e91e63', '#9c27b0', '#673ab7', '#3f51b5',
|
|
177
|
+
'#2196f3', '#03a9f4', '#00bcd4', '#009688', '#4caf50',
|
|
178
|
+
'#8bc34a', '#cddc39', '#ffeb3b', '#ffc107', '#ff9800'
|
|
179
|
+
]}
|
|
180
|
+
description="Material Design color palette"
|
|
181
|
+
/>
|
|
182
|
+
<ColorInput
|
|
183
|
+
label="Grayscale"
|
|
184
|
+
placeholder="Select gray shade"
|
|
185
|
+
swatches={[
|
|
186
|
+
'#000000', '#212121', '#424242', '#616161', '#757575',
|
|
187
|
+
'#9e9e9e', '#bdbdbd', '#e0e0e0', '#eeeeee', '#f5f5f5'
|
|
188
|
+
]}
|
|
189
|
+
description="Grayscale color options"
|
|
190
|
+
/>
|
|
191
|
+
</Stack>
|
|
192
|
+
),
|
|
193
|
+
parameters: {
|
|
194
|
+
docs: {
|
|
195
|
+
description: {
|
|
196
|
+
story: 'ColorInput with predefined color swatches for quick selection.',
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
export const Features: Story = {
|
|
203
|
+
render: () => (
|
|
204
|
+
<Stack gap="md" w={350}>
|
|
205
|
+
<ColorInput
|
|
206
|
+
label="With Color Picker"
|
|
207
|
+
placeholder="Pick a color"
|
|
208
|
+
withPicker={true}
|
|
209
|
+
description="Includes color picker dropdown"
|
|
210
|
+
/>
|
|
211
|
+
<ColorInput
|
|
212
|
+
label="With Eye Dropper"
|
|
213
|
+
placeholder="Pick a color"
|
|
214
|
+
withEyeDropper={true}
|
|
215
|
+
description="Includes eye dropper tool"
|
|
216
|
+
/>
|
|
217
|
+
<ColorInput
|
|
218
|
+
label="Full Featured"
|
|
219
|
+
placeholder="Pick a color"
|
|
220
|
+
withPicker={true}
|
|
221
|
+
withEyeDropper={true}
|
|
222
|
+
swatches={['#FF6B6B', '#4ECDC4', '#45B7D1', '#96CEB4', '#FFEAA7']}
|
|
223
|
+
description="All features enabled"
|
|
224
|
+
/>
|
|
225
|
+
<ColorInput
|
|
226
|
+
label="Input Only"
|
|
227
|
+
placeholder="Enter color manually"
|
|
228
|
+
withPicker={false}
|
|
229
|
+
description="Manual input only, no picker"
|
|
230
|
+
/>
|
|
231
|
+
</Stack>
|
|
232
|
+
),
|
|
233
|
+
parameters: {
|
|
234
|
+
docs: {
|
|
235
|
+
description: {
|
|
236
|
+
story: 'ColorInput with different feature combinations (picker, eye dropper, swatches).',
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
export const ControlledExample: Story = {
|
|
243
|
+
render: () => {
|
|
244
|
+
const [primaryColor, setPrimaryColor] = useState('#3b82f6');
|
|
245
|
+
const [secondaryColor, setSecondaryColor] = useState('#10b981');
|
|
246
|
+
const [accentColor, setAccentColor] = useState('#f59e0b');
|
|
247
|
+
const [backgroundColor, setBackgroundColor] = useState('#f8fafc');
|
|
248
|
+
|
|
249
|
+
return (
|
|
250
|
+
<Stack gap="lg" w={400}>
|
|
251
|
+
<ColorInput
|
|
252
|
+
label="Primary Color"
|
|
253
|
+
value={primaryColor}
|
|
254
|
+
onChange={setPrimaryColor}
|
|
255
|
+
format="hex"
|
|
256
|
+
withPicker
|
|
257
|
+
swatches={['#3b82f6', '#1d4ed8', '#2563eb', '#1e40af']}
|
|
258
|
+
description="Main brand color"
|
|
259
|
+
/>
|
|
260
|
+
|
|
261
|
+
<ColorInput
|
|
262
|
+
label="Secondary Color"
|
|
263
|
+
value={secondaryColor}
|
|
264
|
+
onChange={setSecondaryColor}
|
|
265
|
+
format="hex"
|
|
266
|
+
withPicker
|
|
267
|
+
swatches={['#10b981', '#059669', '#047857', '#065f46']}
|
|
268
|
+
description="Secondary brand color"
|
|
269
|
+
/>
|
|
270
|
+
|
|
271
|
+
<ColorInput
|
|
272
|
+
label="Accent Color"
|
|
273
|
+
value={accentColor}
|
|
274
|
+
onChange={setAccentColor}
|
|
275
|
+
format="hex"
|
|
276
|
+
withPicker
|
|
277
|
+
swatches={['#f59e0b', '#d97706', '#b45309', '#92400e']}
|
|
278
|
+
description="Accent color for highlights"
|
|
279
|
+
/>
|
|
280
|
+
|
|
281
|
+
<ColorInput
|
|
282
|
+
label="Background Color"
|
|
283
|
+
value={backgroundColor}
|
|
284
|
+
onChange={setBackgroundColor}
|
|
285
|
+
format="hex"
|
|
286
|
+
withPicker
|
|
287
|
+
swatches={['#f8fafc', '#f1f5f9', '#e2e8f0', '#cbd5e1']}
|
|
288
|
+
showOptional
|
|
289
|
+
description="Optional background color"
|
|
290
|
+
/>
|
|
291
|
+
|
|
292
|
+
<div style={{
|
|
293
|
+
padding: '16px',
|
|
294
|
+
borderRadius: '8px',
|
|
295
|
+
border: '1px solid var(--mantine-color-gray-3)',
|
|
296
|
+
background: backgroundColor
|
|
297
|
+
}}>
|
|
298
|
+
<Text size="sm" fw={500} mb="xs">Color Preview:</Text>
|
|
299
|
+
<Inline gap="xs" mb="xs">
|
|
300
|
+
<div style={{
|
|
301
|
+
width: 24,
|
|
302
|
+
height: 24,
|
|
303
|
+
backgroundColor: primaryColor,
|
|
304
|
+
borderRadius: '4px',
|
|
305
|
+
border: '1px solid var(--mantine-color-gray-3)'
|
|
306
|
+
}} />
|
|
307
|
+
<Text size="sm">Primary: {primaryColor}</Text>
|
|
308
|
+
</Inline>
|
|
309
|
+
<Inline gap="xs" mb="xs">
|
|
310
|
+
<div style={{
|
|
311
|
+
width: 24,
|
|
312
|
+
height: 24,
|
|
313
|
+
backgroundColor: secondaryColor,
|
|
314
|
+
borderRadius: '4px',
|
|
315
|
+
border: '1px solid var(--mantine-color-gray-3)'
|
|
316
|
+
}} />
|
|
317
|
+
<Text size="sm">Secondary: {secondaryColor}</Text>
|
|
318
|
+
</Inline>
|
|
319
|
+
<Inline gap="xs" mb="xs">
|
|
320
|
+
<div style={{
|
|
321
|
+
width: 24,
|
|
322
|
+
height: 24,
|
|
323
|
+
backgroundColor: accentColor,
|
|
324
|
+
borderRadius: '4px',
|
|
325
|
+
border: '1px solid var(--mantine-color-gray-3)'
|
|
326
|
+
}} />
|
|
327
|
+
<Text size="sm">Accent: {accentColor}</Text>
|
|
328
|
+
</Inline>
|
|
329
|
+
</div>
|
|
330
|
+
</Stack>
|
|
331
|
+
);
|
|
332
|
+
},
|
|
333
|
+
parameters: {
|
|
334
|
+
docs: {
|
|
335
|
+
description: {
|
|
336
|
+
story: 'Example of controlled ColorInput components with live color preview.',
|
|
337
|
+
},
|
|
338
|
+
},
|
|
339
|
+
},
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
export const UseCases: Story = {
|
|
343
|
+
render: () => (
|
|
344
|
+
<Stack gap="lg" w={450}>
|
|
345
|
+
<Title order={3} size="md" fw={500} mb="xs">Common Use Cases</Title>
|
|
346
|
+
|
|
347
|
+
<Stack gap="md">
|
|
348
|
+
<ColorInput
|
|
349
|
+
label="Theme Primary Color"
|
|
350
|
+
placeholder="Select primary color"
|
|
351
|
+
format="hex"
|
|
352
|
+
withPicker
|
|
353
|
+
swatches={[
|
|
354
|
+
'#1976d2', '#388e3c', '#f57c00', '#d32f2f', '#7b1fa2',
|
|
355
|
+
'#0288d1', '#00796b', '#fbc02d', '#c2185b', '#5d4037'
|
|
356
|
+
]}
|
|
357
|
+
description="Primary color for your application theme"
|
|
358
|
+
/>
|
|
359
|
+
|
|
360
|
+
<ColorInput
|
|
361
|
+
label="Text Color"
|
|
362
|
+
placeholder="Select text color"
|
|
363
|
+
format="hex"
|
|
364
|
+
withPicker
|
|
365
|
+
swatches={[
|
|
366
|
+
'#000000', '#212121', '#424242', '#616161', '#757575'
|
|
367
|
+
]}
|
|
368
|
+
description="Color for text elements"
|
|
369
|
+
/>
|
|
370
|
+
|
|
371
|
+
<ColorInput
|
|
372
|
+
label="Background Color"
|
|
373
|
+
placeholder="Select background"
|
|
374
|
+
format="rgba"
|
|
375
|
+
withPicker
|
|
376
|
+
withEyeDropper
|
|
377
|
+
swatches={[
|
|
378
|
+
'rgba(255, 255, 255, 1)', 'rgba(248, 250, 252, 1)',
|
|
379
|
+
'rgba(241, 245, 249, 1)', 'rgba(226, 232, 240, 1)'
|
|
380
|
+
]}
|
|
381
|
+
description="Background color with transparency support"
|
|
382
|
+
/>
|
|
383
|
+
|
|
384
|
+
<ColorInput
|
|
385
|
+
label="Border Color"
|
|
386
|
+
placeholder="Select border color"
|
|
387
|
+
format="hex"
|
|
388
|
+
withPicker
|
|
389
|
+
swatches={[
|
|
390
|
+
'#e2e8f0', '#cbd5e1', '#94a3b8', '#64748b', '#475569'
|
|
391
|
+
]}
|
|
392
|
+
showOptional
|
|
393
|
+
description="Optional border color for components"
|
|
394
|
+
/>
|
|
395
|
+
|
|
396
|
+
<ColorInput
|
|
397
|
+
label="Highlight Color"
|
|
398
|
+
placeholder="Select highlight color"
|
|
399
|
+
format="hex"
|
|
400
|
+
withPicker
|
|
401
|
+
swatches={[
|
|
402
|
+
'#fef3c7', '#fde68a', '#fcd34d', '#f59e0b', '#d97706'
|
|
403
|
+
]}
|
|
404
|
+
description="Color for highlighting important elements"
|
|
405
|
+
/>
|
|
406
|
+
</Stack>
|
|
407
|
+
</Stack>
|
|
408
|
+
),
|
|
409
|
+
parameters: {
|
|
410
|
+
docs: {
|
|
411
|
+
description: {
|
|
412
|
+
story: 'Real-world examples of ColorInput usage in different application contexts.',
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
},
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
export const Interactive: Story = {
|
|
419
|
+
args: {
|
|
420
|
+
label: 'Interactive ColorInput',
|
|
421
|
+
placeholder: 'Pick a color...',
|
|
422
|
+
size: 'md',
|
|
423
|
+
format: 'hex',
|
|
424
|
+
withPicker: true,
|
|
425
|
+
withEyeDropper: false,
|
|
426
|
+
},
|
|
427
|
+
parameters: {
|
|
428
|
+
docs: {
|
|
429
|
+
description: {
|
|
430
|
+
story: 'Use the controls below to interact with the ColorInput and see different combinations.',
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
},
|
|
434
|
+
};
|