Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit a8df63b

Browse files
author
ci-bot
committed
RC 0.5.4
1 parent c7e3973 commit a8df63b

File tree

240 files changed

+12208
-27179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+12208
-27179
lines changed

CHANGELOG.MD

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
# Changelog
22

3-
All notable changes to this project.
3+
All notable changes to this project will be documented in this file.
44

5-
## [v1.0]()
5+
## [v0.5]()
6+
7+
Released on 2022-07-15.
8+
9+
Self-reliant components added
10+
11+
## [v0.4.2]()
612

713
Released on 2022-06-17.
814

915
Initial release of Dolby.io Communications UI Kit React. Version 1.0 relies on the web SDK 3.5.2.
10-

README.md

Lines changed: 407 additions & 100 deletions
Large diffs are not rendered by default.

__mocks__/MediaStream.mock.ts

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
Object.defineProperty(window, 'MediaRecorder', {
2+
writable: true,
3+
value: jest.fn().mockImplementation(() => ({
4+
start: jest.fn(),
5+
ondataavailable: jest.fn(),
6+
onerror: jest.fn(),
7+
state: '',
8+
stop: jest.fn(),
9+
})),
10+
});
11+
12+
Object.defineProperty(window, 'matchMedia', {
13+
writable: true,
14+
value: jest.fn().mockImplementation((query) => ({
15+
matches: false,
16+
media: query,
17+
onchange: null,
18+
addListener: jest.fn(), // deprecated
19+
removeListener: jest.fn(), // deprecated
20+
addEventListener: jest.fn(),
21+
removeEventListener: jest.fn(),
22+
dispatchEvent: jest.fn(),
23+
})),
24+
});
25+
26+
Object.defineProperty(window, 'MediaStream', {
27+
writable: true,
28+
value: jest.fn().mockImplementation(() => ({
29+
start: jest.fn(),
30+
ondataavailable: jest.fn(),
31+
onerror: jest.fn(),
32+
state: '',
33+
stop: jest.fn(),
34+
pause: jest.fn(),
35+
resume: jest.fn(),
36+
addEventListener: jest.fn(),
37+
removeEventListener: jest.fn(),
38+
})),
39+
});
40+
41+
Object.defineProperty(MediaStream, 'isTypeSupported', {
42+
writable: true,
43+
value: () => true,
44+
});
45+
46+
const mockGetUserMedia = jest.fn(async () => {
47+
return new Promise<void>((resolve) => {
48+
resolve();
49+
});
50+
});
51+
52+
const mockEnumerateDevices = jest.fn(async () => {
53+
return new Promise<MediaDeviceInfo[]>((resolve) => {
54+
resolve([
55+
{
56+
deviceId: 'default',
57+
kind: 'audiooutput',
58+
label: '',
59+
groupId: 'default',
60+
toJSON: jest.fn(),
61+
},
62+
]);
63+
});
64+
});
65+
66+
Object.defineProperty(global.navigator, 'mediaDevices', {
67+
value: {
68+
getUserMedia: mockGetUserMedia,
69+
enumerateDevices: mockEnumerateDevices,
70+
},
71+
});

__mocks__/documentExec.mock.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
global.document.execCommand = jest.fn();

__mocks__/fileTransformer.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const path = require('path');
2+
3+
module.exports = {
4+
process(src, filename, config, options) {
5+
return `module.exports = ${JSON.stringify(path.basename(filename))};`;
6+
},
7+
};

__mocks__/jest-svg-transformer.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
const path = require('path');
2+
3+
module.exports = {
4+
process(src, filePath) {
5+
if (path.extname(filePath) !== '.svg') {
6+
return src;
7+
}
8+
9+
const name = `svg-${path.basename(filePath, '.svg')}`
10+
.split(/\W+/)
11+
.map((x) => `${x.charAt(0).toUpperCase()}${x.slice(1)}`)
12+
.join('');
13+
14+
return `
15+
const React = require('react');
16+
function ${name}(props) {
17+
return React.createElement(
18+
'svg',
19+
Object.assign({}, props, {'data-file-name': ${name}.name})
20+
);
21+
}
22+
module.exports = ${name};
23+
`;
24+
},
25+
};

documentation/components/Avatar.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ The Avatar component is a graphical representation of an object or an entity, fo
44

55
## Props
66

7-
| Name | Type | Default | Description |
8-
| -------------------- | ----------------------- | ------- | ------------------------------------------------- |
9-
| `participant` | Participant | - | The Participant object. |
10-
| `size`? | 'xs' / 's' / 'm' / 'l' | 'l' | The size of the avatar. |
11-
| `borderColor`? | ColorKey | - | The color of the avatar's border. |
12-
| `testID`? | string | - | The unique E2E test handler. |
13-
| `...HTMLDivElement`? | Partial(HTMLDivElement) | - | Props that will be passed to the root div element |
7+
| Name | Type | Default | Description |
8+
| -------------------- | ----------------------- | ------- | --------------------------------------------------------- |
9+
| `participant` | Participant | - | The Participant object. |
10+
| `size`? | 'xs' / 's' / 'm' / 'l' | 'l' | The size of the avatar. |
11+
| `borderColor`? | ColorKey | - | The color of the avatar's border. |
12+
| `testID`? | string | - | The unique E2E test handler. |
13+
| `...HTMLDivElement`? | Partial(HTMLDivElement) | - | Props that will be passed to the root of the div element. |
1414

1515
## Examples
1616

documentation/components/Badge.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Badge
22

3-
The Badge component is addition to components. It displays as dot or can accept content.
3+
The Badge component generates a small label that can contain additional description.
44

55
## Props
66

7-
| Name | Type | Default | Description |
8-
| -------------------- | ----------------------- | ---------- | ------------------------------------------------- |
9-
| `content`? | ReactNode | - | The content of the badge. |
10-
| `backgroundColor`? | ColorKey | 'grey.700' | The background color of the badge. |
11-
| `contentColor`? | ColorKey | 'white' | The color of the badge's content. |
12-
| `testID`? | string | | The unique E2E test handler. |
13-
| `...HTMLDivElement`? | Partial(HTMLDivElement) | - | Props that will be passed to the root div element |
7+
| Name | Type | Default | Description |
8+
| -------------------- | ----------------------- | ---------- | --------------------------------------------------------- |
9+
| `content`? | ReactNode | - | The content of the badge. |
10+
| `backgroundColor`? | ColorKey | 'grey.700' | The background color of the badge. |
11+
| `contentColor`? | ColorKey | 'white' | The color of the badge's content. |
12+
| `testID`? | string | | The unique E2E test handler. |
13+
| `...HTMLDivElement`? | Partial(HTMLDivElement) | - | Props that will be passed to the root of the div element. |
1414

1515
## Examples
1616

documentation/components/Button.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The Button component is responsible for square and rectangular buttons.
1010
| `variant` ? | 'primary' / 'secondary' / 'tertiary' | - | The variant of style that allows you to distinguish between actions of different importance in the UI. |
1111
| `onClick` ? | Function | - | The event handler property for processing click events on the button. |
1212
| `testID` ? | string | - | The unique E2E test handler. |
13-
| `...HTMLButtonElement`? | Partial(HTMLDivElement) | - | Props that will be passed to the root button element |
13+
| `...HTMLButtonElement`? | Partial(HTMLDivElement) | - | Props that will be passed to the root of the button element. |
1414

1515
## Examples
1616

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# CameraSelect
2+
3+
The CameraSelect component displays a select list of available camera devices that a user can select. The component offers a built-in method that allows changing the currently used device.
4+
5+
## Props
6+
7+
| Name | Type | Default | Description |
8+
| ----------------- | -------- | ------- | ------------------------------------------------------- |
9+
| `labelColor` | ColorKey | - | The color of the label. |
10+
| `textColor` | ColorKey | - | The color of text. |
11+
| `backgroundColor` | ColorKey | - | The background color of the select element. |
12+
| `placeholder` | string | - | The default text to display when no option is selected. |
13+
| `label` | string | - | The text to display above the component. |
14+
| `testID` ? | string | - | The unique E2E test handler. |
15+
16+
## Examples
17+
18+
### React
19+
20+
```javascript
21+
return <CameraSelect testID="CameraSelect" label="Camera" placeholder="Camera" />;
22+
```

0 commit comments

Comments
 (0)