@app-studio/web 0.9.34 → 0.9.36

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 (37) hide show
  1. package/dist/components/Calendar/Calendar/Calendar.style.d.ts +4 -0
  2. package/dist/components/OKR/OKR/OKR.props.d.ts +72 -0
  3. package/dist/components/OKR/OKR/OKR.style.d.ts +19 -0
  4. package/dist/components/OKR/OKR/OKR.view.d.ts +4 -0
  5. package/dist/components/OKR/OKR.d.ts +4 -0
  6. package/dist/components/index.d.ts +4 -3
  7. package/dist/pages/okr.page.d.ts +3 -0
  8. package/dist/web.cjs.development.js +595 -760
  9. package/dist/web.cjs.development.js.map +1 -1
  10. package/dist/web.cjs.production.min.js +1 -1
  11. package/dist/web.cjs.production.min.js.map +1 -1
  12. package/dist/web.esm.js +595 -760
  13. package/dist/web.esm.js.map +1 -1
  14. package/dist/web.umd.development.js +598 -762
  15. package/dist/web.umd.development.js.map +1 -1
  16. package/dist/web.umd.production.min.js +1 -1
  17. package/dist/web.umd.production.min.js.map +1 -1
  18. package/docs/README.md +2 -1
  19. package/docs/components/Calendar.mdx +22 -110
  20. package/docs/components/Flow.mdx +1 -0
  21. package/docs/components/KanbanBoard.mdx +156 -0
  22. package/docs/components/OKR.mdx +475 -0
  23. package/docs/components/Title.mdx +1 -0
  24. package/docs/components/Tree.mdx +1 -0
  25. package/docs/components.md +178 -0
  26. package/package.json +1 -1
  27. package/dist/components/CalendarWeek/CalendarWeek/CalendarWeek.props.d.ts +0 -51
  28. package/dist/components/CalendarWeek/CalendarWeek/CalendarWeek.style.d.ts +0 -90
  29. package/dist/components/CalendarWeek/CalendarWeek/CalendarWeek.utils.d.ts +0 -51
  30. package/dist/components/CalendarWeek/CalendarWeek/CalendarWeek.view.d.ts +0 -3
  31. package/dist/components/CalendarWeek/CalendarWeek.d.ts +0 -1
  32. package/docs/api-reference/README.md +0 -103
  33. package/docs/api-reference/data-display/flow.md +0 -220
  34. package/docs/api-reference/data-display/tree.md +0 -210
  35. package/docs/api-reference/form/chat-input.md +0 -206
  36. package/docs/api-reference/utility/button.md +0 -145
  37. package/docs/api-reference/utility/title.md +0 -301
package/docs/README.md CHANGED
@@ -12,7 +12,8 @@ Welcome to the comprehensive documentation for the App Studio Web Component Libr
12
12
 
13
13
  ### Specialized Documentation
14
14
  - **[ADK Components](../README-ADK.md)** - Agent Development Kit integration
15
- - **[API Reference](./api-reference/README.md)** - Detailed component APIs
15
+ - **[Compoments Reference](./components.md)** - Summary of all component APIs
16
+ - **[Detailed Copoments](./components/)** - Detailed component APIs
16
17
  - **[Tutorials](./tutorials/README.md)** - Step-by-step guides
17
18
  - **[Contributing](./contributing/documentation.md)** - Contribution guidelines
18
19
 
@@ -88,49 +88,6 @@ export const MonthViewCalendar = () => {
88
88
  };
89
89
  ```
90
90
 
91
- ### **Custom Event Rendering**
92
- Customize how events are displayed using the `renderEvent` prop.
93
-
94
- ```tsx
95
- import React from 'react';
96
- import { Vertical, Horizontal } from 'app-studio';
97
- import { Calendar } from '../Calendar';
98
- import { CalendarEvent, CalendarRenderEventContext } from '../Calendar/Calendar.props';
99
- import { Text } from '../../Text/Text';
100
-
101
- export const CustomRenderCalendar = () => {
102
- const events: CalendarEvent[] = [
103
- {
104
- id: 1,
105
- title: 'High Priority Meeting',
106
- start: new Date(2025, 9, 15, 10, 0),
107
- metadata: { priority: 'high' },
108
- },
109
- ];
110
-
111
- const renderEvent = (event: CalendarEvent, context: CalendarRenderEventContext) => {
112
- const priority = event.metadata?.priority as string;
113
-
114
- return (
115
- <Vertical
116
- gap={8}
117
- padding={12}
118
- borderRadius={12}
119
- backgroundColor="color.error.50"
120
- borderWidth={1}
121
- borderStyle="solid"
122
- borderColor="color.error.200"
123
- >
124
- <Text fontWeight="600">{event.title}</Text>
125
- <Text fontSize={12} color="color.error.600">{priority}</Text>
126
- </Vertical>
127
- );
128
- };
129
-
130
- return <Calendar events={events} renderEvent={renderEvent} />;
131
- };
132
- ```
133
-
134
91
  ### **Week Starts On**
135
92
  Configure which day the week starts on (0 = Sunday, 1 = Monday, etc.).
136
93
 
@@ -146,78 +103,33 @@ export const WeekStartsOnMonday = () => {
146
103
  ### **Custom Styles**
147
104
  Customize the appearance of calendar elements using the `views` prop.
148
105
 
149
- ```tsx
150
- import React from 'react';
151
- import { Calendar } from '../Calendar';
152
-
153
- export const CustomStyledCalendar = () => {
154
- return (
155
- <Calendar
156
- views={{
157
- container: {
158
- backgroundColor: 'color.primary.50',
159
- borderColor: 'color.primary.300',
160
- },
161
- headerTitle: {
162
- color: 'color.primary.700',
163
- fontSize: 24,
164
- },
165
- event: {
166
- backgroundColor: 'color.primary.100',
167
- borderColor: 'color.primary.400',
168
- },
169
- }}
170
- />
171
- );
172
- };
173
- ```
174
-
175
- ### **Fixed Height with Scrolling**
176
- Set a fixed height for the calendar with scrollable content areas.
177
-
178
- ```tsx
179
- import React from 'react';
180
- import { Calendar } from '../Calendar';
181
-
182
- export const FixedHeightCalendar = () => {
183
- const events = [
184
- {
185
- id: 1,
186
- title: 'Team Meeting',
187
- start: new Date(2025, 9, 15, 10, 0),
188
- end: new Date(2025, 9, 15, 11, 0),
189
- },
190
- // ... more events
191
- ];
192
-
193
- return <Calendar events={events} height="600px" initialView="week" />;
194
- };
195
- ```
196
-
197
106
  ## Props
198
107
 
199
- | Prop | Type | Description | Default |
200
- | -------------- | ----------------------- | -------------------------------------------------------------- | ----------- |
201
- | events | CalendarEvent[] | Array of events to display in the calendar. | [] |
202
- | initialDate | Date \| string | Starting date displayed in the calendar. | new Date() |
203
- | initialView | 'day' \| 'week' \| 'month' | Initial visible view. | 'month' |
204
- | weekStartsOn | 0-6 | First day of the week (0 = Sunday, 1 = Monday, etc.). | 0 |
205
- | height | string \| number | Height of the calendar container (enables scrolling). | '800px' |
206
- | renderEvent | function | Custom render method for events. | - |
207
- | onDateChange | function | Callback when the visible anchor date changes. | - |
208
- | onViewChange | function | Callback when the active view changes. | - |
209
- | views | CalendarViews | Customize styling of calendar areas. | - |
108
+ | Prop | Type | Description | Default |
109
+ | --- | --- | --- | --- |
110
+ | `events` | `CalendarEvent[]` | Array of events to display. | `[]` |
111
+ | `initialDate` | `Date \| string` | Initial date to display (ISO string or Date object). | `new Date()` |
112
+ | `initialView` | `'day' \| 'week' \| 'month'` | Initial view to display. | `'month'` |
113
+ | `weekStartsOn` | `0-6` | Day the week starts on (0 = Sunday, 1 = Monday). | `0` |
114
+ | `onEventDrop` | `(event: CalendarEvent) => void` | Callback when an event is moved to a new date. | - |
115
+ | `onEventResize` | `(event: CalendarEvent) => void` | Callback when an event is resized. | - |
116
+ | `onEventAdd` | `(start: string, end: string) => void` | Callback when a date is double-clicked to add an event. | - |
117
+ | `onDateClick` | `(date: string) => void` | Callback when a date is clicked. | - |
118
+ | `onDateChange` | `(date: Date) => void` | Callback when the visible date range changes. | - |
119
+ | `onViewChange` | `(view: CalendarView) => void` | Callback when the active view changes. | - |
120
+ | `views` | `CalendarViews` | Style overrides for various parts of the component. | `{}` |
210
121
 
211
122
  ## CalendarEvent Interface
212
123
 
213
- | Property | Type | Description |
214
- | ----------- | --------------------- | ------------------------------------------------ |
215
- | id | string \| number | Unique identifier for the event. |
216
- | title | string | Event title shown in the calendar cell. |
217
- | start | Date \| string | Start date/time of the event. |
218
- | end | Date \| string | Optional end date/time of the event. |
219
- | description | string | Optional description or supporting information. |
220
- | metadata | Record<string, unknown> | Additional metadata for the event. |
124
+ | Property | Type | Description |
125
+ | --- | --- | --- |
126
+ | `id` | `string \| number` | Unique identifier for the event. |
127
+ | `title` | `string` | Event title shown in the calendar. |
128
+ | `start` | `string` | Start date/time in ISO format (`YYYY-MM-DD` or `YYYY-MM-DDTHH:MM`). |
129
+ | `end` | `string` | End date/time in ISO format (`YYYY-MM-DD` or `YYYY-MM-DDTHH:MM`). |
130
+ | `color` | `'blue' \| 'red' \| 'green' \| 'purple' \| 'orange'` | Color variant for the event. |
131
+ | `description` | `string` | Optional description (used for tooltips or custom rendering). |
132
+ | `metadata` | `Record<string, unknown>` | Additional metadata for custom logic. |
221
133
 
222
134
  ## CalendarViews Interface
223
135
 
@@ -255,3 +255,4 @@ The Flow component implements the following accessibility features:
255
255
  - Consider viewport size when determining initial node positions
256
256
  - Use the `onNodeAdd` callback to validate new node positions
257
257
  - Implement undo/redo functionality for node operations when needed
258
+
@@ -0,0 +1,156 @@
1
+ # KanbanBoard
2
+
3
+ A flexible Kanban board component for managing tasks and workflows. Features drag-and-drop functionality for cards between columns, customizable card and column rendering, and comprehensive styling options.
4
+
5
+ ### **Import**
6
+ ```tsx
7
+ import { KanbanBoard } from '@app-studio/web';
8
+ ```
9
+
10
+ ### **Default**
11
+ ```tsx
12
+ import React, { useState } from 'react';
13
+ import { KanbanBoard } from '../KanbanBoard';
14
+ import { KanbanBoardColumn } from '../KanbanBoard/KanbanBoard.props';
15
+
16
+ export const DefaultKanbanBoard = () => {
17
+ const [columns, setColumns] = useState<KanbanBoardColumn[]>([
18
+ {
19
+ id: 'todo',
20
+ title: 'To Do',
21
+ cards: [
22
+ { id: '1', title: 'Design System', description: 'Create a new design system.' },
23
+ { id: '2', title: 'API Integration', description: 'Integrate with the new API.' },
24
+ ],
25
+ },
26
+ {
27
+ id: 'inprogress',
28
+ title: 'In Progress',
29
+ cards: [
30
+ { id: '3', title: 'User Dashboard', description: 'Develop the main user dashboard.' },
31
+ ],
32
+ },
33
+ {
34
+ id: 'done',
35
+ title: 'Done',
36
+ cards: [
37
+ { id: '4', title: 'Project Setup', description: 'Initial project setup and configuration.' },
38
+ ],
39
+ },
40
+ ]);
41
+
42
+ return <KanbanBoard columns={columns} onChange={setColumns} />;
43
+ };
44
+ ```
45
+
46
+ ### **Custom Card Rendering**
47
+ Customize how cards are displayed using the `renderCard` prop.
48
+
49
+ ```tsx
50
+ import React, { useState } from 'react';
51
+ import { KanbanBoard } from '../KanbanBoard';
52
+ import { KanbanBoardColumn, KanbanBoardCard } from '../KanbanBoard/KanbanBoard.props';
53
+ import { View, Text, Horizontal } from 'app-studio';
54
+
55
+ export const CustomRenderKanbanBoard = () => {
56
+ const [columns, setColumns] = useState<KanbanBoardColumn[]>([
57
+ {
58
+ id: 'todo',
59
+ title: 'To Do',
60
+ cards: [
61
+ { id: '1', title: 'Design System', description: 'Create a new design system.', metadata: { priority: 'high' } },
62
+ { id: '2', title: 'API Integration', description: 'Integrate with the new API.', metadata: { priority: 'low' } },
63
+ ],
64
+ },
65
+ {
66
+ id: 'inprogress',
67
+ title: 'In Progress',
68
+ cards: [
69
+ { id: '3', title: 'User Dashboard', description: 'Develop the main user dashboard.', metadata: { priority: 'medium' } },
70
+ ],
71
+ },
72
+ {
73
+ id: 'done',
74
+ title: 'Done',
75
+ cards: [
76
+ { id: '4', title: 'Project Setup', description: 'Initial project setup and configuration.', metadata: { priority: 'low' } },
77
+ ],
78
+ },
79
+ ]);
80
+
81
+ const renderCard = (card: KanbanBoardCard, column: KanbanBoardColumn) => {
82
+ const priority = card.metadata?.priority as string;
83
+ const priorityColors = {
84
+ low: 'color.green.500',
85
+ medium: 'color.yellow.500',
86
+ high: 'color.red.500',
87
+ };
88
+
89
+ return (
90
+ <View>
91
+ <Horizontal alignItems="center" marginBottom={8}>
92
+ <View
93
+ width={8}
94
+ height={8}
95
+ borderRadius="50%"
96
+ backgroundColor={priorityColors[priority]}
97
+ marginRight={8}
98
+ />
99
+ <Text fontWeight="semibold">{card.title}</Text>
100
+ </Horizontal>
101
+ <Text fontSize={14} color="color.gray.600">
102
+ {card.description}
103
+ </Text>
104
+ </View>
105
+ );
106
+ };
107
+
108
+ return <KanbanBoard columns={columns} onChange={setColumns} renderCard={renderCard} />;
109
+ };
110
+ ```
111
+
112
+ ## Props
113
+
114
+ | Prop | Type | Description | Default |
115
+ | --- | --- | --- | --- |
116
+ | `columns` | `KanbanBoardColumn[]` | Array of columns to display. | `[]` |
117
+ | `onChange` | `(columns: KanbanBoardColumn[]) => void` | Callback when columns or cards are changed. | - |
118
+ | `renderCard` | `(card: KanbanBoardCard, column: KanbanBoardColumn) => React.ReactNode` | Custom render method for cards. | - |
119
+ | `renderColumnHeader` | `(column: KanbanBoardColumn) => React.ReactNode` | Custom render method for column headers. | - |
120
+ | `renderEmptyState` | `(column: KanbanBoardColumn) => React.ReactNode` | Custom render method for empty column state. | - |
121
+ | `views` | `KanbanBoardViews` | Style overrides for various parts of the component. | `{}` |
122
+
123
+ ## KanbanBoardColumn Interface
124
+
125
+ | Property | Type | Description |
126
+ | --- | --- | --- |
127
+ | `id` | `string` | Unique identifier for the column. |
128
+ | `title` | `string` | Column title shown in the header. |
129
+ | `cards` | `KanbanBoardCard[]` | Array of cards within the column. |
130
+ | `footer` | `React.ReactNode` | Optional footer content for the column. |
131
+ | `metadata` | `Record<string, unknown>` | Additional metadata for the column. |
132
+
133
+ ## KanbanBoardCard Interface
134
+
135
+ | Property | Type | Description |
136
+ | --- | --- | --- |
137
+ | `id` | `string` | Unique identifier for the card. |
138
+ | `title` | `string` | Card title. |
139
+ | `description` | `string` | Optional card description. |
140
+ | `metadata` | `Record<string, unknown>` | Additional metadata for the card. |
141
+
142
+ ## KanbanBoardViews Interface
143
+
144
+ Customize the appearance of different Kanban board elements.
145
+
146
+ | Property | Type | Description |
147
+ | --- | --- | --- |
148
+ | `board` | `ViewProps` | Main board container. |
149
+ | `column` | `ViewProps` | Individual column container. |
150
+ | `columnHeader` | `ViewProps` | Column header container. |
151
+ | `columnTitle` | `TextProps` | Column title text. |
152
+ | `columnBody` | `ViewProps` | Column body container (wraps cards). |
153
+ | `columnFooter` | `ViewProps` | Column footer container. |
154
+ | `card` | `ViewProps` | Individual card container. |
155
+ | `cardContent` | `ViewProps` | Content wrapper inside the card. |
156
+ | `emptyState` | `ViewProps` | Empty state container in a column. |