livevegas-ui-kit 1.0.314 → 1.0.316
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/livevegas-ui-kit.es.js +19 -10
- package/dist/livevegas-ui-kit.umd.js +3 -3
- package/dist/services/i18n/translations/en.json.d.ts +832 -832
- package/package.json +77 -77
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
|
+
```
|
|
@@ -453,7 +453,7 @@ var T = /* @__PURE__ */ function(e) {
|
|
|
453
453
|
"#E258D4",
|
|
454
454
|
"#F065DB"
|
|
455
455
|
]
|
|
456
|
-
][e.reduce((e, n, r) => n === t || n < t ? e = r : e, 0)], F = (e) =>
|
|
456
|
+
][e.reduce((e, n, r) => n === t || n < t ? e = r : e, 0)], F = (e) => e > 999999999 ? `${ce(b(e / 1e9))}B` : e > 999999.999999 ? `${ce(b(e / 1e6))}M` : e > 999.9999 ? `${ce(b(e / 1e3))}K` : b(e), ce = (e) => String(e), I = [
|
|
457
457
|
{
|
|
458
458
|
x: 10,
|
|
459
459
|
y: 2,
|
|
@@ -1625,10 +1625,10 @@ var T = /* @__PURE__ */ function(e) {
|
|
|
1625
1625
|
e >= 10 ? (t < 3 ? (i(m.slice(0, 3)), l(["...", e])) : i([1, "..."]), t > e - 3 ? l(m.slice(e - 3)) : l(["...", e]), t >= 3 && t <= e - 3 ? f([t]) : f([])) : (i([]), l([]), f([...m]));
|
|
1626
1626
|
}, v = (r, i) => {
|
|
1627
1627
|
if (r !== t) if (p(), typeof r == "string") {
|
|
1628
|
-
if (i ===
|
|
1628
|
+
if (i === "right") {
|
|
1629
1629
|
let r = m.slice(t, e);
|
|
1630
1630
|
n(r[(r.length / 2).toFixed() - 1]);
|
|
1631
|
-
} else if (i ===
|
|
1631
|
+
} else if (i === "left") {
|
|
1632
1632
|
let e = m.slice(0, t);
|
|
1633
1633
|
n(e[(e.length / 2).toFixed() - 1]);
|
|
1634
1634
|
}
|
|
@@ -1649,10 +1649,19 @@ var T = /* @__PURE__ */ function(e) {
|
|
|
1649
1649
|
})
|
|
1650
1650
|
}),
|
|
1651
1651
|
[
|
|
1652
|
-
...r
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1652
|
+
...r.map((e) => ({
|
|
1653
|
+
el: e,
|
|
1654
|
+
side: "left"
|
|
1655
|
+
})),
|
|
1656
|
+
...u.map((e) => ({
|
|
1657
|
+
el: e,
|
|
1658
|
+
side: void 0
|
|
1659
|
+
})),
|
|
1660
|
+
...a.map((e) => ({
|
|
1661
|
+
el: e,
|
|
1662
|
+
side: "right"
|
|
1663
|
+
}))
|
|
1664
|
+
].map(({ el: e, side: n }, r) => /* @__PURE__ */ o(Ie, {
|
|
1656
1665
|
$isActive: t === e,
|
|
1657
1666
|
children: /* @__PURE__ */ o(P, {
|
|
1658
1667
|
height: 26,
|
|
@@ -1662,8 +1671,8 @@ var T = /* @__PURE__ */ function(e) {
|
|
|
1662
1671
|
text: String(e),
|
|
1663
1672
|
isActiveBlue: t === e,
|
|
1664
1673
|
textStyle: "p"
|
|
1665
|
-
}
|
|
1666
|
-
},
|
|
1674
|
+
})
|
|
1675
|
+
}, r)),
|
|
1667
1676
|
/* @__PURE__ */ o(P, {
|
|
1668
1677
|
height: 26,
|
|
1669
1678
|
width: 26,
|
|
@@ -1986,7 +1995,7 @@ var T = /* @__PURE__ */ function(e) {
|
|
|
1986
1995
|
position: relative;
|
|
1987
1996
|
overflow: hidden;
|
|
1988
1997
|
`, qe = i.div`
|
|
1989
|
-
height:
|
|
1998
|
+
height: 100%;
|
|
1990
1999
|
padding: 8px;
|
|
1991
2000
|
overflow: auto;
|
|
1992
2001
|
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
accent-color: #aef;
|
|
162
162
|
cursor: pointer;
|
|
163
163
|
${({$isSettings:e})=>e&&`width: 120px`}
|
|
164
|
-
`,M=({isSettings:e,volumeTitle:n,volume:i,setVolume:a})=>{let{t:o}=(0,t.useTranslation)();return(0,r.jsxs)(oe,{$isSettings:e,children:[(0,r.jsx)(`p`,{children:o(n??``)}),(0,r.jsx)(se,{min:0,max:100,step:.01,value:i,onClick:e=>e.stopPropagation(),onChange:e=>{e.preventDefault(),a(parseFloat(e.target.value))},$isSettings:e})]})},N=({icon:e,onClick:n,buttonInfo:a,isActive:o,isValueButton:s=!1,width:c=32,height:l=32,text:u,textStyle:d,isActiveBlue:f,streamVolume:p,setStreamVolume:m,isHoverActive:h=!0,positonHover:g=`bottom`,onMouseLeave:_,onTouchStart:v,onTouchEnd:y,onTouchCancel:b})=>{let[x,S]=(0,i.useState)(!1),{t:C}=(0,t.useTranslation)();return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(ne,{width:c,height:l,$isValueButton:s,$isActive:o,$isActiveBlue:f,onMouseEnter:()=>S(!0),onMouseLeave:()=>{_&&_(),S(!1)},onClick:n,"data-testid":`custom-button`,$isTournament:a===`Tournament`,$isHoverActive:h,onTouchStart:v,onTouchEnd:y,onTouchCancel:b,children:[d&&u&&(0,r.jsx)(`p`,{className:d,children:C(u)}),e,x&&!o&&(()=>{if(a)return(0,r.jsxs)(j,{$positonHover:g,"data-testid":`button-info`,children:[(0,r.jsx)(ae,{position:g}),C(a)]});if(s&&m&&typeof p==`number`)return(0,r.jsx)(re,{children:(0,r.jsx)(M,{setVolume:m,volume:p})})})()]})})},ce=(e,t)=>[[`#D8B30F`,`#E8BE01`,`#ECCB37`],[`#1C5A2A`,`#216D32`,`#31A049`],[`#7A2525`,`#7E2626`,`#B33636`],[`#1E2C5E`,`#1F3164`,`#2E4091`],[`#3886CA`,`#2E97F2`,`#53AFFF`],[`#1A1A1A`,`#2A2A2A`,`#404040`],[`#64167E`,`#7A1CA5`,`#910AD4`],[`#CB5621`,`#D25C21`,`#F06428`],[`#C63EC3`,`#E258D4`,`#F065DB`]][e.reduce((e,n,r)=>n===t||n<t?e=r:e,0)],P=e=>
|
|
164
|
+
`,M=({isSettings:e,volumeTitle:n,volume:i,setVolume:a})=>{let{t:o}=(0,t.useTranslation)();return(0,r.jsxs)(oe,{$isSettings:e,children:[(0,r.jsx)(`p`,{children:o(n??``)}),(0,r.jsx)(se,{min:0,max:100,step:.01,value:i,onClick:e=>e.stopPropagation(),onChange:e=>{e.preventDefault(),a(parseFloat(e.target.value))},$isSettings:e})]})},N=({icon:e,onClick:n,buttonInfo:a,isActive:o,isValueButton:s=!1,width:c=32,height:l=32,text:u,textStyle:d,isActiveBlue:f,streamVolume:p,setStreamVolume:m,isHoverActive:h=!0,positonHover:g=`bottom`,onMouseLeave:_,onTouchStart:v,onTouchEnd:y,onTouchCancel:b})=>{let[x,S]=(0,i.useState)(!1),{t:C}=(0,t.useTranslation)();return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(ne,{width:c,height:l,$isValueButton:s,$isActive:o,$isActiveBlue:f,onMouseEnter:()=>S(!0),onMouseLeave:()=>{_&&_(),S(!1)},onClick:n,"data-testid":`custom-button`,$isTournament:a===`Tournament`,$isHoverActive:h,onTouchStart:v,onTouchEnd:y,onTouchCancel:b,children:[d&&u&&(0,r.jsx)(`p`,{className:d,children:C(u)}),e,x&&!o&&(()=>{if(a)return(0,r.jsxs)(j,{$positonHover:g,"data-testid":`button-info`,children:[(0,r.jsx)(ae,{position:g}),C(a)]});if(s&&m&&typeof p==`number`)return(0,r.jsx)(re,{children:(0,r.jsx)(M,{setVolume:m,volume:p})})})()]})})},ce=(e,t)=>[[`#D8B30F`,`#E8BE01`,`#ECCB37`],[`#1C5A2A`,`#216D32`,`#31A049`],[`#7A2525`,`#7E2626`,`#B33636`],[`#1E2C5E`,`#1F3164`,`#2E4091`],[`#3886CA`,`#2E97F2`,`#53AFFF`],[`#1A1A1A`,`#2A2A2A`,`#404040`],[`#64167E`,`#7A1CA5`,`#910AD4`],[`#CB5621`,`#D25C21`,`#F06428`],[`#C63EC3`,`#E258D4`,`#F065DB`]][e.reduce((e,n,r)=>n===t||n<t?e=r:e,0)],P=e=>e>999999999?`${F(b(e/1e9))}B`:e>999999.999999?`${F(b(e/1e6))}M`:e>999.9999?`${F(b(e/1e3))}K`:b(e),F=e=>String(e),I=[{x:10,y:2,size:0},{x:2,y:2,size:0},{x:2,y:-1,size:-.6},{x:0,y:-2,size:-.8},{x:0,y:-2,size:-1},{x:0,y:-3,size:-1.1},{x:0,y:-3,size:-1.2},{x:0,y:-3,size:-1.3},{x:0,y:-3,size:-1.35},{x:0,y:-3,size:-1.4}],L={x:15,y:40,size:1.8},R=e=>{let t=e.length,n=e[t-1],r=n===`K`||n===`M`||n===`B`,i;return i=r&&t===2?{x:2,y:0,size:-.4}:I[t-1]??{x:0,y:0,size:0},{x:L.x+i.x,y:L.y+i.y,size:L.size+i.size}},le=n.styled.text`
|
|
165
165
|
width: 100%;
|
|
166
166
|
font-family: Bebas Neue;
|
|
167
167
|
font-weight: 700;
|
|
@@ -254,7 +254,7 @@
|
|
|
254
254
|
letter-spacing: 0%;
|
|
255
255
|
color: ${({$isActive:e})=>e?`#111111`:`#ffffff`};
|
|
256
256
|
}
|
|
257
|
-
`,ze=({count:e,active:t,setActive:n})=>{let[a,o]=(0,i.useState)([]),[s,c]=(0,i.useState)([]),[l,u]=(0,i.useState)([]),{clickSound:d}=U({effectsVolume:50}),f=Array.from({length:e},(e,t)=>t+1),p=()=>{t!==e&&(d(),n(t+1))},m=()=>{t!==1&&(d(),n(t-1))};(0,i.useEffect)(()=>{h()},[t,e]);let h=()=>{e>=10?(t<3?(o(f.slice(0,3)),c([`...`,e])):o([1,`...`]),t>e-3?c(f.slice(e-3)):c([`...`,e]),t>=3&&t<=e-3?u([t]):u([])):(o([]),c([]),u([...f]))},g=(r,i)=>{if(r!==t)if(d(),typeof r==`string`){if(i
|
|
257
|
+
`,ze=({count:e,active:t,setActive:n})=>{let[a,o]=(0,i.useState)([]),[s,c]=(0,i.useState)([]),[l,u]=(0,i.useState)([]),{clickSound:d}=U({effectsVolume:50}),f=Array.from({length:e},(e,t)=>t+1),p=()=>{t!==e&&(d(),n(t+1))},m=()=>{t!==1&&(d(),n(t-1))};(0,i.useEffect)(()=>{h()},[t,e]);let h=()=>{e>=10?(t<3?(o(f.slice(0,3)),c([`...`,e])):o([1,`...`]),t>e-3?c(f.slice(e-3)):c([`...`,e]),t>=3&&t<=e-3?u([t]):u([])):(o([]),c([]),u([...f]))},g=(r,i)=>{if(r!==t)if(d(),typeof r==`string`){if(i===`right`){let r=f.slice(t,e);n(r[(r.length/2).toFixed()-1])}else if(i===`left`){let e=f.slice(0,t);n(e[(e.length/2).toFixed()-1])}}else n(r)};return(0,r.jsx)(Le,{children:(0,r.jsxs)(`div`,{className:`wrapper`,children:[(0,r.jsx)(N,{height:26,isHoverActive:!1,width:26,onClick:m,icon:(0,r.jsx)(H,{height:7,width:12,position:`left`})}),[...a.map(e=>({el:e,side:`left`})),...l.map(e=>({el:e,side:void 0})),...s.map(e=>({el:e,side:`right`}))].map(({el:e,side:n},i)=>(0,r.jsx)(Re,{$isActive:t===e,children:(0,r.jsx)(N,{height:26,width:26,onClick:()=>g(e,n),isHoverActive:!1,text:String(e),isActiveBlue:t===e,textStyle:`p`})},i)),(0,r.jsx)(N,{height:26,width:26,onClick:p,isHoverActive:!1,icon:(0,r.jsx)(H,{height:7,width:12,position:`right`})})]})})},Be=n.styled.div`
|
|
258
258
|
max-width: 100%;
|
|
259
259
|
height: 100%;
|
|
260
260
|
overflow: auto;
|
|
@@ -563,7 +563,7 @@
|
|
|
563
563
|
position: relative;
|
|
564
564
|
overflow: hidden;
|
|
565
565
|
`,Ye=n.styled.div`
|
|
566
|
-
height:
|
|
566
|
+
height: 100%;
|
|
567
567
|
padding: 8px;
|
|
568
568
|
overflow: auto;
|
|
569
569
|
|