lido-player 0.0.2-alpha-50-dev → 0.0.2-alpha-52-dev

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 (215) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/{index-6a69c33a.js → index-baff5c15.js} +48 -14
  3. package/dist/cjs/index.cjs.js +2 -2
  4. package/dist/cjs/{lido-avatar_21.cjs.entry.js → lido-avatar_22.cjs.entry.js} +3043 -162
  5. package/dist/cjs/lido-player.cjs.js +2 -2
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/{utils-079a5e7d.js → utils-ce99b0d0.js} +294 -108
  8. package/dist/collection/collection-manifest.json +1 -0
  9. package/dist/collection/components/avatar/lido-avatar.css +4 -4
  10. package/dist/collection/components/avatar/lido-avatar.js +1 -1
  11. package/dist/collection/components/calculator/lido-calculator.css +87 -87
  12. package/dist/collection/components/calculator/lido-calculator.js +14 -8
  13. package/dist/collection/components/canvas/lido-canvas.css +35 -0
  14. package/dist/collection/components/canvas/lido-canvas.js +220 -0
  15. package/dist/collection/components/cell/lido-cell.css +100 -100
  16. package/dist/collection/components/cell/lido-cell.js +12 -12
  17. package/dist/collection/components/column/lido-col.css +19 -19
  18. package/dist/collection/components/column/lido-col.js +6 -6
  19. package/dist/collection/components/container/lido-container.css +10 -10
  20. package/dist/collection/components/container/lido-container.js +70 -8
  21. package/dist/collection/components/flashCard/lido-flash-card.css +28 -28
  22. package/dist/collection/components/flashCard/lido-flash-card.js +4 -4
  23. package/dist/collection/components/float/lido-float.css +30 -30
  24. package/dist/collection/components/float/lido-float.js +2 -2
  25. package/dist/collection/components/home/lido-home.css +278 -278
  26. package/dist/collection/components/home/lido-home.js +92 -12
  27. package/dist/collection/components/image/lido-image.css +17 -17
  28. package/dist/collection/components/image/lido-image.js +6 -6
  29. package/dist/collection/components/keyboard/lido-keyboard.css +38 -38
  30. package/dist/collection/components/keyboard/lido-keyboard.js +3 -3
  31. package/dist/collection/components/mathMatrix/lido-math-matrix.css +56 -56
  32. package/dist/collection/components/mathMatrix/lido-math-matrix.js +69 -15
  33. package/dist/collection/components/position/lido-pos.css +16 -16
  34. package/dist/collection/components/position/lido-pos.js +2 -2
  35. package/dist/collection/components/random/lido-random.css +8 -8
  36. package/dist/collection/components/random/lido-random.js +2 -2
  37. package/dist/collection/components/root/lido-root.js +42 -6
  38. package/dist/collection/components/row/lido-row.css +10 -10
  39. package/dist/collection/components/row/lido-row.js +6 -6
  40. package/dist/collection/components/scale/lido-balance.css +145 -114
  41. package/dist/collection/components/scale/lido-balance.js +17 -17
  42. package/dist/collection/components/shape/lido-shape.css +96 -96
  43. package/dist/collection/components/shape/lido-shape.js +5 -5
  44. package/dist/collection/components/slideFill/lido-slide-fill.css +3 -3
  45. package/dist/collection/components/slideFill/lido-slide-fill.js +13 -13
  46. package/dist/collection/components/text/lido-text.css +53 -53
  47. package/dist/collection/components/text/lido-text.js +6 -5
  48. package/dist/collection/components/trace/lido-trace.css +97 -97
  49. package/dist/collection/components/trace/lido-trace.js +2 -2
  50. package/dist/collection/components/wrap/lido-wrap.css +18 -18
  51. package/dist/collection/components/wrap/lido-wrap.js +6 -6
  52. package/dist/collection/css/animation.css +194 -194
  53. package/dist/collection/css/index.css +277 -277
  54. package/dist/collection/stories/Templates/Fill-Up/fill-up.stories.js +60 -60
  55. package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +123 -123
  56. package/dist/collection/stories/Templates/RocketGame/rocketGame.stories.js +55 -48
  57. package/dist/collection/stories/Templates/Tag/tagGame.stories.js +29 -29
  58. package/dist/collection/stories/Templates/arrangeLetters/arrangeLetters.stories.js +42 -42
  59. package/dist/collection/stories/Templates/balancing/balancing.stories.js +37 -31
  60. package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +38 -38
  61. package/dist/collection/stories/Templates/blender/blender.stories.js +100 -0
  62. package/dist/collection/stories/Templates/bubbleType/bubbleType.stories.js +42 -42
  63. package/dist/collection/stories/Templates/calculator/calculator.stories.js +52 -0
  64. package/dist/collection/stories/Templates/categorize/categorize.stories.js +37 -37
  65. package/dist/collection/stories/Templates/categorize2/categorize2.stories.js +67 -67
  66. package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +28 -22
  67. package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +13 -13
  68. package/dist/collection/stories/Templates/create-sentence/createSentence.stories.js +74 -74
  69. package/dist/collection/stories/Templates/dragAndDrop/drag-drop.stories.js +69 -69
  70. package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +39 -38
  71. package/dist/collection/stories/Templates/fillBlank/fill-blank.stories.js +282 -282
  72. package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +37 -35
  73. package/dist/collection/stories/Templates/grid/grid.stories.js +118 -118
  74. package/dist/collection/stories/Templates/gridGame/grid-game.stories.js +57 -57
  75. package/dist/collection/stories/Templates/jumpSentence/jumpSentence.stories.js +41 -41
  76. package/dist/collection/stories/Templates/letterboard/letterboard.stories.js +183 -183
  77. package/dist/collection/stories/Templates/makeSentence/make-sentence.stories.js +36 -36
  78. package/dist/collection/stories/Templates/matchBox/matchBox.stories.js +69 -69
  79. package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +54 -54
  80. package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +25 -23
  81. package/dist/collection/stories/Templates/multipleOption/mcqWithQuestionImage.stories.js +112 -112
  82. package/dist/collection/stories/Templates/multipleOption/multiple-option.stories.js +47 -47
  83. package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +32 -28
  84. package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +56 -54
  85. package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +56 -45
  86. package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +41 -39
  87. package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +131 -127
  88. package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +53 -49
  89. package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +44 -40
  90. package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +98 -97
  91. package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +92 -91
  92. package/dist/collection/stories/Templates/phonic-tractor/phonic-tractor.stories.js +47 -45
  93. package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +20 -20
  94. package/dist/collection/stories/Templates/puzzleGame/puzzleGame.stories.js +17 -17
  95. package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +62 -58
  96. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracy.stories.js +50 -50
  97. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWithText.stories.js +36 -36
  98. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWord.stories.js +43 -43
  99. package/dist/collection/stories/Templates/reorder/reorder.stories.js +63 -63
  100. package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +52 -48
  101. package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +65 -61
  102. package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +62 -58
  103. package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +111 -107
  104. package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +46 -46
  105. package/dist/collection/stories/Templates/spellDoor/spellDoor.stories.js +41 -41
  106. package/dist/collection/stories/Templates/storyTale/storyTale.stories.js +39 -39
  107. package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +51 -47
  108. package/dist/collection/stories/Templates/total/total.stories.js +27 -27
  109. package/dist/collection/stories/Templates/writeCard/writeCard.stories.js +35 -31
  110. package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +62 -58
  111. package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +44 -40
  112. package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +36 -32
  113. package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +37 -33
  114. package/dist/collection/stories/components/flash-card.stories.js +48 -48
  115. package/dist/collection/stories/components/keyboard.stories.js +10 -10
  116. package/dist/collection/stories/components/slider.stories.js +4 -4
  117. package/dist/collection/stories/components/trace.stories.js +5 -5
  118. package/dist/collection/utils/audioPlayer.js +43 -6
  119. package/dist/collection/utils/constants.js +1 -0
  120. package/dist/collection/utils/i18n.js +36 -0
  121. package/dist/collection/utils/utils.js +170 -36
  122. package/dist/collection/utils/utilsHandlers/clickHandler.js +5 -1
  123. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +27 -15
  124. package/dist/collection/utils/utilsHandlers/highlightHandler.js +54 -54
  125. package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +2 -2
  126. package/dist/collection/utils/utilsHandlers/lidoCalculatorHandler.js +9 -9
  127. package/dist/collection/utils/utilsHandlers/sortHandler.js +10 -10
  128. package/dist/components/index.js +1 -1
  129. package/dist/components/lido-avatar.js +1 -1
  130. package/dist/components/lido-balance.js +1 -1
  131. package/dist/components/lido-calculator.js +1 -1
  132. package/dist/components/lido-canvas.d.ts +11 -0
  133. package/dist/components/lido-canvas.js +6 -0
  134. package/dist/components/lido-cell.js +1 -1
  135. package/dist/components/lido-col.js +1 -1
  136. package/dist/components/lido-container.js +1 -1
  137. package/dist/components/lido-flash-card.js +1 -1
  138. package/dist/components/lido-float.js +1 -1
  139. package/dist/components/lido-home.js +1 -1
  140. package/dist/components/lido-image.js +1 -1
  141. package/dist/components/lido-keyboard.js +1 -1
  142. package/dist/components/lido-math-matrix.js +1 -1
  143. package/dist/components/lido-pos.js +1 -1
  144. package/dist/components/lido-random.js +1 -1
  145. package/dist/components/lido-root.js +49 -25
  146. package/dist/components/lido-row.js +1 -1
  147. package/dist/components/lido-shape.js +1 -1
  148. package/dist/components/lido-slide-fill.js +1 -1
  149. package/dist/components/lido-text.js +1 -1
  150. package/dist/components/lido-trace.js +1 -1
  151. package/dist/components/lido-wrap.js +1 -1
  152. package/dist/components/{p-9be56729.js → p-00777872.js} +46 -2
  153. package/dist/components/{p-3f406017.js → p-06171259.js} +2 -2
  154. package/dist/components/{p-08d0deab.js → p-09f1e2d2.js} +15 -9
  155. package/dist/components/{p-e4e42677.js → p-0c2aebfb.js} +2 -2
  156. package/dist/components/p-0fbeb3a1.js +2700 -0
  157. package/dist/components/{p-cbac3cbc.js → p-11bf64aa.js} +2 -2
  158. package/dist/components/{p-44808985.js → p-26df0769.js} +7 -7
  159. package/dist/components/{p-1fbdb431.js → p-2d53e1a5.js} +2 -2
  160. package/dist/components/{p-afbc196f.js → p-39a2e638.js} +3 -2
  161. package/dist/components/{p-e36ddcc1.js → p-3ce3744c.js} +14 -11
  162. package/dist/components/{p-7f7e5672.js → p-3f4d4c0a.js} +2 -2
  163. package/dist/components/{p-d37ab4dc.js → p-52e77394.js} +2 -2
  164. package/dist/components/{p-bed94c37.js → p-58c67252.js} +331 -118
  165. package/dist/components/p-5b5f59a8.js +129 -0
  166. package/dist/components/{p-52844fa4.js → p-68112f8c.js} +2 -2
  167. package/dist/components/{p-15971ede.js → p-8a34b98b.js} +1 -1
  168. package/dist/components/{p-904711c8.js → p-8f2ed62f.js} +2 -2
  169. package/dist/components/{p-74849cdd.js → p-9d34d59d.js} +4 -4
  170. package/dist/components/{p-73e31a86.js → p-a2f96840.js} +8 -8
  171. package/dist/components/{p-90465904.js → p-a516a324.js} +2 -2
  172. package/dist/components/{p-322acda6.js → p-b2125fc9.js} +67 -31
  173. package/dist/components/{p-835b973d.js → p-c4abfd0f.js} +2 -2
  174. package/dist/components/{p-29bdd953.js → p-cb56a853.js} +2 -2
  175. package/dist/esm/{index-170e58c7.js → index-37c2ad2d.js} +48 -14
  176. package/dist/esm/index.js +2 -2
  177. package/dist/esm/{lido-avatar_21.entry.js → lido-avatar_22.entry.js} +3043 -163
  178. package/dist/esm/lido-player.js +3 -3
  179. package/dist/esm/loader.js +3 -3
  180. package/dist/esm/{utils-5df09162.js → utils-107b15a7.js} +294 -108
  181. package/dist/lido-player/index.esm.js +1 -1
  182. package/dist/lido-player/lido-player.esm.js +1 -1
  183. package/dist/lido-player/p-606ea279.entry.js +1 -0
  184. package/dist/lido-player/p-9a9d5339.js +2 -0
  185. package/dist/lido-player/{p-7556e652.js → p-d1251482.js} +2 -2
  186. package/dist/types/components/canvas/lido-canvas.d.ts +27 -0
  187. package/dist/types/components/container/lido-container.d.ts +6 -0
  188. package/dist/types/components/home/lido-home.d.ts +8 -0
  189. package/dist/types/components/mathMatrix/lido-math-matrix.d.ts +3 -1
  190. package/dist/types/components/root/lido-root.d.ts +5 -0
  191. package/dist/types/components.d.ts +71 -6
  192. package/dist/types/stories/Templates/RocketGame/rocketGame.stories.d.ts +1 -0
  193. package/dist/types/stories/Templates/blender/blender.stories.d.ts +4 -0
  194. package/dist/types/stories/Templates/calculator/calculator.stories.d.ts +4 -0
  195. package/dist/types/stories/Templates/multiplyBeeds/multiplyBeeds.stories.d.ts +1 -0
  196. package/dist/types/stories/Templates/openwindow/openwindow.stories.d.ts +1 -0
  197. package/dist/types/stories/Templates/openwindow/openwindow2.stories.d.ts +1 -0
  198. package/dist/types/stories/Templates/questionBoard/questionBoard.stories.d.ts +1 -0
  199. package/dist/types/stories/Templates/sequenceBox/sequenceBox1.stories.d.ts +1 -0
  200. package/dist/types/stories/Templates/sequenceBox/sequenceBox2.stories.d.ts +1 -0
  201. package/dist/types/stories/Templates/shapePair/shape-pair.stories.d.ts +1 -1
  202. package/dist/types/stories/Templates/sumTogether/sumTogether.stories.d.ts +1 -0
  203. package/dist/types/stories/Templates/writeCard/writeCard.stories.d.ts +1 -0
  204. package/dist/types/stories/Templates/writeLetter/writeLetter.stories.d.ts +1 -0
  205. package/dist/types/stories/Templates/writeNumber/writeNumber.stories.d.ts +1 -0
  206. package/dist/types/stories/Templates/writeWord/writeWord.stories.d.ts +1 -0
  207. package/dist/types/types/json.d.ts +4 -0
  208. package/dist/types/utils/audioPlayer.d.ts +2 -0
  209. package/dist/types/utils/constants.d.ts +1 -0
  210. package/dist/types/utils/i18n.d.ts +5 -0
  211. package/dist/types/utils/utils.d.ts +1 -0
  212. package/package.json +71 -69
  213. package/readme.md +113 -113
  214. package/dist/lido-player/p-137c99ce.js +0 -2
  215. package/dist/lido-player/p-eb956325.entry.js +0 -1
@@ -1,114 +1,145 @@
1
- #lido-balance {
2
- position: relative;
3
- height: 500px;
4
- width: 1205px;
5
- top: 20%;
6
- left: -91px;
7
- z-index: 0;
8
- }
9
-
10
- .lido-balance-symbol {
11
- position: absolute;
12
- top: 64%;
13
- left: 50%;
14
- transform: translate(-50%, -50%);
15
- font-size: 5vw;
16
- font-weight: bold;
17
- color: black;
18
- pointer-events: none;
19
- z-index: 999;
20
- }
21
-
22
- @media (orientation: portrait) {
23
- #pivotimg {
24
- position: absolute;
25
- height:auto;
26
- width: 23%;
27
- bottom: 18%;
28
- left: 38%;
29
- z-index: 100;
30
-
31
- }
32
- }
33
-
34
-
35
- @media (orientation: landscape) {
36
- #pivotimg {
37
- position: absolute;
38
- height:auto;
39
- width: 23%;
40
- bottom: 8%;
41
- left: 38%;
42
- z-index: 100;
43
- }
44
- }
45
-
46
- .lido-balance .pivot svg {
47
- width: 100%;
48
- height: auto;
49
- }
50
-
51
-
52
- #scaleimg {
53
- position: absolute;
54
- width: 73%;
55
- height: auto;
56
- top: 61%;
57
- left: 14%;
58
- z-index: 90;
59
- }
60
- .lido-balance .scale svg {
61
- width: 100%;
62
- height: auto;
63
- }
64
-
65
- @media (orientation: landscape) {
66
- #handlerimg {
67
- position: absolute;
68
- width: 35%;
69
- height: auto;
70
- top:49%;
71
- left: 2%;
72
- }}
73
- @media (orientation:portrait ) {
74
- #handlerimg {
75
- position: absolute;
76
- width: 35%;
77
- height: auto;
78
- top:53%;
79
- left: 2%;
80
- }}
81
- .lido-balance .handler svg {
82
- width: 100%;
83
- height: auto;
84
- fill: brown;
85
- }
86
-
87
- @media (orientation: landscape) {
88
- #handimg {
89
- position: absolute;
90
- width: 35%;
91
- height: auto;
92
- top: 49%;
93
- right: 2%;
94
- }}
95
- @media (orientation:portrait) {
96
- #handimg {
97
- position: absolute;
98
- width: 35%;
99
- height: auto;
100
- top: 53%;
101
- right: 2%;
102
- }}
103
- .lido-balance .hand svg {
104
- width: 100%;
105
- height: auto;
106
- fill: brown;
107
- }
108
-
109
- .pivot svg path:nth-of-type(1) {
110
- fill: brown;
111
- }
112
- .pivot svg path[d^="M78.9414"] {
113
- fill: white;
114
- }
1
+ #lido-balance {
2
+ position: relative;
3
+ height: 500px;
4
+ width: 1205px;
5
+ top: 20%;
6
+ left: -91px;
7
+ z-index: 0;
8
+ }
9
+
10
+ .lido-balance-symbol {
11
+ position: absolute;
12
+ top: 64%;
13
+ left: 50%;
14
+ transform: translate(-50%, -50%);
15
+ font-size: 5vw;
16
+ font-weight: bold;
17
+ color: black;
18
+ pointer-events: none;
19
+ z-index: 999;
20
+ }
21
+ @media (orientation: portrait) {
22
+ .lido-balance-shadow {
23
+ height: 100px;
24
+ position: absolute;
25
+ top: 80%;
26
+ left: 28%;
27
+ }
28
+ }
29
+
30
+ @media (orientation: landscape) {
31
+ .lido-balance-shadow {
32
+ height: 100px ;
33
+ position: absolute;
34
+ top: 90% ;
35
+ left: 33% ;
36
+ }
37
+ }
38
+ @media (orientation: portrait) {
39
+ #pivotimg {
40
+ position: absolute;
41
+ height:auto;
42
+ width: 23%;
43
+ bottom: 18%;
44
+ left: 38%;
45
+ z-index: 100;
46
+
47
+ }
48
+ }
49
+
50
+ #pivotimg::after {
51
+ content: "";
52
+ position: absolute;
53
+ bottom: -30px;
54
+ left: 50%;
55
+ transform: translateX(-50%);
56
+ width: 120%;
57
+ height: 60px;
58
+ background-image: url("https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/balancing/Shadow.svg");
59
+ background-size: contain;
60
+ background-repeat: no-repeat;
61
+ background-position: center;
62
+ pointer-events: none;
63
+ z-index: 10;
64
+ }
65
+
66
+ @media (orientation: landscape) {
67
+ #pivotimg {
68
+ position: absolute;
69
+ height:auto;
70
+ width: 23%;
71
+ bottom: 8%;
72
+ left: 38%;
73
+ z-index: 100;
74
+ }
75
+ }
76
+
77
+ .lido-balance .pivot svg {
78
+ width: 100%;
79
+ height: auto;
80
+ }
81
+
82
+
83
+ #scaleimg {
84
+ position: absolute;
85
+ width: 73%;
86
+ height: auto;
87
+ top: 61%;
88
+ left: 14%;
89
+ z-index: 90;
90
+ }
91
+ .lido-balance .scale svg {
92
+ width: 100%;
93
+ height: auto;
94
+ }
95
+
96
+ @media (orientation: landscape) {
97
+ #handlerimg {
98
+ position: absolute;
99
+ width: 35%;
100
+ height: auto;
101
+ top:49%;
102
+ left: 2%;
103
+ }}
104
+ @media (orientation:portrait ) {
105
+ #handlerimg {
106
+ position: absolute;
107
+ width: 35%;
108
+ height: auto;
109
+ top:53%;
110
+ left: 2%;
111
+ }}
112
+ .lido-balance .handler svg {
113
+ width: 100%;
114
+ height: auto;
115
+ fill: brown;
116
+ }
117
+
118
+ @media (orientation: landscape) {
119
+ #handimg {
120
+ position: absolute;
121
+ width: 35%;
122
+ height: auto;
123
+ top: 49%;
124
+ right: 2%;
125
+ }}
126
+ @media (orientation:portrait) {
127
+ #handimg {
128
+ position: absolute;
129
+ width: 35%;
130
+ height: auto;
131
+ top: 53%;
132
+ right: 2%;
133
+ }}
134
+ .lido-balance .hand svg {
135
+ width: 100%;
136
+ height: auto;
137
+ fill: brown;
138
+ }
139
+
140
+ .pivot svg path:nth-of-type(1) {
141
+ fill: brown;
142
+ }
143
+ .pivot svg path[d^="M78.9414"] {
144
+ fill: white;
145
+ }
@@ -42,9 +42,7 @@ export class LidoBalance {
42
42
  this.handlerSvg = await this.fetchAndApplyFill(this.handlerimage);
43
43
  }
44
44
  componentDidLoad() {
45
- setTimeout(() => {
46
- this.animateBalance();
47
- }, 4000);
45
+ this.animateBalance();
48
46
  this.leftParentEl = document.getElementById("leftparent");
49
47
  this.rightParentEl = document.getElementById("rightparent");
50
48
  initEventsForElement(this.el);
@@ -75,6 +73,7 @@ export class LidoBalance {
75
73
  async updateTilt(leftVal, rightVal) {
76
74
  const diff = rightVal - leftVal;
77
75
  const newTilt = Math.max(-5, Math.min(5, diff));
76
+ await new Promise(res => setTimeout(res, 350));
78
77
  this.tiltf = newTilt;
79
78
  }
80
79
  animateBalance() {
@@ -94,7 +93,8 @@ export class LidoBalance {
94
93
  this.scaleEl.style.transformOrigin = '50% 80%';
95
94
  }
96
95
  if (this.leftParentEl && this.rightParentEl) {
97
- const maxOffset = 60;
96
+ const isPortrait = window.innerHeight > window.innerWidth;
97
+ const maxOffset = isPortrait ? 40 : 60;
98
98
  const offset = (this.currentAngle / this.maxTilt) * maxOffset;
99
99
  this.leftParentEl.style.transform = `translateY(${-offset}px)`;
100
100
  this.rightParentEl.style.transform = `translateY(${offset}px)`;
@@ -124,7 +124,7 @@ export class LidoBalance {
124
124
  };
125
125
  }
126
126
  render() {
127
- return (h(Host, { key: '868cc05ae503a6e04039c615815102470eb402d4', id: "lido-balance", onEntry: this.onEntry, class: "lido-balance", tilt: this.tilt.toString(), style: this.style, operation: this.operation.toString() }, h("div", { key: '2627a49d1ad5045bd9a3ac217354c9be98f1f52b', innerHTML: this.pivotSvg, id: "pivotimg", class: "pivot" }), h("div", { key: 'c5b2432f5e3c62ebbb7f17146f18e22e7e2b29bb', innerHTML: this.scaleSvg, id: "scaleimg", class: "scale", ref: (el) => (this.scaleEl = el) }), h("div", { key: 'd5e8051aedb784189f19a1e7b0dfd645e95ed4a5', innerHTML: this.handlerSvg, id: "handlerimg", class: "handler", ref: (el) => (this.leftHandleEl = el) }), h("div", { key: '3779886d4fc8dfadc0791f69cb87df78d5f843c8', innerHTML: this.handlerSvg, id: "handimg", class: "hand", ref: (el) => (this.rightHandleEl = el) }), h("div", { key: 'df5d4094c302548bf64f166643a3f05d262d95b1', id: "balanceSymbol", class: "lido-balance-symbol", "aria-hidden": !this.showSymbol }, this.showSymbol ? this.balanceSymbol : '')));
127
+ return (h(Host, { key: 'd1da72f1bf298dd7c81b0cfefa0e9e563ccbfff1', id: "lido-balance", "bg-color": "red", onEntry: this.onEntry, class: "lido-balance", tilt: this.tilt.toString(), style: this.style, operation: this.operation.toString() }, h("div", { key: '737ab206a5156b402d4477a38567480f10419c14', innerHTML: this.pivotSvg, id: "pivotimg", class: "pivot" }), h("div", { key: '8bc60136950858d5d1b96c38ec4c0635024f8d24', innerHTML: this.scaleSvg, id: "scaleimg", class: "scale", ref: (el) => (this.scaleEl = el) }), h("div", { key: '07049a6b5c8e75d831c9287b2b4a0e633791174b', innerHTML: this.handlerSvg, id: "handlerimg", class: "handler", ref: (el) => (this.leftHandleEl = el) }), h("div", { key: '85361c27b1ab6fcc86969bfc9d4dff1df6040165', innerHTML: this.handlerSvg, id: "handimg", class: "hand", ref: (el) => (this.rightHandleEl = el) }), h("div", { key: 'c4208582bfa1b63e4381d44d9a95e9c537dfbc84', id: "balanceSymbol", class: "lido-balance-symbol", "aria-hidden": !this.showSymbol }, this.showSymbol ? this.balanceSymbol : '')));
128
128
  }
129
129
  static get is() { return "lido-balance"; }
130
130
  static get originalStyleUrls() {
@@ -205,7 +205,7 @@ export class LidoBalance {
205
205
  "optional": false,
206
206
  "docs": {
207
207
  "tags": [],
208
- "text": "Fill color applied to all loaded SVGs (pivot, scale, handler).\nDefaults to \"brown\"."
208
+ "text": "Fill color applied to all loaded SVGs (pivot, scale, handler).\r\nDefaults to \"brown\"."
209
209
  },
210
210
  "attribute": "fill",
211
211
  "reflect": false,
@@ -223,7 +223,7 @@ export class LidoBalance {
223
223
  "optional": false,
224
224
  "docs": {
225
225
  "tags": [],
226
- "text": "Initial tilt value of the balance.\nNegative = tilts left, Positive = tilts right."
226
+ "text": "Initial tilt value of the balance.\r\nNegative = tilts left, Positive = tilts right."
227
227
  },
228
228
  "attribute": "tilt",
229
229
  "reflect": false,
@@ -259,7 +259,7 @@ export class LidoBalance {
259
259
  "optional": false,
260
260
  "docs": {
261
261
  "tags": [],
262
- "text": "Action(s) to execute when the component enters the DOM.\nExample: trigger animations or audio cues."
262
+ "text": "Action(s) to execute when the component enters the DOM.\r\nExample: trigger animations or audio cues."
263
263
  },
264
264
  "attribute": "on-entry",
265
265
  "reflect": false,
@@ -277,7 +277,7 @@ export class LidoBalance {
277
277
  "optional": false,
278
278
  "docs": {
279
279
  "tags": [],
280
- "text": "CSS height of the component (responsive values allowed).\nDefault: \"auto\"."
280
+ "text": "CSS height of the component (responsive values allowed).\r\nDefault: \"auto\"."
281
281
  },
282
282
  "attribute": "height",
283
283
  "reflect": false,
@@ -295,7 +295,7 @@ export class LidoBalance {
295
295
  "optional": false,
296
296
  "docs": {
297
297
  "tags": [],
298
- "text": "CSS width of the component (responsive values allowed).\nDefault: \"auto\"."
298
+ "text": "CSS width of the component (responsive values allowed).\r\nDefault: \"auto\"."
299
299
  },
300
300
  "attribute": "width",
301
301
  "reflect": false,
@@ -313,7 +313,7 @@ export class LidoBalance {
313
313
  "optional": false,
314
314
  "docs": {
315
315
  "tags": [],
316
- "text": "Horizontal (X-axis) offset for positioning the component.\nDefault: \"0px\"."
316
+ "text": "Horizontal (X-axis) offset for positioning the component.\r\nDefault: \"0px\"."
317
317
  },
318
318
  "attribute": "x",
319
319
  "reflect": false,
@@ -331,7 +331,7 @@ export class LidoBalance {
331
331
  "optional": false,
332
332
  "docs": {
333
333
  "tags": [],
334
- "text": "Vertical (Y-axis) offset for positioning the component.\nDefault: \"0px\"."
334
+ "text": "Vertical (Y-axis) offset for positioning the component.\r\nDefault: \"0px\"."
335
335
  },
336
336
  "attribute": "y",
337
337
  "reflect": false,
@@ -349,7 +349,7 @@ export class LidoBalance {
349
349
  "optional": false,
350
350
  "docs": {
351
351
  "tags": [],
352
- "text": "Z-index for stacking order of the component.\nDefault: \"0\"."
352
+ "text": "Z-index for stacking order of the component.\r\nDefault: \"0\"."
353
353
  },
354
354
  "attribute": "z",
355
355
  "reflect": false,
@@ -367,7 +367,7 @@ export class LidoBalance {
367
367
  "optional": false,
368
368
  "docs": {
369
369
  "tags": [],
370
- "text": "Controls component visibility.\nAccepts boolean (`true`/`false`) or string (\"true\"/\"false\")."
370
+ "text": "Controls component visibility.\r\nAccepts boolean (`true`/`false`) or string (\"true\"/\"false\")."
371
371
  },
372
372
  "attribute": "visible",
373
373
  "reflect": false,
@@ -421,7 +421,7 @@ export class LidoBalance {
421
421
  "optional": false,
422
422
  "docs": {
423
423
  "tags": [],
424
- "text": "Balance symbol shown when `showSymbol` is true.\nDefault: \"=\"."
424
+ "text": "Balance symbol shown when `showSymbol` is true.\r\nDefault: \"=\"."
425
425
  },
426
426
  "attribute": "balance-symbol",
427
427
  "reflect": true,
@@ -439,7 +439,7 @@ export class LidoBalance {
439
439
  "optional": false,
440
440
  "docs": {
441
441
  "tags": [],
442
- "text": "Whether the balance symbol is currently displayed.\nCan be toggled with `revealSymbol()` and `hideSymbol()`."
442
+ "text": "Whether the balance symbol is currently displayed.\r\nCan be toggled with `revealSymbol()` and `hideSymbol()`."
443
443
  },
444
444
  "attribute": "show-symbol",
445
445
  "reflect": true,
@@ -457,7 +457,7 @@ export class LidoBalance {
457
457
  "optional": false,
458
458
  "docs": {
459
459
  "tags": [],
460
- "text": "Operation type used to calculate balance values.\nSupported: \"count\", \"add\", \"subtract\", etc."
460
+ "text": "Operation type used to calculate balance values.\r\nSupported: \"count\", \"add\", \"subtract\", etc."
461
461
  },
462
462
  "attribute": "operation",
463
463
  "reflect": false,
@@ -1,96 +1,96 @@
1
- .lido-shape {
2
- position: absolute;
3
- top: var(--y);
4
- left: var(--x);
5
- display: var(--display);
6
- z-index: var(--z);
7
- }
8
-
9
- .lido-rectangle {
10
- border-radius: 0;
11
- }
12
-
13
- .lido-circle {
14
- width: var(--width); /* Ensures width is always used for both dimensions */
15
- height: var(--width); /* Make height equal to width for a perfect circle */
16
- border-radius: 50%; /* 50% border-radius for a perfect circle */
17
- background-color: var(--bgColor);
18
- }
19
-
20
- .lido-ellipse {
21
- width: var(--width);
22
- height: var(--height);
23
- border-radius: 50%; /* Create an ellipse shape */
24
- background-color: var(--bgColor);
25
- }
26
-
27
- /* other shapes */
28
-
29
- .lido-triangle {
30
- width: var(--triangleWidth);
31
- height: var(--triangleHeight);
32
- background-color: var(--bgColor);
33
- clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
34
- }
35
-
36
- .lido-rightTriangle {
37
- width: var(--triangleWidth);
38
- height: var(--triangleHeight);
39
- background-color: var(--bgColor);
40
- clip-path: polygon(100% 0%, 100% 100%, 0% 100%);
41
- }
42
-
43
- .lido-leftTriangle {
44
- width: var(--triangleWidth);
45
- height: var(--triangleHeight);
46
- background-color: var(--triangleBgColor);
47
- clip-path: polygon(0% 0%, 100% 100%, 0% 100%);
48
- }
49
-
50
- .lido-parallelogram {
51
- width: var(--paralleWidth);
52
- height: var(--paralleHeight);
53
- transform: skew(20deg);
54
- }
55
-
56
- .lido-star {
57
- width: var(--starWidth);
58
- height: var(--starHeight);
59
- background-color: var(--starBgColor);
60
- clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
61
- }
62
-
63
- .lido-pentagon {
64
- width: var(--pentagonWidth);
65
- height: var(--pentagonHeight);
66
- background-color: var(--pentagonBgColor);
67
- clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
68
- }
69
-
70
- .lido-heptagon {
71
- width: var(--heptagonWidth);
72
- height: var(--heptagonHeight);
73
- background-color: var(--heptagonBgColor);
74
- clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
75
- }
76
-
77
- .lido-octagon {
78
- width: var(--octagonWidth);
79
- height: var(--octagonHeight);
80
- background-color: var(--octagonBgColor);
81
- clip-path: polygon(25% 0%, 75% 0%, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0% 75%, 0% 25%);
82
- }
83
-
84
- .lido-rhombus {
85
- width: var(--rhombusWidth);
86
- height: var(--rhombusHeight);
87
- background-color: var(--rhombusBgColor);
88
- clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
89
- }
90
-
91
- .lido-heart {
92
- height: var(--heartHeight);
93
- width: var(--heartWidth);
94
- border-image: radial-gradient(var(--heartBgColor) 69%, #0000 70%) 84.5%/50%;
95
- clip-path: polygon(-41% 0, 50% 91%, 141% 0);
96
- }
1
+ .lido-shape {
2
+ position: absolute;
3
+ top: var(--y);
4
+ left: var(--x);
5
+ display: var(--display);
6
+ z-index: var(--z);
7
+ }
8
+
9
+ .lido-rectangle {
10
+ border-radius: 0;
11
+ }
12
+
13
+ .lido-circle {
14
+ width: var(--width); /* Ensures width is always used for both dimensions */
15
+ height: var(--width); /* Make height equal to width for a perfect circle */
16
+ border-radius: 50%; /* 50% border-radius for a perfect circle */
17
+ background-color: var(--bgColor);
18
+ }
19
+
20
+ .lido-ellipse {
21
+ width: var(--width);
22
+ height: var(--height);
23
+ border-radius: 50%; /* Create an ellipse shape */
24
+ background-color: var(--bgColor);
25
+ }
26
+
27
+ /* other shapes */
28
+
29
+ .lido-triangle {
30
+ width: var(--triangleWidth);
31
+ height: var(--triangleHeight);
32
+ background-color: var(--bgColor);
33
+ clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
34
+ }
35
+
36
+ .lido-rightTriangle {
37
+ width: var(--triangleWidth);
38
+ height: var(--triangleHeight);
39
+ background-color: var(--bgColor);
40
+ clip-path: polygon(100% 0%, 100% 100%, 0% 100%);
41
+ }
42
+
43
+ .lido-leftTriangle {
44
+ width: var(--triangleWidth);
45
+ height: var(--triangleHeight);
46
+ background-color: var(--triangleBgColor);
47
+ clip-path: polygon(0% 0%, 100% 100%, 0% 100%);
48
+ }
49
+
50
+ .lido-parallelogram {
51
+ width: var(--paralleWidth);
52
+ height: var(--paralleHeight);
53
+ transform: skew(20deg);
54
+ }
55
+
56
+ .lido-star {
57
+ width: var(--starWidth);
58
+ height: var(--starHeight);
59
+ background-color: var(--starBgColor);
60
+ clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
61
+ }
62
+
63
+ .lido-pentagon {
64
+ width: var(--pentagonWidth);
65
+ height: var(--pentagonHeight);
66
+ background-color: var(--pentagonBgColor);
67
+ clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
68
+ }
69
+
70
+ .lido-heptagon {
71
+ width: var(--heptagonWidth);
72
+ height: var(--heptagonHeight);
73
+ background-color: var(--heptagonBgColor);
74
+ clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
75
+ }
76
+
77
+ .lido-octagon {
78
+ width: var(--octagonWidth);
79
+ height: var(--octagonHeight);
80
+ background-color: var(--octagonBgColor);
81
+ clip-path: polygon(25% 0%, 75% 0%, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0% 75%, 0% 25%);
82
+ }
83
+
84
+ .lido-rhombus {
85
+ width: var(--rhombusWidth);
86
+ height: var(--rhombusHeight);
87
+ background-color: var(--rhombusBgColor);
88
+ clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
89
+ }
90
+
91
+ .lido-heart {
92
+ height: var(--heartHeight);
93
+ width: var(--heartWidth);
94
+ border-image: radial-gradient(var(--heartBgColor) 69%, #0000 70%) 84.5%/50%;
95
+ clip-path: polygon(-41% 0, 50% 91%, 141% 0);
96
+ }
@@ -54,7 +54,7 @@ export class LidoShape {
54
54
  backgroundColor: this.shapeType !== 'polygon' ? this.bgColor : 'transparent', // Apply background only if not a polygon
55
55
  margin: this.margin,
56
56
  };
57
- return (h(Host, { key: '6712d974e85c5d82dabb5ed0d482ece4b18af16a', class: `lido-shape ${this.shapeType}`, value: this.value, type: this.type, "tab-index": this.tabIndex, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, minDrops: this.minDrops, maxDrops: this.maxDrops, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, "disable-speak": this.disableSpeak }));
57
+ return (h(Host, { key: '7a626d9f00854cf190c08524153086d0e9f139af', class: `lido-shape ${this.shapeType}`, value: this.value, type: this.type, "tab-index": this.tabIndex, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, minDrops: this.minDrops, maxDrops: this.maxDrops, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, "disable-speak": this.disableSpeak }));
58
58
  }
59
59
  static get is() { return "lido-shape"; }
60
60
  static get originalStyleUrls() {
@@ -117,7 +117,7 @@ export class LidoShape {
117
117
  "optional": false,
118
118
  "docs": {
119
119
  "tags": [],
120
- "text": "The height of the shape (CSS value, e.g., '100px', '50%').\nThis is ignored for polygons."
120
+ "text": "The height of the shape (CSS value, e.g., '100px', '50%').\r\nThis is ignored for polygons."
121
121
  },
122
122
  "attribute": "height",
123
123
  "reflect": false,
@@ -135,7 +135,7 @@ export class LidoShape {
135
135
  "optional": false,
136
136
  "docs": {
137
137
  "tags": [],
138
- "text": "The width of the shape (CSS value, e.g., '100px', '50%').\nThis is ignored for polygons."
138
+ "text": "The width of the shape (CSS value, e.g., '100px', '50%').\r\nThis is ignored for polygons."
139
139
  },
140
140
  "attribute": "width",
141
141
  "reflect": false,
@@ -243,7 +243,7 @@ export class LidoShape {
243
243
  "optional": false,
244
244
  "docs": {
245
245
  "tags": [],
246
- "text": "Background color of the shape (CSS color value, e.g., '#FFFFFF', 'blue').\nThis is ignored for polygons."
246
+ "text": "Background color of the shape (CSS color value, e.g., '#FFFFFF', 'blue').\r\nThis is ignored for polygons."
247
247
  },
248
248
  "attribute": "bg-color",
249
249
  "reflect": false,
@@ -459,7 +459,7 @@ export class LidoShape {
459
459
  "optional": false,
460
460
  "docs": {
461
461
  "tags": [],
462
- "text": "CSS margin value applied to each child element inside the container.\nAccepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.)."
462
+ "text": "CSS margin value applied to each child element inside the container.\r\nAccepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.)."
463
463
  },
464
464
  "attribute": "margin",
465
465
  "reflect": false,
@@ -1,4 +1,4 @@
1
- .svg-element, svg {
2
- width: 100%;
3
- height: 100%;
1
+ .svg-element, svg {
2
+ width: 100%;
3
+ height: 100%;
4
4
  }