@app-studio/web 0.9.37 → 0.9.38
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/dist/components/ChatInput/ChatInput/ChatInput.style.d.ts +31 -0
- package/dist/components/Drawer/Drawer/Drawer.props.d.ts +61 -0
- package/dist/components/Drawer/Drawer/Drawer.style.d.ts +4 -0
- package/dist/components/Drawer/Drawer/Drawer.view.d.ts +7 -0
- package/dist/components/Drawer/Drawer.d.ts +2 -0
- package/dist/components/index.d.ts +2 -22
- package/dist/pages/drawer.page.d.ts +3 -0
- package/dist/utils/apiConfig.d.ts +2 -2
- package/dist/utils/typography.d.ts +3 -4
- package/dist/web.cjs.development.js +2413 -12466
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +2588 -12632
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.development.js +2428 -12478
- package/dist/web.umd.development.js.map +1 -1
- package/dist/web.umd.production.min.js +1 -1
- package/dist/web.umd.production.min.js.map +1 -1
- package/docs/components/Accordion.mdx +4 -4
- package/docs/components/Alert.mdx +1 -1
- package/docs/components/Background.mdx +5 -5
- package/docs/components/Badge.mdx +1 -1
- package/docs/components/Card.mdx +8 -8
- package/docs/components/Carousel.mdx +6 -6
- package/docs/components/ColorInput.mdx +1 -1
- package/docs/components/Drawer.mdx +164 -0
- package/docs/components/Gradient.mdx +6 -6
- package/docs/components/HoverCard.mdx +5 -5
- package/docs/components/KanbanBoard.mdx +128 -2
- package/docs/components/Link.mdx +2 -2
- package/docs/components/Menubar.mdx +1 -1
- package/docs/components/Message.mdx +4 -4
- package/docs/components/Modal.mdx +4 -4
- package/docs/components/OKR.mdx +40 -63
- package/docs/components/Tabs.mdx +1 -1
- package/docs/components/ToggleGroup.mdx +4 -4
- package/docs/components/Tooltip.mdx +2 -2
- package/docs/conventions.md +1 -1
- package/package.json +2 -2
- package/dist/components/Calendar/Calendar/Calendar.props.d.ts +0 -82
- package/dist/components/Calendar/Calendar/Calendar.style.d.ts +0 -107
- package/dist/components/Calendar/Calendar/Calendar.utils.d.ts +0 -91
- package/dist/components/Calendar/Calendar/Calendar.view.d.ts +0 -3
- package/dist/components/Calendar/Calendar.d.ts +0 -1
- package/dist/components/Flow/Flow/Flow.props.d.ts +0 -144
- package/dist/components/Flow/Flow/Flow.state.d.ts +0 -95
- package/dist/components/Flow/Flow/Flow.style.d.ts +0 -40
- package/dist/components/Flow/Flow/Flow.type.d.ts +0 -181
- package/dist/components/Flow/Flow/Flow.view.d.ts +0 -28
- package/dist/components/Flow/Flow.d.ts +0 -2
- package/dist/components/Flow/index.d.ts +0 -2
- package/dist/components/KanbanBoard/KanbanBoard/KanbanBoard.props.d.ts +0 -52
- package/dist/components/KanbanBoard/KanbanBoard/KanbanBoard.state.d.ts +0 -17
- package/dist/components/KanbanBoard/KanbanBoard/KanbanBoard.view.d.ts +0 -3
- package/dist/components/KanbanBoard/KanbanBoard.d.ts +0 -3
- package/dist/components/OKR/OKR/OKR.props.d.ts +0 -72
- package/dist/components/OKR/OKR/OKR.style.d.ts +0 -19
- package/dist/components/OKR/OKR/OKR.view.d.ts +0 -4
- package/dist/components/OKR/OKR.d.ts +0 -4
- package/dist/components/Text/Text/Text.props.d.ts +0 -29
- package/dist/components/Text/Text/Text.style.d.ts +0 -27
- package/dist/components/Text/Text/Text.utils.d.ts +0 -2
- package/dist/components/Text/Text/Text.view.d.ts +0 -19
- package/dist/components/Text/Text.d.ts +0 -5
- package/dist/components/Tree/Tree/Tree.props.d.ts +0 -106
- package/dist/components/Tree/Tree/Tree.state.d.ts +0 -38
- package/dist/components/Tree/Tree/Tree.style.d.ts +0 -41
- package/dist/components/Tree/Tree/Tree.type.d.ts +0 -133
- package/dist/components/Tree/Tree/Tree.view.d.ts +0 -36
- package/dist/components/Tree/Tree.d.ts +0 -2
- package/dist/components/adk/AgentChat/AgentChat/AgentChat.props.d.ts +0 -180
- package/dist/components/adk/AgentChat/AgentChat/AgentChat.state.d.ts +0 -24
- package/dist/components/adk/AgentChat/AgentChat/AgentChat.style.d.ts +0 -132
- package/dist/components/adk/AgentChat/AgentChat/AgentChat.view.d.ts +0 -12
- package/dist/components/adk/AgentChat/AgentChat/AgentMessage.d.ts +0 -21
- package/dist/components/adk/AgentChat/AgentChat/AgentRunProgress.d.ts +0 -11
- package/dist/components/adk/AgentChat/AgentChat/AgentTypingIndicator.d.ts +0 -7
- package/dist/components/adk/AgentChat/AgentChat/MessageAttachmentPreview.d.ts +0 -12
- package/dist/components/adk/AgentChat/AgentChat.d.ts +0 -41
- package/dist/components/adk/AgentEval/AgentEval/AgentEval.props.d.ts +0 -213
- package/dist/components/adk/AgentEval/AgentEval/AgentEval.state.d.ts +0 -27
- package/dist/components/adk/AgentEval/AgentEval/AgentEval.style.d.ts +0 -144
- package/dist/components/adk/AgentEval/AgentEval/AgentEval.view.d.ts +0 -12
- package/dist/components/adk/AgentEval/AgentEval/EvaluationCreator.d.ts +0 -17
- package/dist/components/adk/AgentEval/AgentEval/EvaluationList.d.ts +0 -23
- package/dist/components/adk/AgentEval/AgentEval/EvaluationMetrics.d.ts +0 -15
- package/dist/components/adk/AgentEval/AgentEval/EvaluationResults.d.ts +0 -19
- package/dist/components/adk/AgentEval/AgentEval.d.ts +0 -41
- package/dist/components/adk/AgentSession/AgentSession/AgentSession.props.d.ts +0 -170
- package/dist/components/adk/AgentSession/AgentSession/AgentSession.state.d.ts +0 -32
- package/dist/components/adk/AgentSession/AgentSession/AgentSession.style.d.ts +0 -105
- package/dist/components/adk/AgentSession/AgentSession/AgentSession.view.d.ts +0 -12
- package/dist/components/adk/AgentSession/AgentSession/SessionActions.d.ts +0 -20
- package/dist/components/adk/AgentSession/AgentSession/SessionFilters.d.ts +0 -14
- package/dist/components/adk/AgentSession/AgentSession/SessionListItem.d.ts +0 -26
- package/dist/components/adk/AgentSession/AgentSession.d.ts +0 -42
- package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.props.d.ts +0 -194
- package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.state.d.ts +0 -27
- package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.style.d.ts +0 -146
- package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.view.d.ts +0 -12
- package/dist/components/adk/AgentTrace/AgentTrace/TraceEventList.d.ts +0 -20
- package/dist/components/adk/AgentTrace/AgentTrace/TraceFilters.d.ts +0 -13
- package/dist/components/adk/AgentTrace/AgentTrace/TraceMetrics.d.ts +0 -16
- package/dist/components/adk/AgentTrace/AgentTrace/TraceTimeline.d.ts +0 -19
- package/dist/components/adk/AgentTrace/AgentTrace/TraceVisualization.d.ts +0 -19
- package/dist/components/adk/AgentTrace/AgentTrace.d.ts +0 -44
- package/dist/components/adk/useAdk.d.ts +0 -42
- package/dist/pages/adk/CompleteAgentApp.d.ts +0 -30
- package/dist/pages/adk/adkComponents.page.d.ts +0 -8
- package/dist/pages/adk/adkIntegration.page.d.ts +0 -6
- package/dist/pages/adk/agentChat.page.d.ts +0 -8
- package/dist/pages/adk/providers/AdkProvider.d.ts +0 -83
- package/dist/pages/adk/providers/index.d.ts +0 -1
- package/dist/pages/adk/services/AgentService.d.ts +0 -167
- package/dist/pages/adk/services/AgentServiceProvider.d.ts +0 -83
- package/dist/pages/adk/services/AgentServiceUtils.d.ts +0 -176
- package/dist/pages/adk/services/index.d.ts +0 -50
- package/dist/pages/calendar.page.d.ts +0 -3
- package/dist/pages/flow.page.d.ts +0 -3
- package/dist/pages/kanbanBoard.page.d.ts +0 -3
- package/dist/pages/okr.page.d.ts +0 -3
- package/dist/pages/text.page.d.ts +0 -3
- package/dist/pages/tree.page.d.ts +0 -3
|
@@ -12,7 +12,7 @@ A flexible menubar component for creating application menus with dropdown submen
|
|
|
12
12
|
import React from 'react';
|
|
13
13
|
import { Menubar } from '../Menubar';
|
|
14
14
|
import { View } from 'app-studio';
|
|
15
|
-
import { Text } from '
|
|
15
|
+
import { Text } from 'app-studio';
|
|
16
16
|
|
|
17
17
|
export const DefaultMenubar = () => {
|
|
18
18
|
const items = [
|
|
@@ -258,7 +258,7 @@ It represents the main container or wrapper that holds all the content and compo
|
|
|
258
258
|
```tsx
|
|
259
259
|
import { useState } from 'react';
|
|
260
260
|
import { Button } from '../Button/Button';
|
|
261
|
-
import { Text } from '
|
|
261
|
+
import { Text } from 'app-studio';
|
|
262
262
|
import { Horizontal } from '../Layout/Horizontal/Horizontal';
|
|
263
263
|
|
|
264
264
|
const [showSharp, setShowSharp] = useState(false);
|
|
@@ -306,7 +306,7 @@ const [showRounded, setShowRounded] = useState(false);
|
|
|
306
306
|
```tsx
|
|
307
307
|
import { useState } from 'react';
|
|
308
308
|
import { Button } from '../Button/Button';
|
|
309
|
-
import { Text } from '
|
|
309
|
+
import { Text } from 'app-studio';
|
|
310
310
|
|
|
311
311
|
const [show, setShow] = useState(false);
|
|
312
312
|
|
|
@@ -398,7 +398,7 @@ A vertical scroll is displayed, if the content height exceed the body height.
|
|
|
398
398
|
```tsx
|
|
399
399
|
import { useState } from 'react';
|
|
400
400
|
import { Button } from '../Button/Button';
|
|
401
|
-
import { Text } from '
|
|
401
|
+
import { Text } from 'app-studio';
|
|
402
402
|
|
|
403
403
|
const [show, setShow] = useState(false);
|
|
404
404
|
|
|
@@ -439,7 +439,7 @@ It represents the footer section of a message, where the primary information or
|
|
|
439
439
|
```tsx
|
|
440
440
|
import { useState } from 'react';
|
|
441
441
|
import { Button } from '../Button/Button';
|
|
442
|
-
import { Text } from '
|
|
442
|
+
import { Text } from 'app-studio';
|
|
443
443
|
|
|
444
444
|
const [show, setShow] = useState(false);
|
|
445
445
|
|
|
@@ -263,7 +263,7 @@ It represents the main container or wrapper that holds all the content and compo
|
|
|
263
263
|
```tsx
|
|
264
264
|
import { useState } from 'react';
|
|
265
265
|
import { Button } from '../Button/Button';
|
|
266
|
-
import { Text } from '
|
|
266
|
+
import { Text } from 'app-studio';
|
|
267
267
|
import { Horizontal } from '../Layout/Horizontal/Horizontal';
|
|
268
268
|
|
|
269
269
|
const [showSharp, setShowSharp] = useState(false);
|
|
@@ -311,7 +311,7 @@ const [showRounded, setShowRounded] = useState(false);
|
|
|
311
311
|
```tsx
|
|
312
312
|
import { useState } from 'react';
|
|
313
313
|
import { Button } from '../Button/Button';
|
|
314
|
-
import { Text } from '
|
|
314
|
+
import { Text } from 'app-studio';
|
|
315
315
|
|
|
316
316
|
const [show, setShow] = useState(false);
|
|
317
317
|
|
|
@@ -410,7 +410,7 @@ A vertical scroll is displayed, if the content height exceed the body height.
|
|
|
410
410
|
```tsx
|
|
411
411
|
import { useState } from 'react';
|
|
412
412
|
import { Button } from '../Button/Button';
|
|
413
|
-
import { Text } from '
|
|
413
|
+
import { Text } from 'app-studio';
|
|
414
414
|
|
|
415
415
|
const [show, setShow] = useState(false);
|
|
416
416
|
|
|
@@ -451,7 +451,7 @@ It represents the footer section of a modal, which typically contains buttons or
|
|
|
451
451
|
```tsx
|
|
452
452
|
import { useState } from 'react';
|
|
453
453
|
import { Button } from '../Button/Button';
|
|
454
|
-
import { Text } from '
|
|
454
|
+
import { Text } from 'app-studio';
|
|
455
455
|
|
|
456
456
|
const [show, setShow] = useState(false);
|
|
457
457
|
|
package/docs/components/OKR.mdx
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
2
|
# OKR
|
|
4
3
|
|
|
5
4
|
The OKR (Objectives and Key Results) component is used for displaying and tracking organizational objectives and their associated key results. It provides a comprehensive view of progress, status, and ownership for strategic goals.
|
|
6
5
|
|
|
6
|
+
## When to use
|
|
7
|
+
|
|
8
|
+
Use the OKR component when you need to:
|
|
9
|
+
- Display strategic goals and their progress in a clear, hierarchical manner.
|
|
10
|
+
- Track the status and ownership of objectives and key results.
|
|
11
|
+
- Provide a centralized view of team or company-wide goals.
|
|
12
|
+
- Visualize progress towards specific targets.
|
|
13
|
+
|
|
7
14
|
## Import
|
|
8
15
|
|
|
9
16
|
```jsx
|
|
@@ -16,7 +23,8 @@ import { OKR } from '@app-studio/web';
|
|
|
16
23
|
| ---- | ---- | ------- | ----------- |
|
|
17
24
|
| objectives | OKRObjective[] | **required** | Array of objectives to display |
|
|
18
25
|
| themeMode | 'light' \| 'dark' | 'light' | Theme mode for the component |
|
|
19
|
-
| views | OKRViews | undefined | Custom styling for different parts of the component |
|
|
26
|
+
| views | OKRViews | undefined | Custom styling for different parts of the component. See the `OKRViews` type definition for all available options. |
|
|
27
|
+
| onObjectiveClick | (objective: OKRObjective) => void | undefined | Callback when an objective is clicked |
|
|
20
28
|
| onKeyResultClick | (keyResult: OKRKeyResult, objective: OKRObjective) => void | undefined | Callback when a key result is clicked |
|
|
21
29
|
| renderObjectiveFooter | (objective: OKRObjective) => ReactNode | undefined | Custom footer renderer for objectives |
|
|
22
30
|
| renderKeyResultFooter | (keyResult: OKRKeyResult, objective: OKRObjective) => ReactNode | undefined | Custom footer renderer for key results |
|
|
@@ -73,6 +81,10 @@ interface OKRKeyResult {
|
|
|
73
81
|
|
|
74
82
|
### Basic Usage
|
|
75
83
|
|
|
84
|
+
This example shows a basic OKR with one objective and three key results with different statuses.
|
|
85
|
+
|
|
86
|
+

|
|
87
|
+
|
|
76
88
|
```jsx
|
|
77
89
|
import React from 'react';
|
|
78
90
|
import { OKR } from '@app-studio/web';
|
|
@@ -117,6 +129,10 @@ export const BasicOKR = () => {
|
|
|
117
129
|
|
|
118
130
|
### With Detailed Key Results
|
|
119
131
|
|
|
132
|
+
This example shows a more detailed view of key results, including metrics, targets, and confidence levels. It also demonstrates the dark theme.
|
|
133
|
+
|
|
134
|
+

|
|
135
|
+
|
|
120
136
|
```jsx
|
|
121
137
|
import React from 'react';
|
|
122
138
|
import { OKR } from '@app-studio/web';
|
|
@@ -169,6 +185,10 @@ export const DetailedOKR = () => {
|
|
|
169
185
|
|
|
170
186
|
### With Click Handlers
|
|
171
187
|
|
|
188
|
+
You can use the `onObjectiveClick` and `onKeyResultClick` props to handle user interactions, for example to navigate to a detailed view.
|
|
189
|
+
|
|
190
|
+

|
|
191
|
+
|
|
172
192
|
```jsx
|
|
173
193
|
import React from 'react';
|
|
174
194
|
import { OKR } from '@app-studio/web';
|
|
@@ -192,6 +212,10 @@ export const InteractiveOKR = () => {
|
|
|
192
212
|
},
|
|
193
213
|
];
|
|
194
214
|
|
|
215
|
+
const handleObjectiveClick = (objective) => {
|
|
216
|
+
console.log('Clicked objective:', objective.title);
|
|
217
|
+
};
|
|
218
|
+
|
|
195
219
|
const handleKeyResultClick = (keyResult, objective) => {
|
|
196
220
|
console.log('Clicked key result:', keyResult.title);
|
|
197
221
|
console.log('From objective:', objective.title);
|
|
@@ -201,6 +225,7 @@ export const InteractiveOKR = () => {
|
|
|
201
225
|
return (
|
|
202
226
|
<OKR
|
|
203
227
|
objectives={objectives}
|
|
228
|
+
onObjectiveClick={handleObjectiveClick}
|
|
204
229
|
onKeyResultClick={handleKeyResultClick}
|
|
205
230
|
/>
|
|
206
231
|
);
|
|
@@ -209,6 +234,10 @@ export const InteractiveOKR = () => {
|
|
|
209
234
|
|
|
210
235
|
### With Custom Footers
|
|
211
236
|
|
|
237
|
+
The `renderObjectiveFooter` and `renderKeyResultFooter` props allow you to add custom actions or information to each objective and key result.
|
|
238
|
+
|
|
239
|
+

|
|
240
|
+
|
|
212
241
|
```jsx
|
|
213
242
|
import React from 'react';
|
|
214
243
|
import { OKR, Button, Horizontal } from '@app-studio/web';
|
|
@@ -252,7 +281,9 @@ export const OKRWithFooters = () => {
|
|
|
252
281
|
|
|
253
282
|
### Auto-calculated Progress
|
|
254
283
|
|
|
255
|
-
If
|
|
284
|
+
If an objective's `progress` is not provided, it is automatically calculated as the average progress of its key results.
|
|
285
|
+
|
|
286
|
+

|
|
256
287
|
|
|
257
288
|
```jsx
|
|
258
289
|
import React from 'react';
|
|
@@ -279,57 +310,9 @@ export const AutoProgressOKR = () => {
|
|
|
279
310
|
|
|
280
311
|
## Customization
|
|
281
312
|
|
|
282
|
-
The OKR component can be extensively customized using the `views` prop
|
|
283
|
-
|
|
284
|
-
```jsx
|
|
285
|
-
<OKR
|
|
286
|
-
objectives={objectives}
|
|
287
|
-
views={{
|
|
288
|
-
// Main container
|
|
289
|
-
container: { /* ViewProps */ },
|
|
290
|
-
|
|
291
|
-
// Objective card styling
|
|
292
|
-
objectiveCard: { /* ViewProps */ },
|
|
293
|
-
objectiveHeader: { /* ViewProps */ },
|
|
294
|
-
objectiveTitle: { /* TextProps */ },
|
|
295
|
-
objectiveDescription: { /* TextProps */ },
|
|
296
|
-
objectiveMeta: { /* ViewProps */ },
|
|
297
|
-
objectiveOwner: { /* TextProps */ },
|
|
298
|
-
objectiveTimeframe: { /* TextProps */ },
|
|
299
|
-
objectiveTags: { /* ViewProps */ },
|
|
300
|
-
objectiveProgressSection: { /* ViewProps */ },
|
|
301
|
-
objectiveProgressLabel: { /* TextProps */ },
|
|
302
|
-
objectiveProgressValue: { /* TextProps */ },
|
|
303
|
-
objectiveProgressBar: { /* ProgressBarStyles */ },
|
|
304
|
-
objectiveStatus: { /* StatusIndicatorStyles */ },
|
|
305
|
-
|
|
306
|
-
// Tag styling
|
|
307
|
-
tag: { /* ViewProps */ },
|
|
308
|
-
tagText: { /* TextProps */ },
|
|
309
|
-
|
|
310
|
-
// Key result styling
|
|
311
|
-
keyResultList: { /* ViewProps */ },
|
|
312
|
-
keyResultItem: { /* ViewProps */ },
|
|
313
|
-
keyResultHeader: { /* ViewProps */ },
|
|
314
|
-
keyResultTitle: { /* TextProps */ },
|
|
315
|
-
keyResultDescription: { /* TextProps */ },
|
|
316
|
-
keyResultMeta: { /* ViewProps */ },
|
|
317
|
-
keyResultOwner: { /* TextProps */ },
|
|
318
|
-
keyResultStatus: { /* StatusIndicatorStyles */ },
|
|
319
|
-
keyResultTags: { /* ViewProps */ },
|
|
320
|
-
keyResultTag: { /* ViewProps */ },
|
|
321
|
-
keyResultTagText: { /* TextProps */ },
|
|
322
|
-
keyResultProgressSection: { /* ViewProps */ },
|
|
323
|
-
keyResultProgressValue: { /* TextProps */ },
|
|
324
|
-
keyResultProgressBar: { /* ProgressBarStyles */ },
|
|
325
|
-
|
|
326
|
-
// Footer styling
|
|
327
|
-
footer: { /* ViewProps */ },
|
|
328
|
-
}}
|
|
329
|
-
/>
|
|
330
|
-
```
|
|
313
|
+
The OKR component can be extensively customized using the `views` prop. See the `OKRViews` type definition for all available options.
|
|
331
314
|
|
|
332
|
-
|
|
315
|
+

|
|
333
316
|
|
|
334
317
|
```jsx
|
|
335
318
|
import React from 'react';
|
|
@@ -369,6 +352,9 @@ export const CustomStyledOKR = () => {
|
|
|
369
352
|
};
|
|
370
353
|
```
|
|
371
354
|
|
|
355
|
+
## Live Demo
|
|
356
|
+
A live demo of the OKR component with all its features is available [here](https://app-studio-web.vercel.app/components/okr).
|
|
357
|
+
|
|
372
358
|
## Status Derivation
|
|
373
359
|
|
|
374
360
|
If a status is not explicitly provided, it will be automatically derived from the progress value:
|
|
@@ -395,7 +381,7 @@ Each status is displayed with a corresponding visual indicator:
|
|
|
395
381
|
|
|
396
382
|
## Theme Support
|
|
397
383
|
|
|
398
|
-
The OKR component fully supports both light and dark themes
|
|
384
|
+
The OKR component fully supports both light and dark themes.
|
|
399
385
|
|
|
400
386
|
```jsx
|
|
401
387
|
// Light theme (default)
|
|
@@ -464,12 +450,3 @@ The OKR component implements the following accessibility features:
|
|
|
464
450
|
- [StatusIndicator](../feedback/status-indicator.md) - Used internally for status display
|
|
465
451
|
- [Card](./card.md) - Similar container component for content display
|
|
466
452
|
- [Badge](./badge.md) - Can be used in custom footers for additional metadata
|
|
467
|
-
|
|
468
|
-
## Common Use Cases
|
|
469
|
-
|
|
470
|
-
- Strategic planning and goal tracking
|
|
471
|
-
- Team performance dashboards
|
|
472
|
-
- Product roadmap visualization
|
|
473
|
-
- Project milestone tracking
|
|
474
|
-
- KPI monitoring and reporting
|
|
475
|
-
- Quarterly business reviews (QBRs)
|
package/docs/components/Tabs.mdx
CHANGED
|
@@ -125,7 +125,7 @@ Allows for optional styling to be applied to the tabs via a TabsStyles object.
|
|
|
125
125
|
|
|
126
126
|
```tsx
|
|
127
127
|
import React from 'react';
|
|
128
|
-
import { Text } from '
|
|
128
|
+
import { Text } from 'app-studio';
|
|
129
129
|
import { Tabs } from '../../Tabs/Tabs';
|
|
130
130
|
|
|
131
131
|
export const StylesTabs = () => {
|
|
@@ -61,7 +61,7 @@ Mandatory array of items defining each toggle in the group.
|
|
|
61
61
|
```tsx
|
|
62
62
|
import React from 'react';
|
|
63
63
|
import { ToggleGroup } from '../ToggleGroup';
|
|
64
|
-
import { Text } from '
|
|
64
|
+
import { Text } from 'app-studio';
|
|
65
65
|
|
|
66
66
|
export const ItemsDemo = () => {
|
|
67
67
|
const items = [
|
|
@@ -79,7 +79,7 @@ Optional variant prop to specify the visual style of the toggle group.
|
|
|
79
79
|
|
|
80
80
|
```tsx
|
|
81
81
|
import React from 'react';
|
|
82
|
-
import { Text } from '
|
|
82
|
+
import { Text } from 'app-studio';
|
|
83
83
|
import { ToggleGroup } from '../ToggleGroup';
|
|
84
84
|
import { Variant } from '../ToggleGroup/ToggleGroup.type';
|
|
85
85
|
import { Vertical } from 'app-studio';
|
|
@@ -108,7 +108,7 @@ Optional colorScheme prop for theming the toggle group.
|
|
|
108
108
|
import React from 'react';
|
|
109
109
|
import { ToggleGroup } from '../ToggleGroup';
|
|
110
110
|
import { Vertical } from 'app-studio';
|
|
111
|
-
import { Text } from '
|
|
111
|
+
import { Text } from 'app-studio';
|
|
112
112
|
|
|
113
113
|
export const ColorSchemeDemo = () => {
|
|
114
114
|
const items = [
|
|
@@ -139,7 +139,7 @@ Optional callback function that fires when the active toggle changes, providing
|
|
|
139
139
|
```tsx
|
|
140
140
|
import React, { useState } from 'react';
|
|
141
141
|
import { ToggleGroup } from '../ToggleGroup';
|
|
142
|
-
import { Text } from '
|
|
142
|
+
import { Text } from 'app-studio';
|
|
143
143
|
import { Vertical } from 'app-studio';
|
|
144
144
|
|
|
145
145
|
export const OnToggleChangeDemo = () => {
|
|
@@ -117,7 +117,7 @@ Tooltips can contain rich content, not just text.
|
|
|
117
117
|
import React from 'react';
|
|
118
118
|
import { Tooltip } from '../Tooltip';
|
|
119
119
|
import { Button } from '../../Button/Button';
|
|
120
|
-
import { Text } from '
|
|
120
|
+
import { Text } from 'app-studio';
|
|
121
121
|
import { Vertical } from 'app-studio';
|
|
122
122
|
|
|
123
123
|
export const CustomContentTooltip = () => {
|
|
@@ -153,7 +153,7 @@ For more control, you can use the compound component pattern.
|
|
|
153
153
|
import React from 'react';
|
|
154
154
|
import { Tooltip } from '../Tooltip';
|
|
155
155
|
import { Button } from '../../Button/Button';
|
|
156
|
-
import { Text } from '
|
|
156
|
+
import { Text } from 'app-studio';
|
|
157
157
|
|
|
158
158
|
export const CompoundTooltip = () => {
|
|
159
159
|
return (
|
package/docs/conventions.md
CHANGED
|
@@ -61,7 +61,7 @@ import * as Yup from 'yup';
|
|
|
61
61
|
import { View, Horizontal, Vertical, useTheme } from 'app-studio';
|
|
62
62
|
|
|
63
63
|
// Internal component imports
|
|
64
|
-
import { Text } from '
|
|
64
|
+
import { Text } from 'app-studio';
|
|
65
65
|
import { Button } from '../../Button/Button';
|
|
66
66
|
|
|
67
67
|
// Type imports
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@app-studio/web",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.38",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/components/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"@types/react-test-renderer": "^18.0.0",
|
|
113
113
|
"@typescript-eslint/eslint-plugin": "^5.59.7",
|
|
114
114
|
"@typescript-eslint/parser": "^5.59.7",
|
|
115
|
-
"app-studio": "^0.6.
|
|
115
|
+
"app-studio": "^0.6.28",
|
|
116
116
|
"async-mutex": "^0.5.0",
|
|
117
117
|
"babel-jest": "^29.5.0",
|
|
118
118
|
"babel-loader": "^9.1.2",
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { ViewProps } from 'app-studio';
|
|
2
|
-
export declare type CalendarView = 'month' | 'week' | 'day';
|
|
3
|
-
export interface CalendarEvent {
|
|
4
|
-
/** Unique identifier for the event */
|
|
5
|
-
id: string;
|
|
6
|
-
/** Event title/label */
|
|
7
|
-
title: string;
|
|
8
|
-
/** Event description */
|
|
9
|
-
description?: string;
|
|
10
|
-
/** Start date in ISO format (YYYY-MM-DD) or datetime (YYYY-MM-DDTHH:MM) */
|
|
11
|
-
start: string;
|
|
12
|
-
/** End date in ISO format (YYYY-MM-DD) or datetime (YYYY-MM-DDTHH:MM) */
|
|
13
|
-
end: string;
|
|
14
|
-
/** Color variant for the event */
|
|
15
|
-
color?: 'blue' | 'red' | 'green' | 'purple' | 'orange';
|
|
16
|
-
}
|
|
17
|
-
export interface CalendarViews {
|
|
18
|
-
/** Style overrides for the main container */
|
|
19
|
-
container?: ViewProps;
|
|
20
|
-
/** Style overrides for the header (navigation) */
|
|
21
|
-
header?: ViewProps;
|
|
22
|
-
/** Style overrides for the month/year title */
|
|
23
|
-
monthTitle?: ViewProps;
|
|
24
|
-
/** Style overrides for navigation buttons */
|
|
25
|
-
navButton?: ViewProps;
|
|
26
|
-
/** Style overrides for view switcher buttons */
|
|
27
|
-
viewSwitcher?: ViewProps;
|
|
28
|
-
/** Style overrides for the month grid */
|
|
29
|
-
monthGrid?: ViewProps;
|
|
30
|
-
/** Style overrides for weekday header row */
|
|
31
|
-
weekdayHeader?: ViewProps;
|
|
32
|
-
/** Style overrides for individual weekday labels */
|
|
33
|
-
weekdayLabel?: ViewProps;
|
|
34
|
-
/** Style overrides for individual day cells */
|
|
35
|
-
dayCell?: ViewProps;
|
|
36
|
-
/** Style overrides for day numbers */
|
|
37
|
-
dayNumber?: ViewProps;
|
|
38
|
-
/** Style overrides for the events area */
|
|
39
|
-
eventsArea?: ViewProps;
|
|
40
|
-
/** Style overrides for individual events */
|
|
41
|
-
event?: ViewProps;
|
|
42
|
-
/** Style overrides for time column (day view) */
|
|
43
|
-
timeColumn?: ViewProps;
|
|
44
|
-
/** Style overrides for time slot */
|
|
45
|
-
timeSlot?: ViewProps;
|
|
46
|
-
}
|
|
47
|
-
export interface CalendarProps {
|
|
48
|
-
/** Initial date to display in ISO format (YYYY-MM-DD) or Date object */
|
|
49
|
-
initialDate?: string | Date;
|
|
50
|
-
/** Initial view to display */
|
|
51
|
-
initialView?: CalendarView;
|
|
52
|
-
/** Array of events to display */
|
|
53
|
-
events?: CalendarEvent[];
|
|
54
|
-
/** Today's date in ISO format (defaults to current date) */
|
|
55
|
-
today?: string;
|
|
56
|
-
/** Callback when an event is dragged to a new position */
|
|
57
|
-
onEventDrop?: (event: CalendarEvent) => void;
|
|
58
|
-
/** Callback when an event is resized */
|
|
59
|
-
onEventResize?: (event: CalendarEvent) => void;
|
|
60
|
-
/** Callback when a date is clicked */
|
|
61
|
-
onDateClick?: (date: string) => void;
|
|
62
|
-
/** Callback when date/time changes */
|
|
63
|
-
onDateChange?: (date: Date) => void;
|
|
64
|
-
/** Callback when view changes */
|
|
65
|
-
onViewChange?: (view: CalendarView) => void;
|
|
66
|
-
/** Callback when double-clicking to add new event */
|
|
67
|
-
onEventAdd?: (start: string, end: string) => void;
|
|
68
|
-
/** Callback when an event's title changes */
|
|
69
|
-
onEventTitleChange?: (event: CalendarEvent, newTitle: string) => void;
|
|
70
|
-
/** Callback when an event's description changes */
|
|
71
|
-
onEventDescriptionChange?: (event: CalendarEvent, newDescription: string) => void;
|
|
72
|
-
/** Callback when an event is deleted */
|
|
73
|
-
onEventDelete?: (event: CalendarEvent) => void;
|
|
74
|
-
/** Style overrides for various parts of the component */
|
|
75
|
-
views?: CalendarViews;
|
|
76
|
-
/** Width of the calendar (default: '100%') */
|
|
77
|
-
width?: number | string;
|
|
78
|
-
/** Maximum width of the calendar (default: 1200) */
|
|
79
|
-
maxWidth?: number | string;
|
|
80
|
-
/** First day of the week (0 = Sunday, 1 = Monday, etc.) */
|
|
81
|
-
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
82
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { ViewProps } from 'app-studio';
|
|
2
|
-
/**
|
|
3
|
-
* Event color configurations
|
|
4
|
-
*/
|
|
5
|
-
export declare const EVENT_COLORS: {
|
|
6
|
-
readonly blue: {
|
|
7
|
-
readonly background: "color.blue.50";
|
|
8
|
-
readonly border: "color.blue.500";
|
|
9
|
-
readonly text: "color.blue.700";
|
|
10
|
-
};
|
|
11
|
-
readonly red: {
|
|
12
|
-
readonly background: "color.red.50";
|
|
13
|
-
readonly border: "color.red.500";
|
|
14
|
-
readonly text: "color.red.700";
|
|
15
|
-
};
|
|
16
|
-
readonly green: {
|
|
17
|
-
readonly background: "color.green.50";
|
|
18
|
-
readonly border: "color.green.500";
|
|
19
|
-
readonly text: "color.green.700";
|
|
20
|
-
};
|
|
21
|
-
readonly purple: {
|
|
22
|
-
readonly background: "color.purple.50";
|
|
23
|
-
readonly border: "color.purple.500";
|
|
24
|
-
readonly text: "color.purple.700";
|
|
25
|
-
};
|
|
26
|
-
readonly orange: {
|
|
27
|
-
readonly background: "color.orange.50";
|
|
28
|
-
readonly border: "color.orange.500";
|
|
29
|
-
readonly text: "color.orange.700";
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* Base styles for the calendar container
|
|
34
|
-
*/
|
|
35
|
-
export declare const containerStyles: ViewProps;
|
|
36
|
-
/**
|
|
37
|
-
* Header styles (navigation bar)
|
|
38
|
-
*/
|
|
39
|
-
export declare const headerStyles: ViewProps;
|
|
40
|
-
/**
|
|
41
|
-
* Month title styles
|
|
42
|
-
*/
|
|
43
|
-
export declare const monthTitleStyles: ViewProps;
|
|
44
|
-
/**
|
|
45
|
-
* Navigation button styles
|
|
46
|
-
*/
|
|
47
|
-
export declare const navButtonStyles: ViewProps;
|
|
48
|
-
/**
|
|
49
|
-
* Month grid styles (7 columns for days)
|
|
50
|
-
*/
|
|
51
|
-
export declare const monthGridStyles: ViewProps;
|
|
52
|
-
/**
|
|
53
|
-
* Weekday header row styles
|
|
54
|
-
*/
|
|
55
|
-
export declare const weekdayHeaderStyles: ViewProps;
|
|
56
|
-
/**
|
|
57
|
-
* Individual weekday label styles
|
|
58
|
-
*/
|
|
59
|
-
export declare const weekdayLabelStyles: ViewProps;
|
|
60
|
-
/**
|
|
61
|
-
* Individual day cell styles
|
|
62
|
-
*/
|
|
63
|
-
export declare const dayCellStyles: ViewProps;
|
|
64
|
-
/**
|
|
65
|
-
* Day date styles (the circular number)
|
|
66
|
-
*/
|
|
67
|
-
export declare const dayDateStyles: ViewProps;
|
|
68
|
-
/**
|
|
69
|
-
* Day cell from different month
|
|
70
|
-
*/
|
|
71
|
-
export declare const otherMonthDayCellStyles: ViewProps;
|
|
72
|
-
/**
|
|
73
|
-
* Day number styles
|
|
74
|
-
*/
|
|
75
|
-
export declare const dayNumberStyles: ViewProps;
|
|
76
|
-
/**
|
|
77
|
-
* Today day number styles
|
|
78
|
-
*/
|
|
79
|
-
export declare const todayDayNumberStyles: ViewProps;
|
|
80
|
-
/**
|
|
81
|
-
* Selected day number styles
|
|
82
|
-
*/
|
|
83
|
-
export declare const selectedDayNumberStyles: ViewProps;
|
|
84
|
-
/**
|
|
85
|
-
* Events area styles (container for events in a day)
|
|
86
|
-
*/
|
|
87
|
-
export declare const eventsAreaStyles: ViewProps;
|
|
88
|
-
/**
|
|
89
|
-
* Base event styles
|
|
90
|
-
*/
|
|
91
|
-
export declare const eventStyles: ViewProps;
|
|
92
|
-
/**
|
|
93
|
-
* Drop target indicator styles
|
|
94
|
-
*/
|
|
95
|
-
export declare const dropTargetStyles: ViewProps;
|
|
96
|
-
/**
|
|
97
|
-
* Calculate event position styles for multi-day events
|
|
98
|
-
*/
|
|
99
|
-
export declare const getEventPositionStyles: (startDay: number, endDay: number, weekIndex: number, dayOfWeek: number) => React.CSSProperties;
|
|
100
|
-
/**
|
|
101
|
-
* Button base styles
|
|
102
|
-
*/
|
|
103
|
-
export declare const buttonStyles: ViewProps;
|
|
104
|
-
/**
|
|
105
|
-
* Icon button styles
|
|
106
|
-
*/
|
|
107
|
-
export declare const iconButtonStyles: ViewProps;
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { CalendarEvent } from './Calendar.props';
|
|
2
|
-
export interface PositionedEvent extends CalendarEvent {
|
|
3
|
-
/** Starting day index (0-41, representing 6 weeks * 7 days) */
|
|
4
|
-
startDay: number;
|
|
5
|
-
/** Ending day index (0-41) */
|
|
6
|
-
endDay: number;
|
|
7
|
-
/** Number of days the event spans */
|
|
8
|
-
duration: number;
|
|
9
|
-
/** Row index for vertical positioning (to avoid overlaps) */
|
|
10
|
-
row: number;
|
|
11
|
-
/** Week index (0-5) */
|
|
12
|
-
weekIndex: number;
|
|
13
|
-
/** Day of week (0-6) */
|
|
14
|
-
dayOfWeek: number;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Convert an ISO date string to a UTC Date object
|
|
18
|
-
*/
|
|
19
|
-
export declare const dateUTC: (iso: string) => Date;
|
|
20
|
-
/**
|
|
21
|
-
* Calculate the number of days between two ISO date strings
|
|
22
|
-
*/
|
|
23
|
-
export declare const daysBetweenUTC: (a: string, b: string) => number;
|
|
24
|
-
/**
|
|
25
|
-
* Add a number of days to an ISO date string
|
|
26
|
-
*/
|
|
27
|
-
export declare const addDateDays: (dateISO: string, days: number) => string;
|
|
28
|
-
/**
|
|
29
|
-
* Get the day of the week (0-6) from an ISO date string
|
|
30
|
-
*/
|
|
31
|
-
export declare const getDayOfWeek: (dateISO: string) => number;
|
|
32
|
-
/**
|
|
33
|
-
* Get the date number (1-31) from an ISO date string
|
|
34
|
-
*/
|
|
35
|
-
export declare const getDateNumber: (dateISO: string) => number;
|
|
36
|
-
/**
|
|
37
|
-
* Get the month (0-11) from an ISO date string
|
|
38
|
-
*/
|
|
39
|
-
export declare const getMonth: (dateISO: string) => number;
|
|
40
|
-
/**
|
|
41
|
-
* Get the year from an ISO date string
|
|
42
|
-
*/
|
|
43
|
-
export declare const getYear: (dateISO: string) => number;
|
|
44
|
-
/**
|
|
45
|
-
* Get the first day of the month for a given date
|
|
46
|
-
*/
|
|
47
|
-
export declare const getFirstDayOfMonth: (dateISO: string) => string;
|
|
48
|
-
/**
|
|
49
|
-
* Get the last day of the month for a given date
|
|
50
|
-
*/
|
|
51
|
-
export declare const getLastDayOfMonth: (dateISO: string) => string;
|
|
52
|
-
/**
|
|
53
|
-
* Get the start date of the calendar grid (may be in previous month)
|
|
54
|
-
*/
|
|
55
|
-
export declare const getCalendarStartDate: (monthDateISO: string, weekStartsOn?: number) => string;
|
|
56
|
-
/**
|
|
57
|
-
* Generate array of dates for the calendar grid (42 days = 6 weeks)
|
|
58
|
-
*/
|
|
59
|
-
export declare const getCalendarDates: (monthDateISO: string, weekStartsOn?: number) => string[];
|
|
60
|
-
/**
|
|
61
|
-
* Get month name from date
|
|
62
|
-
*/
|
|
63
|
-
export declare const getMonthName: (dateISO: string) => string;
|
|
64
|
-
/**
|
|
65
|
-
* Get the previous month date
|
|
66
|
-
*/
|
|
67
|
-
export declare const getPreviousMonth: (dateISO: string) => string;
|
|
68
|
-
/**
|
|
69
|
-
* Get the next month date
|
|
70
|
-
*/
|
|
71
|
-
export declare const getNextMonth: (dateISO: string) => string;
|
|
72
|
-
/**
|
|
73
|
-
* Day names array (Sunday to Saturday)
|
|
74
|
-
*/
|
|
75
|
-
export declare const DAY_NAMES: string[];
|
|
76
|
-
/**
|
|
77
|
-
* Get day names starting from specified day
|
|
78
|
-
*/
|
|
79
|
-
export declare const getDayNames: (weekStartsOn?: number) => string[];
|
|
80
|
-
/**
|
|
81
|
-
* Layout events with proper positioning to avoid overlaps
|
|
82
|
-
* Returns positioned events for each week
|
|
83
|
-
*/
|
|
84
|
-
export declare const layoutEvents: (events: CalendarEvent[], calendarDates: string[]) => {
|
|
85
|
-
items: PositionedEvent[];
|
|
86
|
-
rowCountByWeek: number[];
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* Check if a date is in the current month
|
|
90
|
-
*/
|
|
91
|
-
export declare const isInMonth: (dateISO: string, monthDateISO: string) => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Calendar } from './Calendar/Calendar.view';
|