@app-studio/web 0.9.36 → 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.
Files changed (125) hide show
  1. package/dist/components/ChatInput/ChatInput/ChatInput.style.d.ts +31 -0
  2. package/dist/components/Drawer/Drawer/Drawer.props.d.ts +61 -0
  3. package/dist/components/Drawer/Drawer/Drawer.style.d.ts +4 -0
  4. package/dist/components/Drawer/Drawer/Drawer.view.d.ts +7 -0
  5. package/dist/components/Drawer/Drawer.d.ts +2 -0
  6. package/dist/components/index.d.ts +2 -22
  7. package/dist/pages/drawer.page.d.ts +3 -0
  8. package/dist/utils/apiConfig.d.ts +2 -2
  9. package/dist/utils/typography.d.ts +3 -4
  10. package/dist/web.cjs.development.js +2321 -12073
  11. package/dist/web.cjs.development.js.map +1 -1
  12. package/dist/web.cjs.production.min.js +1 -1
  13. package/dist/web.cjs.production.min.js.map +1 -1
  14. package/dist/web.esm.js +2114 -11857
  15. package/dist/web.esm.js.map +1 -1
  16. package/dist/web.umd.development.js +3019 -12768
  17. package/dist/web.umd.development.js.map +1 -1
  18. package/dist/web.umd.production.min.js +1 -1
  19. package/dist/web.umd.production.min.js.map +1 -1
  20. package/docs/components/Accordion.mdx +4 -4
  21. package/docs/components/Alert.mdx +1 -1
  22. package/docs/components/Background.mdx +5 -5
  23. package/docs/components/Badge.mdx +1 -1
  24. package/docs/components/Calendar.mdx +3 -0
  25. package/docs/components/Card.mdx +8 -8
  26. package/docs/components/Carousel.mdx +6 -6
  27. package/docs/components/ColorInput.mdx +1 -1
  28. package/docs/components/Drawer.mdx +164 -0
  29. package/docs/components/Gradient.mdx +6 -6
  30. package/docs/components/HoverCard.mdx +5 -5
  31. package/docs/components/KanbanBoard.mdx +132 -2
  32. package/docs/components/Link.mdx +2 -2
  33. package/docs/components/Menubar.mdx +1 -1
  34. package/docs/components/Message.mdx +4 -4
  35. package/docs/components/Modal.mdx +4 -4
  36. package/docs/components/OKR.mdx +40 -63
  37. package/docs/components/Tabs.mdx +1 -1
  38. package/docs/components/ToggleGroup.mdx +4 -4
  39. package/docs/components/Tooltip.mdx +2 -2
  40. package/docs/conventions.md +1 -1
  41. package/package.json +2 -2
  42. package/dist/components/Calendar/Calendar/Calendar.props.d.ts +0 -74
  43. package/dist/components/Calendar/Calendar/Calendar.style.d.ts +0 -107
  44. package/dist/components/Calendar/Calendar/Calendar.utils.d.ts +0 -91
  45. package/dist/components/Calendar/Calendar/Calendar.view.d.ts +0 -3
  46. package/dist/components/Calendar/Calendar.d.ts +0 -1
  47. package/dist/components/Flow/Flow/Flow.props.d.ts +0 -144
  48. package/dist/components/Flow/Flow/Flow.state.d.ts +0 -95
  49. package/dist/components/Flow/Flow/Flow.style.d.ts +0 -40
  50. package/dist/components/Flow/Flow/Flow.type.d.ts +0 -181
  51. package/dist/components/Flow/Flow/Flow.view.d.ts +0 -28
  52. package/dist/components/Flow/Flow.d.ts +0 -2
  53. package/dist/components/Flow/index.d.ts +0 -2
  54. package/dist/components/KanbanBoard/KanbanBoard/KanbanBoard.props.d.ts +0 -47
  55. package/dist/components/KanbanBoard/KanbanBoard/KanbanBoard.state.d.ts +0 -13
  56. package/dist/components/KanbanBoard/KanbanBoard/KanbanBoard.view.d.ts +0 -3
  57. package/dist/components/KanbanBoard/KanbanBoard.d.ts +0 -3
  58. package/dist/components/OKR/OKR/OKR.props.d.ts +0 -72
  59. package/dist/components/OKR/OKR/OKR.style.d.ts +0 -19
  60. package/dist/components/OKR/OKR/OKR.view.d.ts +0 -4
  61. package/dist/components/OKR/OKR.d.ts +0 -4
  62. package/dist/components/Text/Text/Text.props.d.ts +0 -29
  63. package/dist/components/Text/Text/Text.style.d.ts +0 -27
  64. package/dist/components/Text/Text/Text.utils.d.ts +0 -2
  65. package/dist/components/Text/Text/Text.view.d.ts +0 -19
  66. package/dist/components/Text/Text.d.ts +0 -5
  67. package/dist/components/Tree/Tree/Tree.props.d.ts +0 -106
  68. package/dist/components/Tree/Tree/Tree.state.d.ts +0 -38
  69. package/dist/components/Tree/Tree/Tree.style.d.ts +0 -41
  70. package/dist/components/Tree/Tree/Tree.type.d.ts +0 -133
  71. package/dist/components/Tree/Tree/Tree.view.d.ts +0 -36
  72. package/dist/components/Tree/Tree.d.ts +0 -2
  73. package/dist/components/adk/AgentChat/AgentChat/AgentChat.props.d.ts +0 -180
  74. package/dist/components/adk/AgentChat/AgentChat/AgentChat.state.d.ts +0 -24
  75. package/dist/components/adk/AgentChat/AgentChat/AgentChat.style.d.ts +0 -132
  76. package/dist/components/adk/AgentChat/AgentChat/AgentChat.view.d.ts +0 -12
  77. package/dist/components/adk/AgentChat/AgentChat/AgentMessage.d.ts +0 -21
  78. package/dist/components/adk/AgentChat/AgentChat/AgentRunProgress.d.ts +0 -11
  79. package/dist/components/adk/AgentChat/AgentChat/AgentTypingIndicator.d.ts +0 -7
  80. package/dist/components/adk/AgentChat/AgentChat/MessageAttachmentPreview.d.ts +0 -12
  81. package/dist/components/adk/AgentChat/AgentChat.d.ts +0 -41
  82. package/dist/components/adk/AgentEval/AgentEval/AgentEval.props.d.ts +0 -213
  83. package/dist/components/adk/AgentEval/AgentEval/AgentEval.state.d.ts +0 -27
  84. package/dist/components/adk/AgentEval/AgentEval/AgentEval.style.d.ts +0 -144
  85. package/dist/components/adk/AgentEval/AgentEval/AgentEval.view.d.ts +0 -12
  86. package/dist/components/adk/AgentEval/AgentEval/EvaluationCreator.d.ts +0 -17
  87. package/dist/components/adk/AgentEval/AgentEval/EvaluationList.d.ts +0 -23
  88. package/dist/components/adk/AgentEval/AgentEval/EvaluationMetrics.d.ts +0 -15
  89. package/dist/components/adk/AgentEval/AgentEval/EvaluationResults.d.ts +0 -19
  90. package/dist/components/adk/AgentEval/AgentEval.d.ts +0 -41
  91. package/dist/components/adk/AgentSession/AgentSession/AgentSession.props.d.ts +0 -170
  92. package/dist/components/adk/AgentSession/AgentSession/AgentSession.state.d.ts +0 -32
  93. package/dist/components/adk/AgentSession/AgentSession/AgentSession.style.d.ts +0 -105
  94. package/dist/components/adk/AgentSession/AgentSession/AgentSession.view.d.ts +0 -12
  95. package/dist/components/adk/AgentSession/AgentSession/SessionActions.d.ts +0 -20
  96. package/dist/components/adk/AgentSession/AgentSession/SessionFilters.d.ts +0 -14
  97. package/dist/components/adk/AgentSession/AgentSession/SessionListItem.d.ts +0 -26
  98. package/dist/components/adk/AgentSession/AgentSession.d.ts +0 -42
  99. package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.props.d.ts +0 -194
  100. package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.state.d.ts +0 -27
  101. package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.style.d.ts +0 -146
  102. package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.view.d.ts +0 -12
  103. package/dist/components/adk/AgentTrace/AgentTrace/TraceEventList.d.ts +0 -20
  104. package/dist/components/adk/AgentTrace/AgentTrace/TraceFilters.d.ts +0 -13
  105. package/dist/components/adk/AgentTrace/AgentTrace/TraceMetrics.d.ts +0 -16
  106. package/dist/components/adk/AgentTrace/AgentTrace/TraceTimeline.d.ts +0 -19
  107. package/dist/components/adk/AgentTrace/AgentTrace/TraceVisualization.d.ts +0 -19
  108. package/dist/components/adk/AgentTrace/AgentTrace.d.ts +0 -44
  109. package/dist/components/adk/useAdk.d.ts +0 -42
  110. package/dist/pages/adk/CompleteAgentApp.d.ts +0 -30
  111. package/dist/pages/adk/adkComponents.page.d.ts +0 -8
  112. package/dist/pages/adk/adkIntegration.page.d.ts +0 -6
  113. package/dist/pages/adk/agentChat.page.d.ts +0 -8
  114. package/dist/pages/adk/providers/AdkProvider.d.ts +0 -83
  115. package/dist/pages/adk/providers/index.d.ts +0 -1
  116. package/dist/pages/adk/services/AgentService.d.ts +0 -167
  117. package/dist/pages/adk/services/AgentServiceProvider.d.ts +0 -83
  118. package/dist/pages/adk/services/AgentServiceUtils.d.ts +0 -176
  119. package/dist/pages/adk/services/index.d.ts +0 -50
  120. package/dist/pages/calendar.page.d.ts +0 -3
  121. package/dist/pages/flow.page.d.ts +0 -3
  122. package/dist/pages/kanbanBoard.page.d.ts +0 -3
  123. package/dist/pages/okr.page.d.ts +0 -3
  124. package/dist/pages/text.page.d.ts +0 -3
  125. package/dist/pages/tree.page.d.ts +0 -3
@@ -22,7 +22,7 @@ Optional prop to define the text decoration style of the link as underline views
22
22
 
23
23
  ```tsx
24
24
  import React from 'react';
25
- import { Text } from '../../Text/Text';
25
+ import { Text } from 'app-studio';
26
26
  import { Vertical } from 'app-studio';
27
27
 
28
28
  import { Link } from '../Link';
@@ -53,7 +53,7 @@ Optional boolean indicating whether the link points to an external resource. Def
53
53
 
54
54
  ```tsx
55
55
  import React from 'react';
56
- import { Text } from '../../Text/Text';
56
+ import { Text } from 'app-studio';
57
57
 
58
58
  import { Link } from '../Link';
59
59
 
@@ -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 '../../Text/Text';
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 '../Text/Text';
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 '../Text/Text';
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 '../Text/Text';
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 '../Text/Text';
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 '../Text/Text';
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 '../Text/Text';
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 '../Text/Text';
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 '../Text/Text';
454
+ import { Text } from 'app-studio';
455
455
 
456
456
  const [show, setShow] = useState(false);
457
457
 
@@ -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
+ ![Basic OKR](https://placehold.co/800x400)
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
+ ![Detailed OKR](https://placehold.co/800x450)
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
+ ![Interactive OKR](https://placehold.co/800x250)
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
+ ![OKR with footers](https://placehold.co/800x300)
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 you don't specify an objective's progress, it will be automatically calculated as the average of its key results:
284
+ If an objective's `progress` is not provided, it is automatically calculated as the average progress of its key results.
285
+
286
+ ![Auto-progress OKR](https://placehold.co/800x350)
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
- ### Custom Styling Example
315
+ ![Custom styled OKR](https://placehold.co/800x250)
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)
@@ -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 '../../Text/Text';
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 '../../Text/Text';
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 '../../Text/Text';
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 '../../Text/Text';
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 '../../Text/Text';
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 '../../Text/Text';
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 '../../Text/Text';
156
+ import { Text } from 'app-studio';
157
157
 
158
158
  export const CompoundTooltip = () => {
159
159
  return (
@@ -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 '../../Text/Text';
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.36",
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.21",
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,74 +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
- /** Start date in ISO format (YYYY-MM-DD) or datetime (YYYY-MM-DDTHH:MM) */
9
- start: string;
10
- /** End date in ISO format (YYYY-MM-DD) or datetime (YYYY-MM-DDTHH:MM) */
11
- end: string;
12
- /** Color variant for the event */
13
- color?: 'blue' | 'red' | 'green' | 'purple' | 'orange';
14
- }
15
- export interface CalendarViews {
16
- /** Style overrides for the main container */
17
- container?: ViewProps;
18
- /** Style overrides for the header (navigation) */
19
- header?: ViewProps;
20
- /** Style overrides for the month/year title */
21
- monthTitle?: ViewProps;
22
- /** Style overrides for navigation buttons */
23
- navButton?: ViewProps;
24
- /** Style overrides for view switcher buttons */
25
- viewSwitcher?: ViewProps;
26
- /** Style overrides for the month grid */
27
- monthGrid?: ViewProps;
28
- /** Style overrides for weekday header row */
29
- weekdayHeader?: ViewProps;
30
- /** Style overrides for individual weekday labels */
31
- weekdayLabel?: ViewProps;
32
- /** Style overrides for individual day cells */
33
- dayCell?: ViewProps;
34
- /** Style overrides for day numbers */
35
- dayNumber?: ViewProps;
36
- /** Style overrides for the events area */
37
- eventsArea?: ViewProps;
38
- /** Style overrides for individual events */
39
- event?: ViewProps;
40
- /** Style overrides for time column (day view) */
41
- timeColumn?: ViewProps;
42
- /** Style overrides for time slot */
43
- timeSlot?: ViewProps;
44
- }
45
- export interface CalendarProps {
46
- /** Initial date to display in ISO format (YYYY-MM-DD) or Date object */
47
- initialDate?: string | Date;
48
- /** Initial view to display */
49
- initialView?: CalendarView;
50
- /** Array of events to display */
51
- events?: CalendarEvent[];
52
- /** Today's date in ISO format (defaults to current date) */
53
- today?: string;
54
- /** Callback when an event is dragged to a new position */
55
- onEventDrop?: (event: CalendarEvent) => void;
56
- /** Callback when an event is resized */
57
- onEventResize?: (event: CalendarEvent) => void;
58
- /** Callback when a date is clicked */
59
- onDateClick?: (date: string) => void;
60
- /** Callback when date/time changes */
61
- onDateChange?: (date: Date) => void;
62
- /** Callback when view changes */
63
- onViewChange?: (view: CalendarView) => void;
64
- /** Callback when double-clicking to add new event */
65
- onEventAdd?: (start: string, end: string) => void;
66
- /** Style overrides for various parts of the component */
67
- views?: CalendarViews;
68
- /** Width of the calendar (default: '100%') */
69
- width?: number | string;
70
- /** Maximum width of the calendar (default: 1200) */
71
- maxWidth?: number | string;
72
- /** First day of the week (0 = Sunday, 1 = Monday, etc.) */
73
- weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
74
- }
@@ -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,3 +0,0 @@
1
- import React from 'react';
2
- import { CalendarProps } from './Calendar.props';
3
- export declare const Calendar: React.FC<CalendarProps>;
@@ -1 +0,0 @@
1
- export { Calendar } from './Calendar/Calendar.view';