@app-studio/web 0.9.49 → 0.9.51

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.
@@ -104,6 +104,21 @@ export const DefaultDemo = () => (
104
104
  </Background.Gradient>
105
105
  </Vertical>
106
106
 
107
+ <Vertical gap={16}>
108
+ <Text fontSize={14} color="color.gray.600">
109
+ Background Video
110
+ </Text>
111
+ <Background.Video
112
+ src="https://www.w3schools.com/html/mov_bbb.mp4"
113
+ height="200px"
114
+ overlay="rgba(0,0,0,0.3)"
115
+ >
116
+ <Text color="white" fontSize={18} fontWeight="500">
117
+ Video Background
118
+ </Text>
119
+ </Background.Video>
120
+ </Vertical>
121
+
107
122
  <Vertical gap={16}>
108
123
  <Text fontSize={14} color="color.gray.600">
109
124
  Multi-color Gradient
@@ -285,6 +285,40 @@ export const ChartStatesDemo = () => {
285
285
  };
286
286
  ```
287
287
 
288
+ ### **Zero Values**
289
+
290
+ The Chart component handles cases where all values are zero by displaying the axes with a default scale, ensuring the chart structure remains visible.
291
+
292
+ ```tsx
293
+ import React from 'react';
294
+ import { Chart, CHART_COLORS, View } from '@app-studio/web';
295
+
296
+ export const ZeroValuesDemo = () => {
297
+ const data = {
298
+ labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'],
299
+ series: [
300
+ {
301
+ name: 'Revenue',
302
+ data: [0, 0, 0, 0, 0, 0],
303
+ color: CHART_COLORS.blue,
304
+ },
305
+ ],
306
+ };
307
+
308
+ return (
309
+ <View height="300px" width="100%">
310
+ <Chart
311
+ type="bar"
312
+ data={data}
313
+ title="Zero Revenue Chart"
314
+ showGrid
315
+ animated
316
+ />
317
+ </View>
318
+ );
319
+ };
320
+ ```
321
+
288
322
  ### **Available Colors**
289
323
 
290
324
  The Chart component provides a set of predefined colors through `CHART_COLORS`:
@@ -0,0 +1,78 @@
1
+ # Selector
2
+
3
+ A segmented control UI component for selecting from a limited list of options, typically used for toggling states or selecting mutually exclusive options like complexity or priority.
4
+
5
+ ## Props
6
+
7
+ | Prop | Type | Description | Default |
8
+ | ---------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------- |
9
+ | options | { label: string; value: string; color?: string }[] | Array of options for the selector. `color` defaults to primary theme color if not specified. | |
10
+ | label | string | Label for the selector group, displayed with an icon. | |
11
+ | id | string | ID for the form field. | |
12
+ | name | string | Name attribute for the form field. | |
13
+ | value | string | The currently selected value. | |
14
+ | onChange | (value: any) => void | Callback function when selection changes. | |
15
+ | views | SelectorStyles | Custom styles for internal sub-components (container, item, etc.). | |
16
+
17
+ ### **Import**
18
+ ```tsx
19
+ import { Selector } from '@app-studio/web';
20
+ ```
21
+
22
+ ### **Default**
23
+ ```tsx
24
+ import React from 'react';
25
+ import { Selector } from '@app-studio/web';
26
+
27
+ export const DefaultSelector = () => (
28
+ <Selector
29
+ options={[
30
+ { label: 'Option A', value: 'A' },
31
+ { label: 'Option B', value: 'B' },
32
+ { label: 'Option C', value: 'C' },
33
+ ]}
34
+ label="Standard Selection"
35
+ />
36
+ );
37
+ ```
38
+
39
+ ### **Complexity Example (Colored Options)**
40
+ Display options with specific semantic colors for active states, suitable for indicating status levels like Low, Medium, High.
41
+
42
+ ```tsx
43
+ import React from 'react';
44
+ import { Selector } from '@app-studio/web';
45
+
46
+ export const ComplexitySelector = () => (
47
+ <Selector
48
+ label="Complexity"
49
+ options={[
50
+ { label: 'Low', value: 'Low', color: 'color.emerald.500' },
51
+ { label: 'Medium', value: 'Medium', color: 'color.amber.500' },
52
+ { label: 'High', value: 'High', color: 'color.red.500' },
53
+ ]}
54
+ />
55
+ );
56
+ ```
57
+
58
+ ### **Custom Styling**
59
+ Apply custom styles to the container or items using the `views` prop.
60
+
61
+ ```tsx
62
+ import React from 'react';
63
+ import { Selector } from '@app-studio/web';
64
+
65
+ export const CustomStyleSelector = () => (
66
+ <Selector
67
+ label="Custom Styled"
68
+ views={{
69
+ container: { backgroundColor: 'color.gray.50' },
70
+ item: { fontSize: '14px', fontStyle: 'italic' }
71
+ }}
72
+ options={[
73
+ { label: 'One', value: '1' },
74
+ { label: 'Two', value: '2' },
75
+ ]}
76
+ />
77
+ );
78
+ ```
@@ -276,3 +276,96 @@ export const ResponsiveTitle = () => {
276
276
  };
277
277
  ```
278
278
 
279
+ ### **highlightTypewriter**
280
+ Adds a typewriter effect to the highlighted text.
281
+
282
+ - **Type:** `boolean`
283
+ - **Default:** `false`
284
+
285
+ ```tsx
286
+ import React from 'react';
287
+ import { Title } from '@app-studio/web';
288
+ import { Vertical } from 'app-studio';
289
+
290
+ export const TypewriterTitle = () => (
291
+ <Vertical gap={32}>
292
+ <Title
293
+ size="md"
294
+ highlightText="Typewriter Effect"
295
+ highlightTypewriter={true}
296
+ highlightTypewriterDuration={3000}
297
+ highlightStyle="gradient"
298
+ highlightColor="theme.primary"
299
+ highlightSecondaryColor="theme.secondary"
300
+ >
301
+ Title with
302
+ </Title>
303
+ </Vertical>
304
+ );
305
+ ```
306
+
307
+ ### **highlightSlide**
308
+ Adds a slide entry effect to the highlighted text.
309
+
310
+ - **Type:** `boolean`
311
+ - **Default:** `false`
312
+
313
+ ```tsx
314
+ import React from 'react';
315
+ import { Title } from '@app-studio/web';
316
+ import { Vertical } from 'app-studio';
317
+
318
+ export const SlideTitle = () => (
319
+ <Vertical gap={32}>
320
+ <Title
321
+ size="md"
322
+ highlightText="Slide Effect"
323
+ highlightSlide={true}
324
+ highlightSlideDuration={500}
325
+ highlightStyle="background"
326
+ highlightColor="theme.accent"
327
+ >
328
+ Title with
329
+ </Title>
330
+
331
+ <Title
332
+ size="md"
333
+ highlightText={["Slide", "Effect", "Multiple"]}
334
+ highlightSlide={true}
335
+ highlightSlideSequential={true}
336
+ highlightSlideStagger={200}
337
+ highlightStyle="underline"
338
+ highlightColor="theme.primary"
339
+ >
340
+ Sequential
341
+ </Title>
342
+ </Vertical>
343
+ );
344
+ ```
345
+
346
+ ### **alternateHighlightText**
347
+ Cycles through an array of strings, replacing the highlighted text.
348
+
349
+ - **Type:** `string[]`
350
+
351
+ ```tsx
352
+ import React from 'react';
353
+ import { Title } from '@app-studio/web';
354
+ import { Vertical } from 'app-studio';
355
+
356
+ export const AlternateTitle = () => (
357
+ <Vertical gap={32}>
358
+ <Title
359
+ size="md"
360
+ highlightText="Amazing"
361
+ alternateHighlightText={['Incredible', 'Fantastic', 'Awesome']}
362
+ alternateAnimation={true}
363
+ alternateDuration={2000}
364
+ highlightStyle="underline"
365
+ highlightColor="theme.success"
366
+ >
367
+ Title with Rotating Words:
368
+ </Title>
369
+ </Vertical>
370
+ );
371
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@app-studio/web",
3
- "version": "0.9.49",
3
+ "version": "0.9.51",
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.34",
115
+ "app-studio": "^0.6.46",
116
116
  "async-mutex": "^0.5.0",
117
117
  "babel-jest": "^29.5.0",
118
118
  "babel-loader": "^9.1.2",