livevegas-ui-kit 1.0.3 → 1.0.4
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/README.md +69 -69
- package/dist/components/Button/index.d.ts +5 -2
- package/dist/components/Chip/index.d.ts +2 -1
- package/dist/components/MobileMenu/index.d.ts +5 -1
- package/dist/components/Popup/index.d.ts +2 -1
- package/dist/components/Settings/index.d.ts +8 -1
- package/dist/components/TopIcons/Elements.d.ts +5 -1
- package/dist/components/TopIcons/helper.d.ts +5 -0
- package/dist/components/TopIcons/index.d.ts +8 -2
- package/dist/components/VolumeSlider/index.d.ts +3 -1
- package/dist/components/index.d.ts +5 -10
- package/dist/index.d.ts +7 -10
- package/dist/livevegas-ui-kit.es.d.ts +2 -0
- package/dist/livevegas-ui-kit.es.js +2642 -3367
- package/dist/livevegas-ui-kit.umd.js +76 -510
- package/package.json +55 -56
package/README.md
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
# React + TypeScript + Vite
|
|
2
|
-
|
|
3
|
-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
-
|
|
5
|
-
Currently, two official plugins are available:
|
|
6
|
-
|
|
7
|
-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
-
|
|
10
|
-
## Expanding the ESLint configuration
|
|
11
|
-
|
|
12
|
-
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
13
|
-
|
|
14
|
-
```js
|
|
15
|
-
export default tseslint.config([
|
|
16
|
-
globalIgnores(['dist']),
|
|
17
|
-
{
|
|
18
|
-
files: ['**/*.{ts,tsx}'],
|
|
19
|
-
extends: [
|
|
20
|
-
// Other configs...
|
|
21
|
-
|
|
22
|
-
// Remove tseslint.configs.recommended and replace with this
|
|
23
|
-
...tseslint.configs.recommendedTypeChecked,
|
|
24
|
-
// Alternatively, use this for stricter rules
|
|
25
|
-
...tseslint.configs.strictTypeChecked,
|
|
26
|
-
// Optionally, add this for stylistic rules
|
|
27
|
-
...tseslint.configs.stylisticTypeChecked,
|
|
28
|
-
|
|
29
|
-
// Other configs...
|
|
30
|
-
],
|
|
31
|
-
languageOptions: {
|
|
32
|
-
parserOptions: {
|
|
33
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
34
|
-
tsconfigRootDir: import.meta.dirname,
|
|
35
|
-
},
|
|
36
|
-
// other options...
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
])
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
43
|
-
|
|
44
|
-
```js
|
|
45
|
-
// eslint.config.js
|
|
46
|
-
import reactX from 'eslint-plugin-react-x'
|
|
47
|
-
import reactDom from 'eslint-plugin-react-dom'
|
|
48
|
-
|
|
49
|
-
export default tseslint.config([
|
|
50
|
-
globalIgnores(['dist']),
|
|
51
|
-
{
|
|
52
|
-
files: ['**/*.{ts,tsx}'],
|
|
53
|
-
extends: [
|
|
54
|
-
// Other configs...
|
|
55
|
-
// Enable lint rules for React
|
|
56
|
-
reactX.configs['recommended-typescript'],
|
|
57
|
-
// Enable lint rules for React DOM
|
|
58
|
-
reactDom.configs.recommended,
|
|
59
|
-
],
|
|
60
|
-
languageOptions: {
|
|
61
|
-
parserOptions: {
|
|
62
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
63
|
-
tsconfigRootDir: import.meta.dirname,
|
|
64
|
-
},
|
|
65
|
-
// other options...
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
])
|
|
69
|
-
```
|
|
1
|
+
# React + TypeScript + Vite
|
|
2
|
+
|
|
3
|
+
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
+
|
|
5
|
+
Currently, two official plugins are available:
|
|
6
|
+
|
|
7
|
+
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
|
|
8
|
+
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
|
|
9
|
+
|
|
10
|
+
## Expanding the ESLint configuration
|
|
11
|
+
|
|
12
|
+
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
13
|
+
|
|
14
|
+
```js
|
|
15
|
+
export default tseslint.config([
|
|
16
|
+
globalIgnores(['dist']),
|
|
17
|
+
{
|
|
18
|
+
files: ['**/*.{ts,tsx}'],
|
|
19
|
+
extends: [
|
|
20
|
+
// Other configs...
|
|
21
|
+
|
|
22
|
+
// Remove tseslint.configs.recommended and replace with this
|
|
23
|
+
...tseslint.configs.recommendedTypeChecked,
|
|
24
|
+
// Alternatively, use this for stricter rules
|
|
25
|
+
...tseslint.configs.strictTypeChecked,
|
|
26
|
+
// Optionally, add this for stylistic rules
|
|
27
|
+
...tseslint.configs.stylisticTypeChecked,
|
|
28
|
+
|
|
29
|
+
// Other configs...
|
|
30
|
+
],
|
|
31
|
+
languageOptions: {
|
|
32
|
+
parserOptions: {
|
|
33
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
34
|
+
tsconfigRootDir: import.meta.dirname,
|
|
35
|
+
},
|
|
36
|
+
// other options...
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
])
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
43
|
+
|
|
44
|
+
```js
|
|
45
|
+
// eslint.config.js
|
|
46
|
+
import reactX from 'eslint-plugin-react-x'
|
|
47
|
+
import reactDom from 'eslint-plugin-react-dom'
|
|
48
|
+
|
|
49
|
+
export default tseslint.config([
|
|
50
|
+
globalIgnores(['dist']),
|
|
51
|
+
{
|
|
52
|
+
files: ['**/*.{ts,tsx}'],
|
|
53
|
+
extends: [
|
|
54
|
+
// Other configs...
|
|
55
|
+
// Enable lint rules for React
|
|
56
|
+
reactX.configs['recommended-typescript'],
|
|
57
|
+
// Enable lint rules for React DOM
|
|
58
|
+
reactDom.configs.recommended,
|
|
59
|
+
],
|
|
60
|
+
languageOptions: {
|
|
61
|
+
parserOptions: {
|
|
62
|
+
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
63
|
+
tsconfigRootDir: import.meta.dirname,
|
|
64
|
+
},
|
|
65
|
+
// other options...
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
])
|
|
69
|
+
```
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
interface IButton {
|
|
2
2
|
icon?: React.ReactNode;
|
|
3
3
|
buttonInfo?: string;
|
|
4
4
|
onClick?: () => void;
|
|
@@ -9,5 +9,8 @@ export interface IButton {
|
|
|
9
9
|
text?: string;
|
|
10
10
|
textStyle?: string;
|
|
11
11
|
isActiveBlue?: boolean;
|
|
12
|
+
streamVolume?: number;
|
|
13
|
+
setStreamVolume?: (volume: number) => void;
|
|
12
14
|
}
|
|
13
|
-
export declare const Button: ({ icon, onClick, buttonInfo, isActive, isValueButton, width, height, text, textStyle, isActiveBlue, }: IButton) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const Button: ({ icon, onClick, buttonInfo, isActive, isValueButton, width, height, text, textStyle, isActiveBlue, streamVolume, setStreamVolume, }: IButton) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
interface IChip {
|
|
3
3
|
chipAmounts: number[];
|
|
4
4
|
amount: number;
|
|
5
5
|
width?: number;
|
|
@@ -7,3 +7,4 @@ export interface IChip {
|
|
|
7
7
|
onClick?: (amount: number) => void;
|
|
8
8
|
}
|
|
9
9
|
export declare const Chip: ({ chipAmounts, amount, width, height, onClick, }: IChip) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -18,5 +18,9 @@ export interface IToLobby {
|
|
|
18
18
|
messagesSupport: IMessage[];
|
|
19
19
|
isLandscape: boolean;
|
|
20
20
|
historyData: IHistoryData;
|
|
21
|
+
streamVolume: number;
|
|
22
|
+
effectsVolume: number;
|
|
23
|
+
setEffectsVolume: (volume: number) => void;
|
|
24
|
+
setStreamVolume: (volume: number) => void;
|
|
21
25
|
}
|
|
22
|
-
export declare const MobileMenu: ({ name, round, partnerId, socket, urlParam, messages, historyData, onSendMessage, isTournamentActive, chipAmounts, messagesSupport, onSendMessageSupport, isLandscape, }: IToLobby) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare const MobileMenu: ({ name, round, partnerId, socket, urlParam, messages, historyData, onSendMessage, isTournamentActive, chipAmounts, messagesSupport, onSendMessageSupport, isLandscape, streamVolume, effectsVolume, setEffectsVolume, setStreamVolume, }: IToLobby) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
interface IPopupWrapper {
|
|
4
4
|
header: string;
|
|
5
5
|
close: () => void;
|
|
6
6
|
width: number;
|
|
7
7
|
height: number;
|
|
8
8
|
}
|
|
9
9
|
export declare const PopupWrapper: ({ header, close, width, height, children, }: PropsWithChildren<IPopupWrapper>) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
interface ISettings {
|
|
2
|
+
streamVolume: number;
|
|
3
|
+
effectsVolume: number;
|
|
4
|
+
setEffectsVolume: (volume: number) => void;
|
|
5
|
+
setStreamVolume: (volume: number) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const Settings: ({ streamVolume, effectsVolume, setEffectsVolume, setStreamVolume, }: ISettings) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -12,5 +12,9 @@ export interface IElements {
|
|
|
12
12
|
isMobile?: boolean;
|
|
13
13
|
historyData: IHistoryData;
|
|
14
14
|
isLandscape?: boolean;
|
|
15
|
+
streamVolume: number;
|
|
16
|
+
effectsVolume: number;
|
|
17
|
+
setEffectsVolume: (volume: number) => void;
|
|
18
|
+
setStreamVolume: (volume: number) => void;
|
|
15
19
|
}
|
|
16
|
-
export declare const Elements: ({ activeAction, messages, onSendMessage, chipAmounts, messagesSupport, onSendMessageSupport, isMobile, historyData, isLandscape }: IElements) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const Elements: ({ activeAction, messages, onSendMessage, chipAmounts, messagesSupport, onSendMessageSupport, isMobile, historyData, isLandscape, streamVolume, effectsVolume, setEffectsVolume, setStreamVolume, }: IElements) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,6 +11,11 @@ export declare enum BUTTONS_TYPE {
|
|
|
11
11
|
closeMenu = 10,
|
|
12
12
|
Limit = 11
|
|
13
13
|
}
|
|
14
|
+
export interface Ibuttons {
|
|
15
|
+
name?: string;
|
|
16
|
+
buttonType: BUTTONS_TYPE;
|
|
17
|
+
icon: JSX.Element;
|
|
18
|
+
}
|
|
14
19
|
export declare const buttons: ({
|
|
15
20
|
name: string;
|
|
16
21
|
buttonType: BUTTONS_TYPE;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IMessage } from '../../api/types';
|
|
2
2
|
import { IHistoryData } from '../History/helpers';
|
|
3
3
|
|
|
4
|
-
export interface
|
|
4
|
+
export interface ITopIcons {
|
|
5
5
|
messages: IMessage[];
|
|
6
6
|
onSendMessage: (message: string) => void;
|
|
7
7
|
isTournamentActive?: boolean;
|
|
@@ -9,5 +9,11 @@ export interface IIcon {
|
|
|
9
9
|
onSendMessageSupport: (message: string) => void;
|
|
10
10
|
messagesSupport: IMessage[];
|
|
11
11
|
historyData: IHistoryData;
|
|
12
|
+
isFullscreen: boolean;
|
|
13
|
+
toggleFullscreen: () => void;
|
|
14
|
+
streamVolume: number;
|
|
15
|
+
effectsVolume: number;
|
|
16
|
+
setEffectsVolume: (volume: number) => void;
|
|
17
|
+
setStreamVolume: (volume: number) => void;
|
|
12
18
|
}
|
|
13
|
-
export declare const TopIcons: ({ messages, onSendMessage, isTournamentActive, chipAmounts, messagesSupport, onSendMessageSupport, historyData, }:
|
|
19
|
+
export declare const TopIcons: ({ messages, onSendMessage, isTournamentActive, chipAmounts, messagesSupport, onSendMessageSupport, historyData, isFullscreen, toggleFullscreen, streamVolume, effectsVolume, setEffectsVolume, setStreamVolume, }: ITopIcons) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
interface IVolumeSlider {
|
|
2
2
|
isSettings?: boolean;
|
|
3
3
|
volumeTitle?: string;
|
|
4
|
+
volume: number;
|
|
5
|
+
setVolume: (volume: number) => void;
|
|
4
6
|
}
|
|
5
|
-
export declare const VolumeSlider: ({ isSettings, volumeTitle }: IVolumeSlider) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const VolumeSlider: ({ isSettings, volumeTitle, volume, setVolume, }: IVolumeSlider) => import("react/jsx-runtime").JSX.Element;
|
|
6
8
|
export {};
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { ToLobby } from './ToLobby';
|
|
7
|
-
import { TopIcons } from './TopIcons';
|
|
8
|
-
import { TournamentNotification } from './TournamentNotification';
|
|
9
|
-
|
|
10
|
-
export { BalanceAndBet, TopIcons, Button, Chip, MobileMenu, PopupWrapper, ToLobby, TournamentNotification };
|
|
1
|
+
declare const _default: {
|
|
2
|
+
BalanceAndBet: ({ balance, bet, currencyId }: import('./BalanceAndBet').IBalanceAndBet) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
TopIcons: ({ messages, onSendMessage, isTournamentActive, chipAmounts, messagesSupport, onSendMessageSupport, historyData, isFullscreen, toggleFullscreen, streamVolume, effectsVolume, setEffectsVolume, setStreamVolume, }: import('./TopIcons').ITopIcons) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { TournamentNotification } from './components/TournamentNotification';
|
|
9
|
-
|
|
10
|
-
export { BalanceAndBet, TopIcons, Button, Chip, MobileMenu, PopupWrapper, ToLobby, TournamentNotification };
|
|
1
|
+
declare const _default: {
|
|
2
|
+
components: {
|
|
3
|
+
BalanceAndBet: ({ balance, bet, currencyId }: import('./components/BalanceAndBet').IBalanceAndBet) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
TopIcons: ({ messages, onSendMessage, isTournamentActive, chipAmounts, messagesSupport, onSendMessageSupport, historyData, isFullscreen, toggleFullscreen, streamVolume, effectsVolume, setEffectsVolume, setStreamVolume, }: import('./components/TopIcons').ITopIcons) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|