@donotdev/cli 0.0.19 → 0.0.20
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/dependencies-matrix.json +135 -47
- package/dist/bin/commands/bump.js +5 -2
- package/dist/bin/commands/create-app.js +1 -1
- package/dist/bin/commands/create-project.js +13 -2
- package/dist/bin/commands/deploy.js +18 -0
- package/dist/bin/commands/setup.js +3 -0
- package/dist/bin/commands/staging.js +18 -0
- package/dist/bin/commands/type-check.js +10 -4
- package/dist/bin/dndev.js +120 -179
- package/dist/bin/donotdev.js +120 -179
- package/dist/index.js +31 -2
- package/package.json +1 -1
- package/templates/app-demo/public/apple-touch-icon.png.example +0 -0
- package/templates/app-demo/public/favicon.svg.example +1 -0
- package/templates/app-demo/public/icon-192x192.png.example +0 -0
- package/templates/app-demo/public/icon-512x512.png.example +0 -0
- package/templates/app-demo/src/App.tsx.example +3 -1
- package/templates/app-demo/src/config/app.ts.example +1 -0
- package/templates/app-demo/src/entities/booking.ts.example +75 -0
- package/templates/app-demo/src/entities/onboarding.ts.example +160 -0
- package/templates/app-demo/src/entities/product.ts.example +12 -0
- package/templates/app-demo/src/entities/quote.ts.example +70 -0
- package/templates/app-demo/src/pages/ChangelogPage.tsx.example +28 -1
- package/templates/app-demo/src/pages/ConditionalFormPage.tsx.example +88 -0
- package/templates/app-demo/src/pages/DashboardPage.tsx.example +2 -0
- package/templates/app-demo/src/pages/HomePage.tsx.example +355 -2
- package/templates/app-demo/src/pages/OnboardingPage.tsx.example +47 -0
- package/templates/app-demo/src/pages/PricingPage.tsx.example +28 -1
- package/templates/app-demo/src/pages/ProductsPage.tsx.example +2 -0
- package/templates/app-demo/src/pages/ProfilePage.tsx.example +2 -0
- package/templates/app-demo/src/pages/SettingsPage.tsx.example +2 -0
- package/templates/app-demo/src/pages/ShowcaseDetailPage.tsx.example +22 -16
- package/templates/app-demo/src/pages/ShowcasePage.tsx.example +3 -1
- package/templates/app-demo/src/pages/components/ComponentRenderer.tsx.example +147 -51
- package/templates/app-demo/src/pages/components/ComponentsData.tsx.example +103 -21
- package/templates/app-demo/src/pages/components/componentConfig.ts.example +139 -59
- package/templates/app-demo/src/pages/legal/LegalPage.tsx.example +12 -1
- package/templates/app-demo/src/pages/legal/PrivacyPage.tsx.example +10 -1
- package/templates/app-demo/src/pages/legal/TermsPage.tsx.example +10 -1
- package/templates/app-demo/src/themes.css.example +289 -77
- package/templates/app-demo/stats.html.example +4949 -0
- package/templates/app-next/src/locales/home_en.json.example +6 -6
- package/templates/app-vite/src/locales/home_en.json.example +6 -6
- package/templates/root-consumer/guides/dndev/advanced/COOKIE_REFERENCE.md.example +252 -252
- package/templates/root-consumer/guides/dndev/advanced/VERSION_CONTROL.md.example +174 -174
|
@@ -46,7 +46,10 @@ const PROP_TYPE_TO_PROP_NAME: Record<string, string> = {
|
|
|
46
46
|
* Generic state wrapper for controlled components
|
|
47
47
|
* Returns [value, onChange, additionalProps]
|
|
48
48
|
*/
|
|
49
|
-
function useComponentState(
|
|
49
|
+
function useComponentState(
|
|
50
|
+
config: ComponentConfig,
|
|
51
|
+
variantProps: Record<string, any>
|
|
52
|
+
): [any, ((val: any) => void) | undefined, Record<string, any>] {
|
|
50
53
|
const { stateType, defaultStateValue } = config;
|
|
51
54
|
|
|
52
55
|
if (!stateType || stateType === 'custom') {
|
|
@@ -55,15 +58,21 @@ function useComponentState(config: ComponentConfig, variantProps: Record<string,
|
|
|
55
58
|
|
|
56
59
|
switch (stateType) {
|
|
57
60
|
case 'controlled-value': {
|
|
58
|
-
const [value, setValue] = useState<string | string[]>(
|
|
61
|
+
const [value, setValue] = useState<string | string[]>(
|
|
62
|
+
defaultStateValue ?? ''
|
|
63
|
+
);
|
|
59
64
|
return [value, setValue, {}];
|
|
60
65
|
}
|
|
61
66
|
case 'controlled-checked': {
|
|
62
|
-
const [checked, setChecked] = useState<boolean>(
|
|
67
|
+
const [checked, setChecked] = useState<boolean>(
|
|
68
|
+
defaultStateValue ?? false
|
|
69
|
+
);
|
|
63
70
|
return [checked, setChecked, {}];
|
|
64
71
|
}
|
|
65
72
|
case 'controlled-pressed': {
|
|
66
|
-
const [pressed, setPressed] = useState<boolean>(
|
|
73
|
+
const [pressed, setPressed] = useState<boolean>(
|
|
74
|
+
defaultStateValue ?? false
|
|
75
|
+
);
|
|
67
76
|
return [pressed, setPressed, {}];
|
|
68
77
|
}
|
|
69
78
|
case 'controlled-range': {
|
|
@@ -71,7 +80,9 @@ function useComponentState(config: ComponentConfig, variantProps: Record<string,
|
|
|
71
80
|
return [value, setValue, {}];
|
|
72
81
|
}
|
|
73
82
|
case 'controlled-date': {
|
|
74
|
-
const [selected, setSelected] = useState<Date | undefined>(
|
|
83
|
+
const [selected, setSelected] = useState<Date | undefined>(
|
|
84
|
+
defaultStateValue ?? new Date()
|
|
85
|
+
);
|
|
75
86
|
return [selected, setSelected, { mode: 'single' }];
|
|
76
87
|
}
|
|
77
88
|
case 'controlled-dates': {
|
|
@@ -79,7 +90,9 @@ function useComponentState(config: ComponentConfig, variantProps: Record<string,
|
|
|
79
90
|
return [selected, setSelected, { mode: 'multiple' }];
|
|
80
91
|
}
|
|
81
92
|
case 'controlled-date-range': {
|
|
82
|
-
const [selected, setSelected] = useState<{ from?: Date; to?: Date }>(
|
|
93
|
+
const [selected, setSelected] = useState<{ from?: Date; to?: Date }>(
|
|
94
|
+
defaultStateValue ?? {}
|
|
95
|
+
);
|
|
83
96
|
return [selected, setSelected, { mode: 'range' }];
|
|
84
97
|
}
|
|
85
98
|
default:
|
|
@@ -93,31 +106,43 @@ export function ComponentRenderer({
|
|
|
93
106
|
}: ComponentRendererProps) {
|
|
94
107
|
const Component = config.component;
|
|
95
108
|
const [selectedDate, setSelectedDate] = useState<Date | undefined>(
|
|
96
|
-
config.id === 'calendar' && variantProps.mode === 'single'
|
|
109
|
+
config.id === 'calendar' && variantProps.mode === 'single'
|
|
110
|
+
? new Date()
|
|
111
|
+
: undefined
|
|
97
112
|
);
|
|
98
113
|
const [selectedDates, setSelectedDates] = useState<Date[]>(
|
|
99
114
|
config.id === 'calendar' && variantProps.mode === 'multiple' ? [] : []
|
|
100
115
|
);
|
|
101
|
-
const [selectedRange, setSelectedRange] = useState<{
|
|
102
|
-
|
|
103
|
-
|
|
116
|
+
const [selectedRange, setSelectedRange] = useState<{
|
|
117
|
+
from?: Date;
|
|
118
|
+
to?: Date;
|
|
119
|
+
}>(config.id === 'calendar' && variantProps.mode === 'range' ? {} : {});
|
|
104
120
|
const [sheetOpen, setSheetOpen] = useState<boolean>(false);
|
|
105
121
|
const [dialogOpen, setDialogOpen] = useState<boolean>(false);
|
|
106
122
|
const [alertDialogOpen, setAlertDialogOpen] = useState<boolean>(false);
|
|
107
123
|
const [commandDialogOpen, setCommandDialogOpen] = useState<boolean>(false);
|
|
108
124
|
const [tabCount, setTabCount] = useState<number>(2);
|
|
109
|
-
const [generatedTabsItems, setGeneratedTabsItems] = useState<Array<{
|
|
110
|
-
|
|
125
|
+
const [generatedTabsItems, setGeneratedTabsItems] = useState<Array<{
|
|
126
|
+
value: string;
|
|
127
|
+
label: string;
|
|
128
|
+
content: string;
|
|
129
|
+
}> | null>(null);
|
|
130
|
+
const [activeOverlayVariant, setActiveOverlayVariant] = useState<
|
|
131
|
+
string | null
|
|
132
|
+
>(null);
|
|
111
133
|
|
|
112
134
|
if (config.layoutDescription) {
|
|
113
135
|
return (
|
|
114
136
|
<Card
|
|
115
137
|
title={config.name}
|
|
116
138
|
variant="muted"
|
|
117
|
-
subtitle={
|
|
139
|
+
subtitle={
|
|
140
|
+
config.layoutDescription || `Layout component: ${config.name}`
|
|
141
|
+
}
|
|
118
142
|
>
|
|
119
143
|
<Text variant="muted">
|
|
120
|
-
{config.notes ||
|
|
144
|
+
{config.notes ||
|
|
145
|
+
'This is a layout component. Use it to structure your page content.'}
|
|
121
146
|
</Text>
|
|
122
147
|
</Card>
|
|
123
148
|
);
|
|
@@ -133,10 +158,15 @@ export function ComponentRenderer({
|
|
|
133
158
|
const value = PROP_VALUES[propType as keyof typeof PROP_VALUES];
|
|
134
159
|
if (value !== undefined) {
|
|
135
160
|
const propName = PROP_TYPE_TO_PROP_NAME[propType] || propType;
|
|
136
|
-
|
|
161
|
+
|
|
137
162
|
if (propType === 'accordionItems' && Array.isArray(value)) {
|
|
138
163
|
componentProps[propName] = value.map((item) => {
|
|
139
|
-
if (
|
|
164
|
+
if (
|
|
165
|
+
typeof item === 'object' &&
|
|
166
|
+
item !== null &&
|
|
167
|
+
'trigger' in item &&
|
|
168
|
+
typeof item.trigger === 'string'
|
|
169
|
+
) {
|
|
140
170
|
const triggerContent = config.supportsCommonProps.icon ? (
|
|
141
171
|
<Stack direction="row" gap="tight" align="center">
|
|
142
172
|
<PROP_VALUES.icon className="dndev-size-md" />
|
|
@@ -154,21 +184,41 @@ export function ComponentRenderer({
|
|
|
154
184
|
});
|
|
155
185
|
} else if (propType === 'collapsibleContent') {
|
|
156
186
|
componentProps.children = value;
|
|
157
|
-
} else if (
|
|
187
|
+
} else if (
|
|
188
|
+
propType === 'commandGroups' &&
|
|
189
|
+
config.id === 'command-dialog'
|
|
190
|
+
) {
|
|
158
191
|
// CommandDialog needs Command component as children
|
|
159
192
|
// Type assertion: commandGroups propType always returns CommandGroup[]
|
|
160
|
-
componentProps.children =
|
|
193
|
+
componentProps.children = (
|
|
194
|
+
<Command groups={value as CommandGroup[]} />
|
|
195
|
+
);
|
|
161
196
|
} else if (propType === 'tabsItems' && Array.isArray(value)) {
|
|
162
197
|
// Use generated tabs if available, otherwise use default
|
|
163
|
-
const tabsToUse =
|
|
198
|
+
const tabsToUse =
|
|
199
|
+
generatedTabsItems ||
|
|
200
|
+
(value as Array<{
|
|
201
|
+
value: string;
|
|
202
|
+
label: string;
|
|
203
|
+
content: string | ReactNode;
|
|
204
|
+
}>);
|
|
164
205
|
// Tabs needs items with content as ReactNode
|
|
165
206
|
if (tabsToUse && tabsToUse.length > 0) {
|
|
166
207
|
componentProps.items = tabsToUse.map((item) => ({
|
|
167
208
|
...item,
|
|
168
|
-
content:
|
|
209
|
+
content:
|
|
210
|
+
typeof item.content === 'string' ? (
|
|
211
|
+
<Text>{item.content}</Text>
|
|
212
|
+
) : (
|
|
213
|
+
item.content
|
|
214
|
+
),
|
|
169
215
|
}));
|
|
170
216
|
// Set default value to first tab if not provided
|
|
171
|
-
if (
|
|
217
|
+
if (
|
|
218
|
+
!componentProps.defaultValue &&
|
|
219
|
+
!componentProps.value &&
|
|
220
|
+
tabsToUse[0]
|
|
221
|
+
) {
|
|
172
222
|
componentProps.defaultValue = tabsToUse[0].value;
|
|
173
223
|
}
|
|
174
224
|
}
|
|
@@ -180,9 +230,22 @@ export function ComponentRenderer({
|
|
|
180
230
|
}
|
|
181
231
|
|
|
182
232
|
if (config.supportsCommonProps.content) {
|
|
183
|
-
const usesChildren = [
|
|
233
|
+
const usesChildren = [
|
|
234
|
+
'button',
|
|
235
|
+
'badge',
|
|
236
|
+
'toggle',
|
|
237
|
+
'label',
|
|
238
|
+
'text',
|
|
239
|
+
'collapsible',
|
|
240
|
+
'dialog',
|
|
241
|
+
'sheet',
|
|
242
|
+
'popover',
|
|
243
|
+
'hover-card',
|
|
244
|
+
].includes(config.id);
|
|
184
245
|
const shortLabelComponents = ['badge', 'button'];
|
|
185
|
-
const contentValue = shortLabelComponents.includes(config.id)
|
|
246
|
+
const contentValue = shortLabelComponents.includes(config.id)
|
|
247
|
+
? PROP_VALUES.shortLabel
|
|
248
|
+
: PROP_VALUES.content;
|
|
186
249
|
if (usesChildren) {
|
|
187
250
|
componentProps.children = contentValue;
|
|
188
251
|
} else if (config.id !== 'tooltip') {
|
|
@@ -196,10 +259,16 @@ export function ComponentRenderer({
|
|
|
196
259
|
|
|
197
260
|
if (config.needsTrigger) {
|
|
198
261
|
const triggerText = config.triggerText || PROP_VALUES.trigger;
|
|
199
|
-
const buttonVariant =
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
262
|
+
const buttonVariant =
|
|
263
|
+
variantProps.variant &&
|
|
264
|
+
config.variants?.variant?.includes(variantProps.variant)
|
|
265
|
+
? variantProps.variant
|
|
266
|
+
: undefined;
|
|
267
|
+
const triggerButton = (
|
|
268
|
+
<Button icon={PROP_VALUES.icon} variant={buttonVariant}>
|
|
269
|
+
{triggerText}
|
|
270
|
+
</Button>
|
|
271
|
+
);
|
|
203
272
|
|
|
204
273
|
if (config.id === 'tooltip') {
|
|
205
274
|
componentProps.children = triggerButton;
|
|
@@ -212,7 +281,10 @@ export function ComponentRenderer({
|
|
|
212
281
|
}
|
|
213
282
|
|
|
214
283
|
// Generic state management for controlled components
|
|
215
|
-
const [stateValue, setStateValue, stateProps] = useComponentState(
|
|
284
|
+
const [stateValue, setStateValue, stateProps] = useComponentState(
|
|
285
|
+
config,
|
|
286
|
+
variantProps
|
|
287
|
+
);
|
|
216
288
|
|
|
217
289
|
// Wire up state to component props based on stateType
|
|
218
290
|
if (config.stateType && config.stateType !== 'custom') {
|
|
@@ -239,7 +311,7 @@ export function ComponentRenderer({
|
|
|
239
311
|
if (config.id === 'calendar') {
|
|
240
312
|
const mode = variantProps.mode || 'single';
|
|
241
313
|
componentProps.mode = mode;
|
|
242
|
-
|
|
314
|
+
|
|
243
315
|
if (mode === 'single') {
|
|
244
316
|
componentProps.selected = selectedDate;
|
|
245
317
|
componentProps.onSelect = setSelectedDate;
|
|
@@ -278,18 +350,21 @@ export function ComponentRenderer({
|
|
|
278
350
|
const itemsToAdd = baseItems.slice(currentIndex, currentIndex + 5);
|
|
279
351
|
// If we need more items than available, loop back to start
|
|
280
352
|
const remainingNeeded = 5 - itemsToAdd.length;
|
|
281
|
-
const loopedItems =
|
|
282
|
-
|
|
353
|
+
const loopedItems =
|
|
354
|
+
remainingNeeded > 0 ? baseItems.slice(0, remainingNeeded) : [];
|
|
355
|
+
setDisplayedItems((prev) => [...prev, ...itemsToAdd, ...loopedItems]);
|
|
283
356
|
};
|
|
284
357
|
|
|
285
358
|
const renderItem = (item: string, index: number) => (
|
|
286
359
|
<Card title={item} variant="muted">
|
|
287
|
-
<Text variant="muted">
|
|
360
|
+
<Text variant="muted">
|
|
361
|
+
Item #{index + 1}: {item}
|
|
362
|
+
</Text>
|
|
288
363
|
</Card>
|
|
289
364
|
);
|
|
290
365
|
|
|
291
366
|
const { items: _, renderItem: __, ...restProps } = componentProps;
|
|
292
|
-
|
|
367
|
+
|
|
293
368
|
return (
|
|
294
369
|
<Component
|
|
295
370
|
items={displayedItems}
|
|
@@ -326,15 +401,18 @@ export function ComponentRenderer({
|
|
|
326
401
|
const { toast } = useToast();
|
|
327
402
|
const [message, setMessage] = useState<string>('');
|
|
328
403
|
const [duration, setDuration] = useState<string>('5000');
|
|
329
|
-
|
|
330
|
-
const toastTypes: Array<{
|
|
404
|
+
|
|
405
|
+
const toastTypes: Array<{
|
|
406
|
+
type: 'default' | 'success' | 'error' | 'warning' | 'info';
|
|
407
|
+
label: string;
|
|
408
|
+
}> = [
|
|
331
409
|
{ type: 'default', label: 'Default' },
|
|
332
410
|
{ type: 'success', label: 'Success' },
|
|
333
411
|
{ type: 'error', label: 'Error' },
|
|
334
412
|
{ type: 'warning', label: 'Warning' },
|
|
335
413
|
{ type: 'info', label: 'Info' },
|
|
336
414
|
];
|
|
337
|
-
|
|
415
|
+
|
|
338
416
|
const durationOptions = [
|
|
339
417
|
{ value: '0', label: 'Forever (0ms)' },
|
|
340
418
|
{ value: '3000', label: '3 seconds' },
|
|
@@ -343,9 +421,9 @@ export function ComponentRenderer({
|
|
|
343
421
|
{ value: '6000', label: '6 seconds' },
|
|
344
422
|
{ value: '7000', label: '7 seconds' },
|
|
345
423
|
];
|
|
346
|
-
|
|
424
|
+
|
|
347
425
|
const durationValue = parseInt(duration, 10);
|
|
348
|
-
|
|
426
|
+
|
|
349
427
|
return (
|
|
350
428
|
<Stack gap="large" align="center" justify="center">
|
|
351
429
|
<Stack className="dndev-w-full dndev-max-w-md">
|
|
@@ -356,7 +434,10 @@ export function ComponentRenderer({
|
|
|
356
434
|
onChange={(e) => setMessage(e.target.value)}
|
|
357
435
|
onKeyDown={(e) => {
|
|
358
436
|
if (e.key === 'Enter' && message.trim()) {
|
|
359
|
-
toast({
|
|
437
|
+
toast({
|
|
438
|
+
...(message.trim() ? { title: message } : {}),
|
|
439
|
+
duration: durationValue,
|
|
440
|
+
});
|
|
360
441
|
setMessage('');
|
|
361
442
|
}
|
|
362
443
|
}}
|
|
@@ -364,7 +445,10 @@ export function ComponentRenderer({
|
|
|
364
445
|
<Button
|
|
365
446
|
onClick={() => {
|
|
366
447
|
if (message.trim()) {
|
|
367
|
-
toast({
|
|
448
|
+
toast({
|
|
449
|
+
...(message.trim() ? { title: message } : {}),
|
|
450
|
+
duration: durationValue,
|
|
451
|
+
});
|
|
368
452
|
setMessage('');
|
|
369
453
|
}
|
|
370
454
|
}}
|
|
@@ -385,11 +469,18 @@ export function ComponentRenderer({
|
|
|
385
469
|
{toastTypes.map(({ type, label }) => (
|
|
386
470
|
<Button
|
|
387
471
|
key={type}
|
|
388
|
-
variant={
|
|
472
|
+
variant={
|
|
473
|
+
type === 'error'
|
|
474
|
+
? 'destructive'
|
|
475
|
+
: type === 'success'
|
|
476
|
+
? 'primary'
|
|
477
|
+
: 'outline'
|
|
478
|
+
}
|
|
389
479
|
onClick={() => {
|
|
390
480
|
toast({
|
|
391
481
|
title: `${label} Toast`,
|
|
392
|
-
description:
|
|
482
|
+
description:
|
|
483
|
+
message.trim() || `This is a ${type} notification`,
|
|
393
484
|
toastType: type,
|
|
394
485
|
duration: durationValue,
|
|
395
486
|
});
|
|
@@ -449,11 +540,16 @@ export function ComponentRenderer({
|
|
|
449
540
|
);
|
|
450
541
|
}
|
|
451
542
|
if (config.id === 'spinner') {
|
|
452
|
-
const currentVariant =
|
|
543
|
+
const currentVariant =
|
|
544
|
+
variantProps.variant || componentProps.variant || 'primary';
|
|
453
545
|
const isActive = activeOverlayVariant === currentVariant;
|
|
454
546
|
return (
|
|
455
547
|
<>
|
|
456
|
-
<Stack
|
|
548
|
+
<Stack
|
|
549
|
+
align="center"
|
|
550
|
+
justify="center"
|
|
551
|
+
style={{ minHeight: '200px', position: 'relative', zIndex: 10000 }}
|
|
552
|
+
>
|
|
457
553
|
<Button
|
|
458
554
|
variant="ghost"
|
|
459
555
|
onClick={() => {
|
|
@@ -469,7 +565,11 @@ export function ComponentRenderer({
|
|
|
469
565
|
</Button>
|
|
470
566
|
</Stack>
|
|
471
567
|
{isActive && (
|
|
472
|
-
<Component
|
|
568
|
+
<Component
|
|
569
|
+
{...componentProps}
|
|
570
|
+
overlay
|
|
571
|
+
variant={currentVariant as any}
|
|
572
|
+
/>
|
|
473
573
|
)}
|
|
474
574
|
</>
|
|
475
575
|
);
|
|
@@ -487,7 +587,7 @@ export function ComponentRenderer({
|
|
|
487
587
|
} else if (config.stateType === 'controlled-value') {
|
|
488
588
|
stateLabel = String(stateValue || '');
|
|
489
589
|
}
|
|
490
|
-
|
|
590
|
+
|
|
491
591
|
return (
|
|
492
592
|
<Stack direction="row" align="center">
|
|
493
593
|
<Component {...componentProps} />
|
|
@@ -502,10 +602,6 @@ export function ComponentRenderer({
|
|
|
502
602
|
</Stack>
|
|
503
603
|
);
|
|
504
604
|
} catch (error) {
|
|
505
|
-
return (
|
|
506
|
-
<Text variant="destructive">
|
|
507
|
-
Error: {String(error)}
|
|
508
|
-
</Text>
|
|
509
|
-
);
|
|
605
|
+
return <Text variant="destructive">Error: {String(error)}</Text>;
|
|
510
606
|
}
|
|
511
607
|
}
|
|
@@ -7,12 +7,16 @@ import { Button, Collapsible, Text, Badge } from '@donotdev/components';
|
|
|
7
7
|
export const PROP_VALUES = {
|
|
8
8
|
title: 'Title',
|
|
9
9
|
subtitle: 'Subtitle',
|
|
10
|
-
description:
|
|
11
|
-
|
|
10
|
+
description:
|
|
11
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
|
|
12
|
+
content:
|
|
13
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.',
|
|
12
14
|
shortLabel: 'Lorem ipsum short',
|
|
13
15
|
collapsibleContent: (
|
|
14
16
|
<div className="dndev-p-md dndev-surface dndev-mt-sm">
|
|
15
|
-
<Text variant="muted" className="dndev-mb-sm">
|
|
17
|
+
<Text variant="muted" className="dndev-mb-sm">
|
|
18
|
+
Advanced Configuration Details:
|
|
19
|
+
</Text>
|
|
16
20
|
<Text>• Cache policy: 3600s</Text>
|
|
17
21
|
<Text>• Retries: 3</Text>
|
|
18
22
|
<Text>• Timeout: 5000ms</Text>
|
|
@@ -27,35 +31,96 @@ export const PROP_VALUES = {
|
|
|
27
31
|
confirmLabel: 'Confirm',
|
|
28
32
|
cancelLabel: 'Cancel',
|
|
29
33
|
primaryAction: <Button icon={Rocket}>Primary</Button>,
|
|
30
|
-
secondaryAction:
|
|
34
|
+
secondaryAction: (
|
|
35
|
+
<Button variant="outline" icon={Rocket}>
|
|
36
|
+
Secondary
|
|
37
|
+
</Button>
|
|
38
|
+
),
|
|
31
39
|
items: [
|
|
32
|
-
{
|
|
33
|
-
|
|
34
|
-
|
|
40
|
+
{
|
|
41
|
+
label: 'Item 1',
|
|
42
|
+
value: '1',
|
|
43
|
+
content:
|
|
44
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: 'Item 2',
|
|
48
|
+
value: '2',
|
|
49
|
+
content:
|
|
50
|
+
'Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit.',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
label: 'Item 3',
|
|
54
|
+
value: '3',
|
|
55
|
+
content:
|
|
56
|
+
'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error.',
|
|
57
|
+
},
|
|
35
58
|
],
|
|
36
59
|
accordionItems: [
|
|
37
|
-
{
|
|
38
|
-
|
|
39
|
-
|
|
60
|
+
{
|
|
61
|
+
value: 'item-1',
|
|
62
|
+
trigger: 'Trigger: Accordion Item 1',
|
|
63
|
+
content:
|
|
64
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
value: 'item-2',
|
|
68
|
+
trigger: 'Trigger: Accordion Item 2',
|
|
69
|
+
content:
|
|
70
|
+
'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
value: 'item-3',
|
|
74
|
+
trigger: 'Trigger: Accordion Item 3',
|
|
75
|
+
content:
|
|
76
|
+
'Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.',
|
|
77
|
+
},
|
|
40
78
|
],
|
|
41
79
|
tabsItems: [
|
|
42
|
-
{
|
|
43
|
-
|
|
80
|
+
{
|
|
81
|
+
value: 'tab1',
|
|
82
|
+
label: 'Tab 1',
|
|
83
|
+
content:
|
|
84
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
value: 'tab2',
|
|
88
|
+
label: 'Tab 2',
|
|
89
|
+
content:
|
|
90
|
+
'Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.',
|
|
91
|
+
},
|
|
44
92
|
],
|
|
45
93
|
commandGroups: [
|
|
46
94
|
{
|
|
47
95
|
heading: 'Navigation',
|
|
48
96
|
items: [
|
|
49
97
|
{ label: 'Home', description: 'Go to home', onSelect: () => {} },
|
|
50
|
-
{
|
|
98
|
+
{
|
|
99
|
+
label: 'Components',
|
|
100
|
+
description: 'Open components page',
|
|
101
|
+
onSelect: () => {},
|
|
102
|
+
},
|
|
51
103
|
{ label: 'Settings', description: 'Open settings', onSelect: () => {} },
|
|
52
104
|
],
|
|
53
105
|
},
|
|
54
106
|
],
|
|
55
107
|
listItems: [
|
|
56
|
-
{
|
|
57
|
-
|
|
58
|
-
|
|
108
|
+
{
|
|
109
|
+
icon: <Check className="dndev-size-md" />,
|
|
110
|
+
content: 'Feature enabled with icon support',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
icon: <Check className="dndev-size-md" />,
|
|
114
|
+
content: (
|
|
115
|
+
<Text>
|
|
116
|
+
Custom ReactNode content with <Badge>Badge</Badge>
|
|
117
|
+
</Text>
|
|
118
|
+
),
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
icon: <AlertCircle className="dndev-size-md" />,
|
|
122
|
+
content: 'Warning item with different icon',
|
|
123
|
+
},
|
|
59
124
|
{ content: 'Simple text item without icon' },
|
|
60
125
|
],
|
|
61
126
|
navigationItems: [
|
|
@@ -76,9 +141,21 @@ export const PROP_VALUES = {
|
|
|
76
141
|
{ value: 'option3', label: 'Option 3' },
|
|
77
142
|
],
|
|
78
143
|
comboboxOptions: [
|
|
79
|
-
{
|
|
80
|
-
|
|
81
|
-
|
|
144
|
+
{
|
|
145
|
+
value: 'tenant1',
|
|
146
|
+
label: 'Tenant Alpha',
|
|
147
|
+
description: 'Primary tenant account',
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
value: 'tenant2',
|
|
151
|
+
label: 'Tenant Beta',
|
|
152
|
+
description: 'Secondary tenant account',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
value: 'tenant3',
|
|
156
|
+
label: 'Tenant Gamma',
|
|
157
|
+
description: 'Test tenant account',
|
|
158
|
+
},
|
|
82
159
|
{ value: 'owner1', label: 'John Smith', description: 'Owner - Marketing' },
|
|
83
160
|
{ value: 'owner2', label: 'Jane Doe', description: 'Owner - Engineering' },
|
|
84
161
|
{ value: 'owner3', label: 'Bob Johnson', description: 'Owner - Sales' },
|
|
@@ -116,7 +193,13 @@ export const PROP_VALUES = {
|
|
|
116
193
|
),
|
|
117
194
|
};
|
|
118
195
|
|
|
119
|
-
export type CSSFamily =
|
|
196
|
+
export type CSSFamily =
|
|
197
|
+
| 'surface'
|
|
198
|
+
| 'floating'
|
|
199
|
+
| 'interactive'
|
|
200
|
+
| 'layout'
|
|
201
|
+
| 'input'
|
|
202
|
+
| 'other';
|
|
120
203
|
|
|
121
204
|
export type PropType =
|
|
122
205
|
| 'title'
|
|
@@ -149,4 +232,3 @@ export type PropType =
|
|
|
149
232
|
| 'footer'
|
|
150
233
|
| 'avatarSrc'
|
|
151
234
|
| 'avatarFallback';
|
|
152
|
-
|