laif-ds 0.2.74 → 0.2.76

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 (155) hide show
  1. package/dist/CHANGELOG.md +446 -0
  2. package/dist/agent-docs/adoption-report.json +615 -0
  3. package/dist/agent-docs/components/Accordion.md +46 -16
  4. package/dist/agent-docs/components/Alert.md +90 -95
  5. package/dist/agent-docs/components/AlertDialog.md +132 -126
  6. package/dist/agent-docs/components/AppEditor.md +90 -90
  7. package/dist/agent-docs/components/AppRadioGroup.md +18 -18
  8. package/dist/agent-docs/components/AppSidebar.md +129 -122
  9. package/dist/agent-docs/components/AppStepper.md +81 -77
  10. package/dist/agent-docs/components/AspectRatio.md +70 -62
  11. package/dist/agent-docs/components/AudioVisualizer.md +5 -5
  12. package/dist/agent-docs/components/Avatar.md +112 -113
  13. package/dist/agent-docs/components/Badge.md +123 -118
  14. package/dist/agent-docs/components/Breadcrumb.md +8 -1
  15. package/dist/agent-docs/components/Button.md +131 -129
  16. package/dist/agent-docs/components/Card.md +172 -147
  17. package/dist/agent-docs/components/Carousel.md +148 -129
  18. package/dist/agent-docs/components/Chat.md +121 -109
  19. package/dist/agent-docs/components/ChatMessage.md +72 -61
  20. package/dist/agent-docs/components/Checkbox.md +150 -135
  21. package/dist/agent-docs/components/CircularProgress.md +53 -49
  22. package/dist/agent-docs/components/CodeHighlighter.md +4 -4
  23. package/dist/agent-docs/components/Collapsible.md +114 -95
  24. package/dist/agent-docs/components/Command.md +141 -142
  25. package/dist/agent-docs/components/Confirmer.md +182 -175
  26. package/dist/agent-docs/components/ContextMenu.md +196 -191
  27. package/dist/agent-docs/components/DataCrossTable.md +114 -94
  28. package/dist/agent-docs/components/DataTable.md +32 -24
  29. package/dist/agent-docs/components/Dialog.md +130 -125
  30. package/dist/agent-docs/components/Drawer.md +141 -127
  31. package/dist/agent-docs/components/FilePreviewer.md +138 -139
  32. package/dist/agent-docs/components/FileUploader.md +149 -129
  33. package/dist/agent-docs/components/Form.md +3 -1
  34. package/dist/agent-docs/components/FormComposer.md +163 -137
  35. package/dist/agent-docs/components/GanttChart.md +125 -122
  36. package/dist/agent-docs/components/HoverCard.md +1 -1
  37. package/dist/agent-docs/components/Icon.md +98 -99
  38. package/dist/agent-docs/components/Input.md +173 -138
  39. package/dist/agent-docs/components/InputOtp.md +6 -1
  40. package/dist/agent-docs/components/InputSelector.md +94 -97
  41. package/dist/agent-docs/components/InterruptPrompt.md +4 -4
  42. package/dist/agent-docs/components/MarkdownRenderer.md +5 -2
  43. package/dist/agent-docs/components/Menubar.md +60 -57
  44. package/dist/agent-docs/components/MessageInput.md +134 -131
  45. package/dist/agent-docs/components/MessageList.md +110 -96
  46. package/dist/agent-docs/components/MultipleSelector.md +147 -146
  47. package/dist/agent-docs/components/NavigationMenu.md +6 -2
  48. package/dist/agent-docs/components/Popover.md +112 -103
  49. package/dist/agent-docs/components/PromptSuggestions.md +5 -5
  50. package/dist/agent-docs/components/RadioGroup.md +97 -90
  51. package/dist/agent-docs/components/Resizable.md +4 -1
  52. package/dist/agent-docs/components/ResizePrompt.md +12 -13
  53. package/dist/agent-docs/components/ScrollArea.md +6 -2
  54. package/dist/agent-docs/components/SecurePdfViewer.md +10 -6
  55. package/dist/agent-docs/components/Select.md +131 -132
  56. package/dist/agent-docs/components/Sheet.md +8 -1
  57. package/dist/agent-docs/components/ShikiHighlighter.md +5 -5
  58. package/dist/agent-docs/components/Sidebar.md +94 -85
  59. package/dist/agent-docs/components/Slider.md +62 -58
  60. package/dist/agent-docs/components/Sonner.md +1 -0
  61. package/dist/agent-docs/components/Spinner.md +14 -14
  62. package/dist/agent-docs/components/Stepper.md +93 -67
  63. package/dist/agent-docs/components/Switch.md +41 -42
  64. package/dist/agent-docs/components/TableSkeleton.md +8 -8
  65. package/dist/agent-docs/components/Tabs.md +106 -86
  66. package/dist/agent-docs/components/TextArea.md +51 -52
  67. package/dist/agent-docs/components/ThemeSwitcher.md +72 -69
  68. package/dist/agent-docs/components/Toaster.md +1 -0
  69. package/dist/agent-docs/components/Tooltip.md +102 -91
  70. package/dist/agent-docs/components/Typo.md +68 -65
  71. package/dist/agent-docs/components/WeeklyCalendar.md +63 -64
  72. package/dist/agent-docs/components-list.md +1 -0
  73. package/dist/agent-docs/manifest.json +5981 -0
  74. package/dist/agent-docs/truncated-cell.md +342 -0
  75. package/dist/components/editor/editor-hooks/use-update-toolbar.js +6 -6
  76. package/dist/components/editor/plugins/actions/counter-character-plugin.js +6 -6
  77. package/dist/components/editor/plugins/toolbar/font-format-toolbar-plugin.js +18 -18
  78. package/dist/components/editor/plugins/toolbar/history-toolbar-plugin.js +10 -10
  79. package/dist/components/editor/plugins/toolbar/toolbar-plugin.js +9 -9
  80. package/dist/components/ui/app-checkbox.js +1 -1
  81. package/dist/components/ui/app-dialog.js +70 -64
  82. package/dist/components/ui/app-editor.js +51 -51
  83. package/dist/components/ui/app-form.js +81 -81
  84. package/dist/components/ui/app-multiple-select-dropdown.js +36 -36
  85. package/dist/components/ui/app-select.js +109 -104
  86. package/dist/components/ui/app-sidebar.js +41 -41
  87. package/dist/components/ui/app-stepper.js +1 -1
  88. package/dist/components/ui/app-time-picker.js +18 -18
  89. package/dist/components/ui/app-tooltip.js +1 -1
  90. package/dist/components/ui/async-select.js +5 -5
  91. package/dist/components/ui/audio-visualizer.js +61 -58
  92. package/dist/components/ui/card.js +1 -1
  93. package/dist/components/ui/carousel.js +2 -2
  94. package/dist/components/ui/chart.js +1 -1
  95. package/dist/components/ui/chat-message.js +8 -8
  96. package/dist/components/ui/chat.js +86 -88
  97. package/dist/components/ui/command.js +2 -2
  98. package/dist/components/ui/copy-button.js +4 -4
  99. package/dist/components/ui/date-picker.js +20 -20
  100. package/dist/components/ui/file-preview/index.js +13 -13
  101. package/dist/components/ui/file-previewer.js +12 -11
  102. package/dist/components/ui/file-uploader.js +86 -78
  103. package/dist/components/ui/form.js +2 -2
  104. package/dist/components/ui/gantt/components/Chart/Bars/Bars.js +56 -56
  105. package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarItem/BarItem.js +12 -12
  106. package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsItems/BarItems.js +1 -1
  107. package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsRow.js +4 -4
  108. package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/RepeteadBars/RepeteadBars.js +2 -2
  109. package/dist/components/ui/gantt/components/Chart/Chart.js +23 -23
  110. package/dist/components/ui/gantt/components/Chart/Scale/Scale.js +1 -1
  111. package/dist/components/ui/gantt/components/Chart/Tree/Tree.js +34 -34
  112. package/dist/components/ui/gantt/components/Controls/Controls.js +5 -5
  113. package/dist/components/ui/gantt/components/Gantt/Gantt.js +4 -4
  114. package/dist/components/ui/gantt/hooks/useGanttCalculate.js +25 -18
  115. package/dist/components/ui/input-selector.js +1 -1
  116. package/dist/components/ui/input.js +23 -23
  117. package/dist/components/ui/kanban.js +8 -9
  118. package/dist/components/ui/markdown-renderer.js +41 -35
  119. package/dist/components/ui/message-input.js +45 -44
  120. package/dist/components/ui/multiple-selector.js +91 -82
  121. package/dist/components/ui/secure-pdf-viewer.js +19 -7
  122. package/dist/components/ui/sidebar.js +1 -1
  123. package/dist/components/ui/slider.js +1 -1
  124. package/dist/components/ui/spinner.js +4 -4
  125. package/dist/components/ui/stepper.js +157 -138
  126. package/dist/components/ui/tables/data-cross-table/data-cross-table-buttons.js +29 -29
  127. package/dist/components/ui/tables/data-cross-table/data-cross-table.js +258 -246
  128. package/dist/components/ui/tables/data-table/components/data-table-advanced-filter.js +4 -1
  129. package/dist/components/ui/tables/data-table/components/data-table-body.js +211 -367
  130. package/dist/components/ui/tables/data-table/components/data-table-filter-inputs.js +114 -112
  131. package/dist/components/ui/tables/data-table/components/data-table-filters.js +116 -96
  132. package/dist/components/ui/tables/data-table/components/data-table-header.js +211 -0
  133. package/dist/components/ui/tables/data-table/components/data-table-searchbar.js +8 -8
  134. package/dist/components/ui/tables/data-table/components/data-table-skeleton-rows.js +33 -0
  135. package/dist/components/ui/tables/data-table/data-table.js +258 -250
  136. package/dist/components/ui/tables/data-table/data-table.service.js +112 -97
  137. package/dist/components/ui/tables/data-table/data-table.utils.js +25 -15
  138. package/dist/components/ui/textarea.js +2 -2
  139. package/dist/components/ui/theme-switcher.js +1 -1
  140. package/dist/components/ui/toggle-group.js +2 -2
  141. package/dist/components/ui/truncated-cell.js +100 -0
  142. package/dist/components/ui/weekly-calendar/appointment-card.js +16 -16
  143. package/dist/components/ui/weekly-calendar/calendar-context.js +6 -6
  144. package/dist/components/ui/weekly-calendar/calendar-header.js +12 -12
  145. package/dist/components/ui/weekly-calendar/day-column.js +16 -16
  146. package/dist/components/ui/weekly-calendar/time-column.js +4 -4
  147. package/dist/components/ui/weekly-calendar/weekly-calendar.js +4 -4
  148. package/dist/hooks/use-audio-recording.js +1 -1
  149. package/dist/hooks/use-auto-scroll.js +18 -18
  150. package/dist/hooks/use-autosize-textarea.js +12 -13
  151. package/dist/index.d.ts +100 -45
  152. package/dist/index.js +362 -360
  153. package/dist/lib/utils.js +6 -6
  154. package/dist/styles.v3.css +1 -1
  155. package/package.json +14 -4
@@ -1,69 +1,72 @@
1
- # ThemeSwitcher
2
-
3
- ## Overview
4
-
5
- Theme toggle with three options: system, light, dark. Uses a controlled/uncontrolled API and avoids hydration mismatch by rendering only after mount.
6
-
7
- ---
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | -------------- | ---------------------------------- | --------- | ----------- |
13
- | `value` | `"light" | "dark" | "system"` | `undefined` | Controlled theme value. |
14
- | `onChange` | `(theme: "light" | "dark" | "system") => void` | `undefined` | Called when theme changes. |
15
- | `defaultValue` | `"light" | "dark" | "system"` | `"system"` | Initial value when uncontrolled. |
16
- | `className` | `string` | `undefined` | Container classes. |
17
-
18
- ---
19
-
20
- ## Behavior
21
-
22
- - **SSR safe**: Renders `null` until mounted to prevent hydration mismatch.
23
- - **Active state**: Highlights the active option with a rounded background.
24
- - **Control**: Works in both controlled (`value`/`onChange`) and uncontrolled (`defaultValue`) modes.
25
-
26
- ---
27
-
28
- ## Examples
29
-
30
- ### Default (uncontrolled)
31
-
32
- ```tsx
33
- import { ThemeSwitcher } from "laif-ds";
34
-
35
- export function DefaultTheme() {
36
- return <ThemeSwitcher defaultValue="system" />;
37
- }
38
- ```
39
-
40
- ### Controlled
41
-
42
- ```tsx
43
- import * as React from "react";
44
- import { ThemeSwitcher } from "laif-ds";
45
-
46
- export function ControlledTheme() {
47
- const [theme, setTheme] = React.useState<"light" | "dark" | "system">("system");
48
- return (
49
- <div className="flex flex-col items-start gap-2">
50
- <ThemeSwitcher value={theme} onChange={setTheme} />
51
- <div className="text-d-muted-foreground text-sm">Current theme: <span className="font-medium">{theme}</span></div>
52
- </div>
53
- );
54
- }
55
- ```
56
-
57
- ### Custom styling
58
-
59
- ```tsx
60
- <ThemeSwitcher defaultValue="system" className="h-10 w-32 p-2" />
61
- ```
62
-
63
- ---
64
-
65
- ## Notes
66
-
67
- - **Icons**: The component renders icons internally; no configuration required.
68
- - **Persistence**: Persisting theme choice is up to the app (e.g., localStorage + class on `html`).
69
-
1
+ # ThemeSwitcher
2
+
3
+ ## Overview
4
+
5
+ Theme toggle with three options: system, light, dark. Uses a controlled/uncontrolled API and avoids hydration mismatch by rendering only after mount.
6
+
7
+ ---
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | -------------- | ---------------- | ----------- | ------------------ | ----------- | -------------------------------- |
13
+ | `value` | `"light" | "dark" | "system"` | `undefined` | Controlled theme value. |
14
+ | `onChange` | `(theme: "light" | "dark" | "system") => void` | `undefined` | Called when theme changes. |
15
+ | `defaultValue` | `"light" | "dark" | "system"` | `"system"` | Initial value when uncontrolled. |
16
+ | `className` | `string` | `undefined` | Container classes. |
17
+
18
+ ---
19
+
20
+ ## Behavior
21
+
22
+ - **SSR safe**: Renders `null` until mounted to prevent hydration mismatch.
23
+ - **Active state**: Highlights the active option with a rounded background.
24
+ - **Control**: Works in both controlled (`value`/`onChange`) and uncontrolled (`defaultValue`) modes.
25
+
26
+ ---
27
+
28
+ ## Examples
29
+
30
+ ### Default (uncontrolled)
31
+
32
+ ```tsx
33
+ import { ThemeSwitcher } from "laif-ds";
34
+
35
+ export function DefaultTheme() {
36
+ return <ThemeSwitcher defaultValue="system" />;
37
+ }
38
+ ```
39
+
40
+ ### Controlled
41
+
42
+ ```tsx
43
+ import * as React from "react";
44
+ import { ThemeSwitcher } from "laif-ds";
45
+
46
+ export function ControlledTheme() {
47
+ const [theme, setTheme] = React.useState<"light" | "dark" | "system">(
48
+ "system",
49
+ );
50
+ return (
51
+ <div className="flex flex-col items-start gap-2">
52
+ <ThemeSwitcher value={theme} onChange={setTheme} />
53
+ <div className="text-d-muted-foreground text-sm">
54
+ Current theme: <span className="font-medium">{theme}</span>
55
+ </div>
56
+ </div>
57
+ );
58
+ }
59
+ ```
60
+
61
+ ### Custom styling
62
+
63
+ ```tsx
64
+ <ThemeSwitcher defaultValue="system" className="h-10 w-32 p-2" />
65
+ ```
66
+
67
+ ---
68
+
69
+ ## Notes
70
+
71
+ - **Icons**: The component renders icons internally; no configuration required.
72
+ - **Persistence**: Persisting theme choice is up to the app (e.g., localStorage + class on `html`).
@@ -17,6 +17,7 @@ export function App() {
17
17
  ```
18
18
 
19
19
  Applies classNames for:
20
+
20
21
  - `toast`
21
22
  - `description`
22
23
  - `actionButton`
@@ -1,91 +1,102 @@
1
- # Tooltip
2
-
3
- ## Overview
4
-
5
- Radix Tooltip wrappers with DS tokens and variants. Includes `TooltipProvider` for global delay, `Tooltip` root, `TooltipTrigger`, and `TooltipContent` with `primary` and `card` looks.
6
-
7
- ---
8
-
9
- ## Components & Props
10
-
11
- - **TooltipProvider**
12
- - `delayDuration?: number` (default `0`)
13
- - Provides default open delay for nested tooltips.
14
- - **Tooltip** (Root)
15
- - Inherits Radix `TooltipPrimitive.Root` props: `open?`, `defaultOpen?`, `onOpenChange?`, `disableHoverableContent?`.
16
- - Note: `delayDuration` is set via `TooltipProvider`, not here.
17
- - **TooltipTrigger**
18
- - Inherits Radix `Trigger` props. Use `asChild` to wrap buttons/links.
19
- - **TooltipContent**
20
- - Inherits Radix `Content` props: `side?`, `align?`, `sideOffset?` (default `0`), `alignOffset?`.
21
- - `variant?: "primary" | "card"` (default `"primary"`).
22
-
23
- ---
24
-
25
- ## Examples
26
-
27
- ### Default
28
-
29
- ```tsx
30
- import { Button, Tooltip, TooltipTrigger, TooltipContent } from "laif-ds";
31
-
32
- export function Basic() {
33
- return (
34
- <Tooltip>
35
- <TooltipTrigger asChild>
36
- <Button variant="outline">Passa sopra</Button>
37
- </TooltipTrigger>
38
- <TooltipContent>Questo è un tooltip</TooltipContent>
39
- </Tooltip>
40
- );
41
- }
42
- ```
43
-
44
- ### Positioning
45
-
46
- ```tsx
47
- <div className="flex items-center gap-4">
48
- <Tooltip>
49
- <TooltipTrigger asChild><Button size="sm">Top</Button></TooltipTrigger>
50
- <TooltipContent side="top" sideOffset={5}>Tooltip in alto</TooltipContent>
51
- </Tooltip>
52
- <Tooltip>
53
- <TooltipTrigger asChild><Button size="sm">Right</Button></TooltipTrigger>
54
- <TooltipContent side="right" sideOffset={5}>Tooltip a destra</TooltipContent>
55
- </Tooltip>
56
- </div>
57
- ```
58
-
59
- ### With Delay
60
-
61
- ```tsx
62
- import { TooltipProvider } from "laif-ds";
63
-
64
- export function WithDelay() {
65
- return (
66
- <TooltipProvider delayDuration={500}>
67
- <Tooltip>
68
- <TooltipTrigger asChild><Button>Ritardo 500ms</Button></TooltipTrigger>
69
- <TooltipContent>Appare dopo 500ms</TooltipContent>
70
- </Tooltip>
71
- </TooltipProvider>
72
- );
73
- }
74
- ```
75
-
76
- ### Card Variant
77
-
78
- ```tsx
79
- <Tooltip>
80
- <TooltipTrigger asChild><Button variant="ghost">Info</Button></TooltipTrigger>
81
- <TooltipContent variant="card">Contenuto con bordo e shadow</TooltipContent>
82
- </Tooltip>
83
- ```
84
-
85
- ---
86
-
87
- ## Notes
88
-
89
- - **Variants**: `primary` for compact color tooltip; `card` for bordered content blocks.
90
- - **Groups**: Wrap toolbars with multiple triggers; provider can be defined once at app root.
91
-
1
+ # Tooltip
2
+
3
+ ## Overview
4
+
5
+ Radix Tooltip wrappers with DS tokens and variants. Includes `TooltipProvider` for global delay, `Tooltip` root, `TooltipTrigger`, and `TooltipContent` with `primary` and `card` looks.
6
+
7
+ ---
8
+
9
+ ## Components & Props
10
+
11
+ - **TooltipProvider**
12
+ - `delayDuration?: number` (default `0`)
13
+ - Provides default open delay for nested tooltips.
14
+ - **Tooltip** (Root)
15
+ - Inherits Radix `TooltipPrimitive.Root` props: `open?`, `defaultOpen?`, `onOpenChange?`, `disableHoverableContent?`.
16
+ - Note: `delayDuration` is set via `TooltipProvider`, not here.
17
+ - **TooltipTrigger**
18
+ - Inherits Radix `Trigger` props. Use `asChild` to wrap buttons/links.
19
+ - **TooltipContent**
20
+ - Inherits Radix `Content` props: `side?`, `align?`, `sideOffset?` (default `0`), `alignOffset?`.
21
+ - `variant?: "primary" | "card"` (default `"primary"`).
22
+
23
+ ---
24
+
25
+ ## Examples
26
+
27
+ ### Default
28
+
29
+ ```tsx
30
+ import { Button, Tooltip, TooltipTrigger, TooltipContent } from "laif-ds";
31
+
32
+ export function Basic() {
33
+ return (
34
+ <Tooltip>
35
+ <TooltipTrigger asChild>
36
+ <Button variant="outline">Passa sopra</Button>
37
+ </TooltipTrigger>
38
+ <TooltipContent>Questo è un tooltip</TooltipContent>
39
+ </Tooltip>
40
+ );
41
+ }
42
+ ```
43
+
44
+ ### Positioning
45
+
46
+ ```tsx
47
+ <div className="flex items-center gap-4">
48
+ <Tooltip>
49
+ <TooltipTrigger asChild>
50
+ <Button size="sm">Top</Button>
51
+ </TooltipTrigger>
52
+ <TooltipContent side="top" sideOffset={5}>
53
+ Tooltip in alto
54
+ </TooltipContent>
55
+ </Tooltip>
56
+ <Tooltip>
57
+ <TooltipTrigger asChild>
58
+ <Button size="sm">Right</Button>
59
+ </TooltipTrigger>
60
+ <TooltipContent side="right" sideOffset={5}>
61
+ Tooltip a destra
62
+ </TooltipContent>
63
+ </Tooltip>
64
+ </div>
65
+ ```
66
+
67
+ ### With Delay
68
+
69
+ ```tsx
70
+ import { TooltipProvider } from "laif-ds";
71
+
72
+ export function WithDelay() {
73
+ return (
74
+ <TooltipProvider delayDuration={500}>
75
+ <Tooltip>
76
+ <TooltipTrigger asChild>
77
+ <Button>Ritardo 500ms</Button>
78
+ </TooltipTrigger>
79
+ <TooltipContent>Appare dopo 500ms</TooltipContent>
80
+ </Tooltip>
81
+ </TooltipProvider>
82
+ );
83
+ }
84
+ ```
85
+
86
+ ### Card Variant
87
+
88
+ ```tsx
89
+ <Tooltip>
90
+ <TooltipTrigger asChild>
91
+ <Button variant="ghost">Info</Button>
92
+ </TooltipTrigger>
93
+ <TooltipContent variant="card">Contenuto con bordo e shadow</TooltipContent>
94
+ </Tooltip>
95
+ ```
96
+
97
+ ---
98
+
99
+ ## Notes
100
+
101
+ - **Variants**: `primary` for compact color tooltip; `card` for bordered content blocks.
102
+ - **Groups**: Wrap toolbars with multiple triggers; provider can be defined once at app root.
@@ -1,65 +1,68 @@
1
- # Typo
2
-
3
- ## Overview
4
-
5
- Typography component with predefined variants for headings, body text, captions, and utility text. Renders a semantic HTML tag per variant (overridable via `as`).
6
-
7
- ---
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | ---------- | --------------------------------- | --------- | ----------- |
13
- | `variant` | `TypoVariant` | `"body"` | Typographic style to apply. |
14
- | `as` | `React.ElementType` | auto | Override rendered HTML element. |
15
- | `className`| `string` | `undefined` | Extra classes. |
16
- | `...props` | `React.HTMLAttributes<HTMLElement>` | — | Spread to rendered element. |
17
-
18
- `TypoVariant`:
19
-
20
- - `"hero-title"`, `"title"`, `"subtitle"`
21
- - `"body"`, `"body-bold"`
22
- - `"caption"`, `"overline"`, `"button"`, `"small"`
23
- - `"h1"`, `"h2"`, `"h3"`, `"h4"`, `"h5"`
24
-
25
- ---
26
-
27
- ## Behavior
28
-
29
- - **Semantic tag**: Each variant maps to a sensible HTML tag (e.g., `h1` for `h1`, `p` for `body`).
30
- - **Theming**: Variants use DS tokens for color and size; add `className` to tweak.
31
-
32
- ---
33
-
34
- ## Examples
35
-
36
- ```tsx
37
- import { Typo } from "laif-ds";
38
-
39
- export function Variants() {
40
- return (
41
- <div className="space-y-2">
42
- <Typo variant="hero-title">Hero Title</Typo>
43
- <Typo variant="title">Page Title</Typo>
44
- <Typo variant="subtitle">Subtitle</Typo>
45
- <Typo variant="body">Regular body text</Typo>
46
- <Typo variant="body-bold">Bold body text</Typo>
47
- <Typo variant="caption">Caption</Typo>
48
- <Typo variant="overline">Overline</Typo>
49
- <Typo variant="small">Small text</Typo>
50
- </div>
51
- );
52
- }
53
-
54
- export function OverrideElement() {
55
- return <Typo variant="body" as="span">Inline body as span</Typo>;
56
- }
57
- ```
58
-
59
- ---
60
-
61
- ## Notes
62
-
63
- - **Accessibility**: Use heading variants (`h1`–`h5`) to reflect document structure.
64
- - **Consistency**: Prefer `variant` over ad‑hoc classes for consistent typography.
65
-
1
+ # Typo
2
+
3
+ ## Overview
4
+
5
+ Typography component with predefined variants for headings, body text, captions, and utility text. Renders a semantic HTML tag per variant (overridable via `as`).
6
+
7
+ ---
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | ----------- | ----------------------------------- | ----------- | ------------------------------- |
13
+ | `variant` | `TypoVariant` | `"body"` | Typographic style to apply. |
14
+ | `as` | `React.ElementType` | auto | Override rendered HTML element. |
15
+ | `className` | `string` | `undefined` | Extra classes. |
16
+ | `...props` | `React.HTMLAttributes<HTMLElement>` | — | Spread to rendered element. |
17
+
18
+ `TypoVariant`:
19
+
20
+ - `"hero-title"`, `"title"`, `"subtitle"`
21
+ - `"body"`, `"body-bold"`
22
+ - `"caption"`, `"overline"`, `"button"`, `"small"`
23
+ - `"h1"`, `"h2"`, `"h3"`, `"h4"`, `"h5"`
24
+
25
+ ---
26
+
27
+ ## Behavior
28
+
29
+ - **Semantic tag**: Each variant maps to a sensible HTML tag (e.g., `h1` for `h1`, `p` for `body`).
30
+ - **Theming**: Variants use DS tokens for color and size; add `className` to tweak.
31
+
32
+ ---
33
+
34
+ ## Examples
35
+
36
+ ```tsx
37
+ import { Typo } from "laif-ds";
38
+
39
+ export function Variants() {
40
+ return (
41
+ <div className="space-y-2">
42
+ <Typo variant="hero-title">Hero Title</Typo>
43
+ <Typo variant="title">Page Title</Typo>
44
+ <Typo variant="subtitle">Subtitle</Typo>
45
+ <Typo variant="body">Regular body text</Typo>
46
+ <Typo variant="body-bold">Bold body text</Typo>
47
+ <Typo variant="caption">Caption</Typo>
48
+ <Typo variant="overline">Overline</Typo>
49
+ <Typo variant="small">Small text</Typo>
50
+ </div>
51
+ );
52
+ }
53
+
54
+ export function OverrideElement() {
55
+ return (
56
+ <Typo variant="body" as="span">
57
+ Inline body as span
58
+ </Typo>
59
+ );
60
+ }
61
+ ```
62
+
63
+ ---
64
+
65
+ ## Notes
66
+
67
+ - **Accessibility**: Use heading variants (`h1`–`h5`) to reflect document structure.
68
+ - **Consistency**: Prefer `variant` over ad‑hoc classes for consistent typography.
@@ -1,64 +1,63 @@
1
- # WeeklyCalendar
2
-
3
- ## Overview
4
-
5
- Week-view calendar with day columns, time column, current timeline, optional week navigation and appointment grouping by category.
6
-
7
- ---
8
-
9
- ## Props
10
-
11
- | Prop | Type | Default | Description |
12
- | ------------------ | -------------------------------------------- | ------- | ----------- |
13
- | `appointments` | `CalendarAppointment[]` | `[]` | Appointments to render across the week. |
14
- | `onWeekChange` | `(weekOffset: number, weekStart: string, weekEnd: string) => void` | `undefined` | Emitted when navigating weeks. |
15
- | `initialWeekOffset`| `number` | `0` | 0 = current week; negative/positive for past/future. |
16
- | `showNavigation` | `boolean` | `true` | Show previous/next/current week controls. |
17
- | `showWeekIndicator`| `boolean` | `false` | Show current week label. |
18
- | `enableGrouping` | `boolean` | `false` | Group appointments by `appointment.groupBy`. |
19
- | `groupLabel` | `string` | `undefined` | Group header label. |
20
- | `calendarStartHour`| `number` | `8` | First visible hour (0-23). |
21
- | `calendarEndHour` | `number` | `20` | Last visible hour (0-23). |
22
- | `todayString` | `string` | `"Oggi"` | Label for "today" button.
23
-
24
- `CalendarAppointment` minimal shape: `{ id: number|string; title: string; date: YYYY-MM-DD; startTime: HH:mm; endTime: HH:mm; description?: string; color?: string; attributes?: { key: string; value: string; showTooltip?: boolean; showPreview?: boolean }[]; groupBy?: string }`.
25
-
26
- ---
27
-
28
- ## Behavior
29
-
30
- - **Navigation**: Previous/next/current week; `onWeekChange` returns offset and ISO dates.
31
- - **Grouping**: When `enableGrouping`, appointments are grouped under `groupBy` headings per day.
32
- - **Attributes**: Show in tooltip or in preview card depending on flags.
33
-
34
- ---
35
-
36
- ## Examples
37
-
38
- ```tsx
39
- import { WeeklyCalendar } from "laif-ds";
40
- import { mockAppointments } from "laif-ds";
41
-
42
- export function GroupedCalendar() {
43
- return (
44
- <div className="container mx-auto overflow-y-auto">
45
- <WeeklyCalendar
46
- appointments={mockAppointments}
47
- calendarStartHour={6}
48
- calendarEndHour={21}
49
- enableGrouping
50
- groupLabel="Aula studio"
51
- showNavigation
52
- />
53
- </div>
54
- );
55
- }
56
- ```
57
-
58
- ---
59
-
60
- ## Notes
61
-
62
- - **Localization**: Weekday labels are Italian by default; adapt as needed in upstream module.
63
- - **Performance**: Efficient day partitioning and rendering; large datasets should still be chunked server-side when possible.
64
-
1
+ # WeeklyCalendar
2
+
3
+ ## Overview
4
+
5
+ Week-view calendar with day columns, time column, current timeline, optional week navigation and appointment grouping by category.
6
+
7
+ ---
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | ------------------- | ------------------------------------------------------------------ | ----------- | ---------------------------------------------------- |
13
+ | `appointments` | `CalendarAppointment[]` | `[]` | Appointments to render across the week. |
14
+ | `onWeekChange` | `(weekOffset: number, weekStart: string, weekEnd: string) => void` | `undefined` | Emitted when navigating weeks. |
15
+ | `initialWeekOffset` | `number` | `0` | 0 = current week; negative/positive for past/future. |
16
+ | `showNavigation` | `boolean` | `true` | Show previous/next/current week controls. |
17
+ | `showWeekIndicator` | `boolean` | `false` | Show current week label. |
18
+ | `enableGrouping` | `boolean` | `false` | Group appointments by `appointment.groupBy`. |
19
+ | `groupLabel` | `string` | `undefined` | Group header label. |
20
+ | `calendarStartHour` | `number` | `8` | First visible hour (0-23). |
21
+ | `calendarEndHour` | `number` | `20` | Last visible hour (0-23). |
22
+ | `todayString` | `string` | `"Oggi"` | Label for "today" button. |
23
+
24
+ `CalendarAppointment` minimal shape: `{ id: number|string; title: string; date: YYYY-MM-DD; startTime: HH:mm; endTime: HH:mm; description?: string; color?: string; attributes?: { key: string; value: string; showTooltip?: boolean; showPreview?: boolean }[]; groupBy?: string }`.
25
+
26
+ ---
27
+
28
+ ## Behavior
29
+
30
+ - **Navigation**: Previous/next/current week; `onWeekChange` returns offset and ISO dates.
31
+ - **Grouping**: When `enableGrouping`, appointments are grouped under `groupBy` headings per day.
32
+ - **Attributes**: Show in tooltip or in preview card depending on flags.
33
+
34
+ ---
35
+
36
+ ## Examples
37
+
38
+ ```tsx
39
+ import { WeeklyCalendar } from "laif-ds";
40
+ import { mockAppointments } from "laif-ds";
41
+
42
+ export function GroupedCalendar() {
43
+ return (
44
+ <div className="container mx-auto overflow-y-auto">
45
+ <WeeklyCalendar
46
+ appointments={mockAppointments}
47
+ calendarStartHour={6}
48
+ calendarEndHour={21}
49
+ enableGrouping
50
+ groupLabel="Aula studio"
51
+ showNavigation
52
+ />
53
+ </div>
54
+ );
55
+ }
56
+ ```
57
+
58
+ ---
59
+
60
+ ## Notes
61
+
62
+ - **Localization**: Weekday labels are Italian by default; adapt as needed in upstream module.
63
+ - **Performance**: Efficient day partitioning and rendering; large datasets should still be chunked server-side when possible.
@@ -85,6 +85,7 @@ This document provides a complete mapping of all components available in the lai
85
85
  - **Pagination** - Page navigation component for paginated content
86
86
  - **Table** - Basic table component with styling
87
87
  - **TableSkeleton** - Loading skeleton for table components
88
+ - **TruncatedCell** - Text display component with automatic truncation detection and popover preview
88
89
  - **Typo** - Typography component for consistent text styling
89
90
 
90
91
  ### Content & Media Components