@dito-uai/components 5.1.0-alpha.66 → 5.1.0-alpha.67

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.
Files changed (46) hide show
  1. package/README.md +23 -26
  2. package/dist/global.css +1 -1
  3. package/dist/index.cjs +75 -73
  4. package/dist/index.d.cts +148 -29
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +16 -15
  8. package/dist/ui/alert.d.ts.map +1 -1
  9. package/dist/ui/avatar.d.ts.map +1 -1
  10. package/dist/ui/badge.d.ts.map +1 -1
  11. package/dist/ui/button.d.ts.map +1 -1
  12. package/dist/ui/card.d.ts.map +1 -1
  13. package/dist/ui/checkbox.d.ts.map +1 -1
  14. package/dist/ui/chips.d.ts.map +1 -1
  15. package/dist/ui/collapsible.d.ts.map +1 -1
  16. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  17. package/dist/ui/go-to-card.d.ts.map +1 -1
  18. package/dist/ui/indicator.d.ts.map +1 -1
  19. package/dist/ui/input-description.d.ts.map +1 -1
  20. package/dist/ui/input.d.ts.map +1 -1
  21. package/dist/ui/internal/dropdown-content.d.ts.map +1 -1
  22. package/dist/ui/label.d.ts.map +1 -1
  23. package/dist/ui/loading.d.ts.map +1 -1
  24. package/dist/ui/message.d.ts +1 -0
  25. package/dist/ui/message.d.ts.map +1 -1
  26. package/dist/ui/popover.d.ts.map +1 -1
  27. package/dist/ui/progress-bar.d.ts.map +1 -1
  28. package/dist/ui/progress.d.ts.map +1 -1
  29. package/dist/ui/radio.d.ts.map +1 -1
  30. package/dist/ui/scope.d.ts.map +1 -1
  31. package/dist/ui/search.d.ts.map +1 -1
  32. package/dist/ui/select-card.d.ts.map +1 -1
  33. package/dist/ui/sheets.d.ts +123 -9
  34. package/dist/ui/sheets.d.ts.map +1 -1
  35. package/dist/ui/skeleton.d.ts.map +1 -1
  36. package/dist/ui/status.d.ts.map +1 -1
  37. package/dist/ui/switch.d.ts.map +1 -1
  38. package/dist/ui/tabs.d.ts.map +1 -1
  39. package/dist/ui/text.d.ts.map +1 -1
  40. package/dist/ui/textarea.d.ts.map +1 -1
  41. package/dist/ui/tip-card.d.ts.map +1 -1
  42. package/dist/ui/toggle-group.d.ts.map +1 -1
  43. package/dist/ui/toggle.d.ts.map +1 -1
  44. package/dist/ui/tooltip.d.ts.map +1 -1
  45. package/llms.md +646 -0
  46. package/package.json +3 -2
package/llms.md ADDED
@@ -0,0 +1,646 @@
1
+ # @dito-uai/components — API reference for LLMs
2
+
3
+ Package: `@dito-uai/components` (React 18, TypeScript, Tailwind CSS 3, Radix UI, `tailwind-variants`).
4
+
5
+ ## Installation and setup
6
+
7
+ - **Peers:** `react`, `react-dom`, `zod`, `lucide-react`, `@dito-uai/icons`.
8
+ - **CSS:** `import '@dito-uai/components/global.css'`.
9
+ - **Tailwind:** preset in the package’s `tailwind-preset.ts`; set your app `content` to include files that import these components.
10
+
11
+ ## Design tokens (summary)
12
+
13
+ - **Colors:** namespaces `neutral`, `brand`, `secondary`, `chart`, `notification` (`COLORS` object in the preset).
14
+ - **Typography:** Poppins in the preset; use the `Text` component for DS type scale.
15
+ - **Spacing:** 8px-based scale in the preset.
16
+
17
+ ## Common pitfalls
18
+
19
+ 1. **`Tabs`:** the package default export is named `Tabs` but the implementation is `TabsLayout`. Props: `TabsLayoutProps`, items: `TabItem[]` with `value`, `content`, `label?`, etc.
20
+ 2. **`Message`:** **imperative** API (`Message.success('...')`). You must mount `<MessageContainer />` at the root (e.g. app layout). Uses `react-toastify`.
21
+ 3. **`Tooltip`:** wrap the tree with `<TooltipProvider>` where tooltips are used (Radix).
22
+ 4. **`Toggle`:** the barrel **only** exports `Toggle` as the namespace from `toggle-group.tsx`: `Toggle.Group` and `Toggle.Item`. The standalone toggle from `toggle.tsx` is **not** re-exported from the package `index.ts`.
23
+ 5. **`Loading`:** `size`, `color`, and `fill` use **UPPERCASE** strings (`'NORMAL'`, `'GREEN'`, …), legacy API.
24
+ 6. **`Sheet`:** visibility prop is **`isVisible`**, not `visible`.
25
+ 7. **`GoToCard`:** polymorphic: `as?: 'button' | 'a' | React.ComponentType` with Link-style props (`to`, etc.) when `as` is a router component.
26
+ 8. **Radix:** many components extend Radix props; beyond the props listed below, standard HTML attributes and handlers are usually accepted.
27
+
28
+ ---
29
+
30
+ ## Alert
31
+
32
+ **Import:** `import { Alert } from '@dito-uai/components'`
33
+
34
+ **Props (`AlertProps`):** extends `HTMLAttributes<HTMLDivElement>`.
35
+
36
+ | Prop | Type | Default | Notes |
37
+ |------|------|---------|--------|
38
+ | `type` | `'success' \| 'warning' \| 'error' \| 'info'` | — | Sets color and icon |
39
+ | `message` | `string \| ReactNode` | — | Main content |
40
+ | `closable` | `boolean` | `false` | Close icon; dismisses on click |
41
+
42
+ **Example:**
43
+
44
+ ```tsx
45
+ <Alert type="success" message="Saved." />
46
+ <Alert type="error" message="Error." closable />
47
+ ```
48
+
49
+ ---
50
+
51
+ ## Avatar
52
+
53
+ **Import:** `import { Avatar } from '@dito-uai/components'`
54
+
55
+ **Props (`AvatarProps`):** extends `ComponentPropsWithoutRef<'div'>`.
56
+
57
+ | Prop | Type | Default | Notes |
58
+ |------|------|---------|--------|
59
+ | `color` | `'default' \| 'indigo'` | `'default'` | |
60
+ | `type` | `'icon' \| 'capitals' \| 'image'` | — | |
61
+ | `size` | `'small' \| 'medium' \| 'large'` | — | |
62
+ | `asChild` | `boolean` | — | Radix `Slot` |
63
+
64
+ **Example:**
65
+
66
+ ```tsx
67
+ <Avatar type="capitals" size="medium">AB</Avatar>
68
+ ```
69
+
70
+ ---
71
+
72
+ ## Badge
73
+
74
+ **Import:** `import { Badge } from '@dito-uai/components'`
75
+
76
+ **Props (`BadgeProps`):** extends `HTMLAttributes<HTMLSpanElement>`.
77
+
78
+ | Prop | Type | Default | Notes |
79
+ |------|------|---------|--------|
80
+ | `status` | `'info' \| 'attention' \| 'white'` | `'info'` | |
81
+ | `size` | `'small' \| 'normal'` | `'normal'` | |
82
+ | `type` | `'pill' \| 'dot'` | `'pill'` | |
83
+ | `contrast` | `boolean` | — | High contrast |
84
+ | `asChild` | `boolean` | — | |
85
+
86
+ **Example:**
87
+
88
+ ```tsx
89
+ <Badge status="info">New</Badge>
90
+ <Badge type="dot" size="small" contrast />
91
+ ```
92
+
93
+ ---
94
+
95
+ ## Button
96
+
97
+ **Import:** `import { Button } from '@dito-uai/components'`
98
+
99
+ **Props (`ButtonProps`):** extends `ButtonHTMLAttributes<HTMLButtonElement>`.
100
+
101
+ | Prop | Type | Default | Notes |
102
+ |------|------|---------|--------|
103
+ | `appearance` | `'primary' \| 'secondary' \| 'tertiary' \| 'danger' \| 'link' \| 'table' \| 'ai' \| 'ai-outline'` | `'primary'` | |
104
+ | `size` | `'medium' \| 'small'` | `'medium'` | |
105
+ | `rounded` | `boolean` | `false` | `true` → pill |
106
+ | `vertical` | `boolean` | `false` | Column layout (e.g. AI) |
107
+ | `disabled` | `boolean` | — | |
108
+ | `loading` | `boolean` | `false` | Spinner; hides label/icon |
109
+ | `icon` | `React.ElementType` | — | Before label |
110
+ | `asChild` | `boolean` | — | `Slot` |
111
+
112
+ **Example:**
113
+
114
+ ```tsx
115
+ <Button appearance="primary">Save</Button>
116
+ <Button appearance="danger" loading icon={IconOutlineTrash}>Delete</Button>
117
+ ```
118
+
119
+ ---
120
+
121
+ ## Card
122
+
123
+ **Import:** `import { Card } from '@dito-uai/components'`
124
+
125
+ **Props (`CardProps`):** extends `HTMLAttributes<HTMLDivElement>` + `children`.
126
+
127
+ | Prop | Type | Default | Notes |
128
+ |------|------|---------|--------|
129
+ | `variant` | `'default' \| 'big' \| 'small'` | `'default'` | Border radius |
130
+ | `direction` | `'col' \| 'row'` | `'col'` | |
131
+ | `padding` | `'none' \| 'small' \| 'medium' \| 'big'` | `'none'` | |
132
+
133
+ ---
134
+
135
+ ## Checkbox
136
+
137
+ **Import:** `import { Checkbox } from '@dito-uai/components'`
138
+
139
+ **Props (`CheckboxProps`):** `ComponentPropsWithoutRef` of Radix Checkbox Root (`checked` may be `boolean | 'indeterminate'`, etc.).
140
+
141
+ ---
142
+
143
+ ## Chips
144
+
145
+ **Import:** `import { Chips } from '@dito-uai/components'`
146
+
147
+ **Props (`ChipsProps`):** extends `HTMLAttributes<HTMLDivElement>`.
148
+
149
+ | Prop | Type | Default | Notes |
150
+ |------|------|---------|--------|
151
+ | `text` | `string` | — | Required |
152
+ | `size` | `'small' \| 'medium'` | `'medium'` | |
153
+ | `active` | `boolean` | `false` | |
154
+ | `icon` | `React.ElementType` | — | |
155
+ | `value` | `string` | — | Passed to `onClose` |
156
+ | `onClose` | `(value?: string) => void` | — | Shows close button |
157
+ | `textClassName` | `string` | — | |
158
+ | `asChild` | `boolean` | — | |
159
+
160
+ ---
161
+
162
+ ## Collapsible
163
+
164
+ **Import:** `import { Collapsible } from '@dito-uai/components'`
165
+
166
+ **API:** `Collapsible.Item`, `Collapsible.Trigger`, `Collapsible.Content`.
167
+
168
+ - **`CollapsibleItemProps`:** Radix `Collapsible.Root` props.
169
+ - **`CollapsibleTriggerProps`:** Radix `Collapsible.Trigger` props + `triggerClassName?: string`.
170
+ - **`CollapsibleContentProps`:** Radix `Collapsible.Content` props.
171
+
172
+ **Example:**
173
+
174
+ ```tsx
175
+ <Collapsible.Item defaultOpen>
176
+ <Collapsible.Trigger>Open</Collapsible.Trigger>
177
+ <Collapsible.Content>Details</Collapsible.Content>
178
+ </Collapsible.Item>
179
+ ```
180
+
181
+ ---
182
+
183
+ ## DropdownMenu
184
+
185
+ **Import:**
186
+
187
+ ```tsx
188
+ import {
189
+ DropdownMenu,
190
+ DropdownMenuTrigger,
191
+ DropdownMenuContent,
192
+ DropdownMenuItem,
193
+ DropdownMenuCheckboxItem,
194
+ DropdownMenuRadioItem,
195
+ DropdownMenuLabel,
196
+ DropdownMenuSeparator,
197
+ DropdownMenuShortcut,
198
+ DropdownMenuGroup,
199
+ DropdownMenuPortal,
200
+ DropdownMenuSub,
201
+ DropdownMenuSubContent,
202
+ DropdownMenuSubTrigger,
203
+ DropdownMenuRadioGroup,
204
+ } from '@dito-uai/components';
205
+ ```
206
+
207
+ **Root (`DropdownMenu`):** Radix Root props + `appearance?: 'default' | 'ai'`. Children inherit appearance via context.
208
+
209
+ **`DropdownMenuContent`:** Radix Content + Portal + `sideOffset` (default `4`), `container`, `forceMount`, `appearance?`.
210
+
211
+ **`DropdownMenuItem`, `DropdownMenuSubTrigger`, `DropdownMenuLabel`:** `inset?: boolean`, `appearance?`.
212
+
213
+ **Others:** Radix re-exports with styled slots where applicable.
214
+
215
+ ---
216
+
217
+ ## GoToCard
218
+
219
+ **Import:** `import { GoToCard } from '@dito-uai/components'`
220
+
221
+ **Props (`GoToCardProps`):** polymorphic union.
222
+
223
+ **Shared:**
224
+
225
+ | Prop | Type | Default |
226
+ |------|------|---------|
227
+ | `title` | `ReactNode` | — |
228
+ | `description` | `ReactNode` | — |
229
+ | `icon` | `ReactNode` | — |
230
+ | `iconClassName` | `string` | — |
231
+ | `state` | `'default' \| 'incomplete' \| 'complete' \| 'error'` | `'default'` |
232
+ | `size` | `'md' \| 'sm'` | `'md'` |
233
+ | `disabled` | `boolean` | `false` |
234
+ | `as` | `'button' \| 'a' \| ComponentType` | `'button'` |
235
+
236
+ - **`as: 'a'`:** anchor props (`href`, etc.).
237
+ - **`as: LinkComponent`:** `to?`, `replace?`, `state?`, etc. (React Router–compatible).
238
+
239
+ ---
240
+
241
+ ## Indicator
242
+
243
+ **Import:** `import { Indicator } from '@dito-uai/components'`
244
+
245
+ **Props (`IndicatorProps`):** extends `HTMLAttributes<HTMLDivElement>`.
246
+
247
+ | Prop | Type | Default | Notes |
248
+ |------|------|---------|--------|
249
+ | `value` | `string \| number` | — | Required |
250
+ | `status` | `'positive' \| 'negative' \| 'neutral' \| 'info'` | — | |
251
+ | `icon` | `'positive' \| 'neutral' \| 'negative'` | — | |
252
+ | `usePercentageSymbol` | `boolean` | `true` | `%` suffix |
253
+
254
+ ---
255
+
256
+ ## InputDescription
257
+
258
+ **Import:** `import { InputDescription } from '@dito-uai/components'`
259
+
260
+ **Props (`InputDescriptionProps`):** extends `InputHTMLAttributes<HTMLInputElement>` (inherits `maxLength`, etc.).
261
+
262
+ | Prop | Type | Notes |
263
+ |------|------|--------|
264
+ | `text` | `string` | Help / error |
265
+ | `counter` | `boolean` | With `maxLength` |
266
+ | `invalid` | `boolean` | |
267
+ | `valueLength` | `number` | For counter |
268
+
269
+ ---
270
+
271
+ ## Input
272
+
273
+ **Import:** `import { Input, inputVariants } from '@dito-uai/components'`
274
+
275
+ **Props (`InputProps`):** `InputHTMLAttributes` except `size`, `prefix`, `suffix`, `withAffix` (redefined).
276
+
277
+ | Prop | Type | Default | Notes |
278
+ |------|------|---------|--------|
279
+ | `size` | `'small' \| 'medium'` | `'medium'` | |
280
+ | `disabled` | `boolean` | — | |
281
+ | `invalid` | `boolean` | — | |
282
+ | `prefix` | `ReactNode` | — | Inside border |
283
+ | `suffix` | `ReactNode` | — | |
284
+ | `inputClassName` | `string` | — | Only on `<input>` |
285
+ | `id`, `value`, `defaultValue` | — | — | |
286
+
287
+ **`inputVariants`:** shared by `Search` and `Textarea`.
288
+
289
+ ---
290
+
291
+ ## Label
292
+
293
+ **Import:** `import { Label } from '@dito-uai/components'`
294
+
295
+ **Props (`LabelProps`):** extends `HTMLAttributes<HTMLSpanElement>` (outer wrapper).
296
+
297
+ | Prop | Type | Notes |
298
+ |------|------|--------|
299
+ | `text` | `string` | |
300
+ | `htmlFor` | `string` | Associates with control `id` |
301
+ | `suffix` | `React.ElementType` | Icon beside text |
302
+ | `invalid` | `boolean` | |
303
+
304
+ ---
305
+
306
+ ## Loading
307
+
308
+ **Import:** `import { Loading } from '@dito-uai/components'`
309
+
310
+ **Props (`LoadingProps`):**
311
+
312
+ | Prop | Type | Default |
313
+ |------|------|---------|
314
+ | `className` | `string` | — |
315
+ | `size` | `'TINY' \| 'SMALL' \| 'NORMAL' \| 'LARGE' \| 'HUGE'` | `'NORMAL'` |
316
+ | `color` | `'WHITE' \| 'RED' \| 'BLUE' \| 'GREEN' \| 'GRAY' \| 'INDIGO' \| 'TRANSPARENT'` | `'GREEN'` |
317
+ | `fill` | same union as `color` | `'TRANSPARENT'` |
318
+
319
+ **Note:** values are **UPPERCASE**.
320
+
321
+ ---
322
+
323
+ ## Message
324
+
325
+ **Import:** `import { Message, MessageContainer, MessageType } from '@dito-uai/components'`
326
+
327
+ **Setup:** `<MessageContainer />` at app root (default bottom-right, multi-container).
328
+
329
+ **API:**
330
+
331
+ - `Message.open(props: MessageProps)` — `type` defaults to `MessageType.INFO`
332
+ - `Message.success(text, duration?)`
333
+ - `Message.error(text, duration?)` — maps to danger type
334
+ - `Message.info(text, duration?)`
335
+ - `Message.warning(text, duration?)`
336
+ - `Message.loading(text, duration?)`
337
+ - `Message.dismiss(toastId?)`
338
+
339
+ **`MessageProps` (for `open`):** `text`, `type?` (`MessageType`), `closable?` (default `false`), `duration?` (default `3000` or `false`), `containerId?`, `onClose?`, `onClick?`, + options from `ToastOptions` minus `type`.
340
+
341
+ **`MessageType`:** `SUCCESS`, `INFO`, `WARNING`, `DANGER`, `LOADING`.
342
+
343
+ **Example:**
344
+
345
+ ```tsx
346
+ Message.success('Saved');
347
+ Message.open({ type: MessageType.DANGER, text: 'Failed', closable: true, duration: false });
348
+ ```
349
+
350
+ ---
351
+
352
+ ## Popover
353
+
354
+ **Import:** `import { Popover, PopoverTrigger, PopoverContent } from '@dito-uai/components'`
355
+
356
+ **`PopoverContent`:** Radix Content with `align` (default `'center'`), `sideOffset` (default `4`), plus other Radix props.
357
+
358
+ ---
359
+
360
+ ## ProgressBar
361
+
362
+ **Import:** `import { ProgressBar } from '@dito-uai/components'`
363
+
364
+ **Props (`ProgressBarProps`):**
365
+
366
+ | Prop | Type | Notes |
367
+ |------|------|--------|
368
+ | `value` | `number` | 0–100 |
369
+ | `barBg` | `string` | Tailwind classes for track |
370
+ | `progressBg` | `string` | Tailwind classes for fill |
371
+
372
+ ---
373
+
374
+ ## Progress
375
+
376
+ **Import:** `import { Progress } from '@dito-uai/components'`
377
+
378
+ **Namespace:** `Progress.Indicator`, `Progress.Circle`, `Progress.Expanded`.
379
+
380
+ **`ProgressIndicatorProps`:** `value: string | number`, `progressBar?: number`, `usePercentageSymbol?: boolean` (default `true`), `bg?: 'indigo' | 'white'`, + `HTMLAttributes`.
381
+
382
+ **`CircleProps`:** `value: number`, `bg?`, `Icon?: ElementType`.
383
+
384
+ **`ExpandedProps`:** `value: number`, `bg?`, `text: ReactNode | string`.
385
+
386
+ ---
387
+
388
+ ## Radio
389
+
390
+ **Import:** `import { Radio } from '@dito-uai/components'`
391
+
392
+ **API:** `Radio.Group`, `Radio.Item`, `Radio.Card`.
393
+
394
+ - **`RadioGroupProps`:** Radix RadioGroup Root.
395
+ - **`RadioItemProps`:** Radix RadioGroup Item.
396
+ - **`RadioCardProps`:** extends Item: `title`, `description?`, `icon?`, `chipsProps?` (omit `size` on Chips — forced internally), `size?: 'md' | 'sm'`, `disabled?`.
397
+
398
+ **Example:**
399
+
400
+ ```tsx
401
+ <Radio.Group defaultValue="a">
402
+ <Radio.Item value="a" />
403
+ <Radio.Card value="b" title="Plan B" description="Details" />
404
+ </Radio.Group>
405
+ ```
406
+
407
+ ---
408
+
409
+ ## Scope
410
+
411
+ **Import:** `import { Scope } from '@dito-uai/components'`
412
+
413
+ **API:** `Scope.Group`, `Scope.Item`. Group uses fixed `type="single"`.
414
+
415
+ **`ScopeGroupProps`:** Radix ToggleGroup Root (no `type` in public API) + variants:
416
+
417
+ | Prop | Type | Default |
418
+ |------|------|---------|
419
+ | `variant` | `'default' \| 'light' \| 'green' \| 'red'` | `'default'` |
420
+ | `size` | `'default' \| 'small'` | `'default'` |
421
+ | `disabled` | `boolean` | `false` |
422
+
423
+ **`ScopeItemProps`:** Item props + `text: string`, `icon?`, `variant?`, `size?`, `disabled?`.
424
+
425
+ ---
426
+
427
+ ## Search
428
+
429
+ **Import:** `import { Search } from '@dito-uai/components'`
430
+
431
+ **Props (`SearchProps`):** `InputHTMLAttributes` + `inputVariants` (`size`, `disabled`, `invalid`) +
432
+
433
+ | Prop | Type | Notes |
434
+ |------|------|--------|
435
+ | `scope` | `{ options: { text: string; value: string }[]; selected?: string; onChange?: (v: string) => void }` | Left dropdown |
436
+
437
+ ---
438
+
439
+ ## SelectCard
440
+
441
+ **Import:** `import { SelectCard } from '@dito-uai/components'`
442
+
443
+ **API:** `SelectCard.Group`, `SelectCard.Card`.
444
+
445
+ **`SelectCardGroupProps`:** Radix RadioGroup Root.
446
+
447
+ **`SelectCardItemProps`:** (defined in module; not exported from barrel) Item + `title`, `description?`, `icon?`, `iconClassName?`, `size?: 'md' | 'sm'`, `disabled?`.
448
+
449
+ **Type export from package:** `SelectCardGroupProps` only.
450
+
451
+ ---
452
+
453
+ ## Sheet
454
+
455
+ **Import:** `import { Sheet } from '@dito-uai/components'`
456
+
457
+ **Props (`SheetProps`):**
458
+
459
+ | Prop | Type | Notes |
460
+ |------|------|--------|
461
+ | `title` | `string` | Header |
462
+ | `children` | `ReactNode` | |
463
+ | `isVisible` | `boolean` | Syncs open state |
464
+ | `CloseIcon` | `ElementType` | Close button |
465
+ | `maxWidth` | `string` | CSS |
466
+ | `onClose` | `(confirm: boolean) => void` | |
467
+
468
+ **Note:** use **`isVisible`**, not `visible`.
469
+
470
+ ---
471
+
472
+ ## Skeleton
473
+
474
+ **Import:** `import { Skeleton } from '@dito-uai/components'`
475
+
476
+ **Props (`SkeletonProps`):**
477
+
478
+ | Prop | Type | Default | Notes |
479
+ |------|------|---------|--------|
480
+ | `appearance` | `'default' \| 'ai'` | `'default'` | |
481
+ | `shape` | `'text' \| 'square' \| 'circle' \| 'rectangle'` | — | |
482
+ | `loading` | `boolean` | — | If `false` and `children` exist, renders children |
483
+
484
+ ---
485
+
486
+ ## Status
487
+
488
+ **Import:** `import { Status } from '@dito-uai/components'`
489
+
490
+ **`Status`:** read-only pill. **Props (`StatusSimpleProps`):** `text: string`, `status?: 'success' | 'attention' | 'info' | 'error' | 'disabled'`.
491
+
492
+ **`Status.Menu`:** status dropdown. **Props (`StatusMenuProps`):** `options: StatusOption[]`, `value: string`, `onChange?: (value: string) => void`, `status?`, + `HTMLAttributes`.
493
+
494
+ **`StatusOption`:** `text`, `value`, `status?` (same union).
495
+
496
+ **Example:**
497
+
498
+ ```tsx
499
+ <Status text="Active" status="success" />
500
+ <Status.Menu options={[{ text: 'OK', value: 'ok', status: 'success' }]} value="ok" onChange={set} />
501
+ ```
502
+
503
+ ---
504
+
505
+ ## Switch
506
+
507
+ **Import:** `import { Switch } from '@dito-uai/components'`
508
+
509
+ **Props (`SwitchProps`):** `HTMLAttributes<HTMLInputElement>` + `PropsWithChildren`
510
+
511
+ | Prop | Type | Notes |
512
+ |------|------|--------|
513
+ | `name` | `string` | Required (native checkbox) |
514
+ | `disabled` | `boolean` | |
515
+ | `checked` | `boolean` | |
516
+
517
+ **Example:**
518
+
519
+ ```tsx
520
+ <Switch name="alerts" checked={on} onChange={...}>Notifications</Switch>
521
+ ```
522
+
523
+ ---
524
+
525
+ ## Tabs
526
+
527
+ **Import:** `import { Tabs } from '@dito-uai/components'`
528
+ **Types:** `TabsLayoutProps`, `TabItem`
529
+
530
+ The exported component is the tab layout (internal implementation `TabsLayout`).
531
+
532
+ **`TabsLayoutProps`:**
533
+
534
+ | Prop | Type | Notes |
535
+ |------|------|--------|
536
+ | `tabs` | `TabItem[]` | Each item: `value`, `content`, `label?`, `iconPrefix?`, `suffix?`, `disabled?`, `className?` |
537
+ | `activeKey` | `string` | Controlled |
538
+ | `defaultActiveKey` | `string` | Uncontrolled |
539
+ | `className` | `string` | |
540
+ | `onValueChange` | `(value: string) => void` | |
541
+ | `onTabClick` | `(event, value?) => void` | |
542
+
543
+ **Example:**
544
+
545
+ ```tsx
546
+ <Tabs
547
+ defaultActiveKey="1"
548
+ tabs={[
549
+ { value: '1', label: 'Tab 1', content: <div /> },
550
+ { value: '2', label: 'Tab 2', content: <div /> },
551
+ ]}
552
+ />
553
+ ```
554
+
555
+ ---
556
+
557
+ ## Text
558
+
559
+ **Import:** `import { Text } from '@dito-uai/components'`
560
+
561
+ **Props (`TextProps`):** `HTMLAttributes<HTMLSpanElement>` + `children`.
562
+
563
+ | Prop | Type | Default |
564
+ |------|------|---------|
565
+ | `size` | `'H1' \| 'H2' \| 'H3' \| 'large' \| 'base' \| 'small' \| 'overline'` | `'base'` |
566
+ | `weight` | `'normal' \| 'medium' \| 'semibold'` | `'normal'` |
567
+
568
+ ---
569
+
570
+ ## Textarea
571
+
572
+ **Import:** `import { Textarea } from '@dito-uai/components'`
573
+
574
+ **Props (`TextareaProps`):** `TextareaHTMLAttributes` + `invalid?: boolean`.
575
+
576
+ ---
577
+
578
+ ## TipCard
579
+
580
+ **Import:** `import { TipCard } from '@dito-uai/components'`
581
+
582
+ **Props (`TipCardProps`):** `HTMLAttributes<HTMLDivElement>` +
583
+
584
+ | Prop | Type | Notes |
585
+ |------|------|--------|
586
+ | `message` | `string` | |
587
+ | `helpLink` | `string` | URL |
588
+ | `helpCenterTitle` | `string` | |
589
+ | `date` | `string` | Optional |
590
+
591
+ ---
592
+
593
+ ## Toggle (group)
594
+
595
+ **Import:** `import { Toggle, type ToggleGroupProps, type ToggleGroupItemProps } from '@dito-uai/components'`
596
+
597
+ **Note:** here `Toggle` is **only** `{ Group, Item }` from `toggle-group.tsx`. Do not confuse with a standalone toggle.
598
+
599
+ **`ToggleGroupProps`:** Radix ToggleGroup Root + `variant?: 'default'`, `size?: 'default'`.
600
+
601
+ **`ToggleGroupItemProps`:** Radix Item + same variants (from context).
602
+
603
+ **Example:**
604
+
605
+ ```tsx
606
+ <Toggle.Group type="single" defaultValue="a">
607
+ <Toggle.Item value="a">A</Toggle.Item>
608
+ <Toggle.Item value="b">B</Toggle.Item>
609
+ </Toggle.Group>
610
+ ```
611
+
612
+ ---
613
+
614
+ ## Tooltip
615
+
616
+ **Import:** `import { Tooltip, TooltipProvider } from '@dito-uai/components'`
617
+
618
+ **Props (`TooltipProps`):**
619
+
620
+ | Prop | Type | Notes |
621
+ |------|------|--------|
622
+ | `title` | `string \| ReactNode` | Tooltip content |
623
+ | `maxWidth` | `string` | Inner wrapper style |
624
+ | `children` | `ReactNode` | Trigger |
625
+
626
+ **Example:**
627
+
628
+ ```tsx
629
+ <TooltipProvider>
630
+ <Tooltip title="Delete">
631
+ <button type="button"><Icon /></button>
632
+ </Tooltip>
633
+ </TooltipProvider>
634
+ ```
635
+
636
+ ---
637
+
638
+ ## Internal (not exported from `index.ts`)
639
+
640
+ - `src/ui/internal/dropdown-content.tsx` — used by `Search` and `Status.Menu` for option lists.
641
+
642
+ ---
643
+
644
+ ## Maintenance
645
+
646
+ When the public API changes: update JSDoc in `src/ui/*.tsx`, exports in `src/index.ts`, and **this file** for LLM consumption in apps that install the package.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dito-uai/components",
3
- "version": "5.1.0-alpha.66",
3
+ "version": "5.1.0-alpha.67",
4
4
  "description": "Dito's design system component library, made in TSX",
5
5
  "license": "MIT",
6
6
  "repository": "git+https://github.com/ditointernet/dito-uai.git",
@@ -17,7 +17,8 @@
17
17
  "dist/",
18
18
  "./tailwind.config.ts",
19
19
  "./tailwind-preset.ts",
20
- "./lib/colors-utils.ts"
20
+ "./lib/colors-utils.ts",
21
+ "./llms.md"
21
22
  ],
22
23
  "main": "dist/index.js",
23
24
  "module": "dist/index.mjs",