lido-player 0.0.2-alpha-50-dev → 0.0.2-alpha-51-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 (213) 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-dc02d753.js} +150 -95
  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 +38 -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 +56 -2
  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/bubbleType/bubbleType.stories.js +42 -42
  62. package/dist/collection/stories/Templates/calculator/calculator.stories.js +48 -0
  63. package/dist/collection/stories/Templates/categorize/categorize.stories.js +37 -37
  64. package/dist/collection/stories/Templates/categorize2/categorize2.stories.js +67 -67
  65. package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +28 -22
  66. package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +13 -13
  67. package/dist/collection/stories/Templates/create-sentence/createSentence.stories.js +74 -74
  68. package/dist/collection/stories/Templates/dragAndDrop/drag-drop.stories.js +69 -69
  69. package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +37 -37
  70. package/dist/collection/stories/Templates/fillBlank/fill-blank.stories.js +282 -282
  71. package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +35 -35
  72. package/dist/collection/stories/Templates/grid/grid.stories.js +118 -118
  73. package/dist/collection/stories/Templates/gridGame/grid-game.stories.js +57 -57
  74. package/dist/collection/stories/Templates/jumpSentence/jumpSentence.stories.js +41 -41
  75. package/dist/collection/stories/Templates/letterboard/letterboard.stories.js +183 -183
  76. package/dist/collection/stories/Templates/makeSentence/make-sentence.stories.js +36 -36
  77. package/dist/collection/stories/Templates/matchBox/matchBox.stories.js +69 -69
  78. package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +54 -54
  79. package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +23 -23
  80. package/dist/collection/stories/Templates/multipleOption/mcqWithQuestionImage.stories.js +112 -112
  81. package/dist/collection/stories/Templates/multipleOption/multiple-option.stories.js +47 -47
  82. package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +32 -28
  83. package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +56 -54
  84. package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +56 -45
  85. package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +38 -38
  86. package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +131 -127
  87. package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +53 -49
  88. package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +44 -40
  89. package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +96 -96
  90. package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +90 -90
  91. package/dist/collection/stories/Templates/phonic-tractor/phonic-tractor.stories.js +47 -45
  92. package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +20 -20
  93. package/dist/collection/stories/Templates/puzzleGame/puzzleGame.stories.js +17 -17
  94. package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +62 -58
  95. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracy.stories.js +50 -50
  96. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWithText.stories.js +36 -36
  97. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWord.stories.js +43 -43
  98. package/dist/collection/stories/Templates/reorder/reorder.stories.js +63 -63
  99. package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +52 -48
  100. package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +65 -61
  101. package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +62 -58
  102. package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +111 -107
  103. package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +46 -46
  104. package/dist/collection/stories/Templates/spellDoor/spellDoor.stories.js +41 -41
  105. package/dist/collection/stories/Templates/storyTale/storyTale.stories.js +39 -39
  106. package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +51 -47
  107. package/dist/collection/stories/Templates/total/total.stories.js +27 -27
  108. package/dist/collection/stories/Templates/writeCard/writeCard.stories.js +35 -31
  109. package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +62 -58
  110. package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +44 -40
  111. package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +36 -32
  112. package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +37 -33
  113. package/dist/collection/stories/components/flash-card.stories.js +48 -48
  114. package/dist/collection/stories/components/keyboard.stories.js +10 -10
  115. package/dist/collection/stories/components/slider.stories.js +4 -4
  116. package/dist/collection/stories/components/trace.stories.js +5 -5
  117. package/dist/collection/utils/audioPlayer.js +43 -6
  118. package/dist/collection/utils/constants.js +1 -0
  119. package/dist/collection/utils/i18n.js +36 -0
  120. package/dist/collection/utils/utils.js +36 -29
  121. package/dist/collection/utils/utilsHandlers/clickHandler.js +5 -1
  122. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +17 -9
  123. package/dist/collection/utils/utilsHandlers/highlightHandler.js +54 -54
  124. package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +2 -2
  125. package/dist/collection/utils/utilsHandlers/lidoCalculatorHandler.js +9 -9
  126. package/dist/collection/utils/utilsHandlers/sortHandler.js +10 -10
  127. package/dist/components/index.js +1 -1
  128. package/dist/components/lido-avatar.js +1 -1
  129. package/dist/components/lido-balance.js +1 -1
  130. package/dist/components/lido-calculator.js +1 -1
  131. package/dist/components/lido-canvas.d.ts +11 -0
  132. package/dist/components/lido-canvas.js +6 -0
  133. package/dist/components/lido-cell.js +1 -1
  134. package/dist/components/lido-col.js +1 -1
  135. package/dist/components/lido-container.js +1 -1
  136. package/dist/components/lido-flash-card.js +1 -1
  137. package/dist/components/lido-float.js +1 -1
  138. package/dist/components/lido-home.js +1 -1
  139. package/dist/components/lido-image.js +1 -1
  140. package/dist/components/lido-keyboard.js +1 -1
  141. package/dist/components/lido-math-matrix.js +1 -1
  142. package/dist/components/lido-pos.js +1 -1
  143. package/dist/components/lido-random.js +1 -1
  144. package/dist/components/lido-root.js +49 -25
  145. package/dist/components/lido-row.js +1 -1
  146. package/dist/components/lido-shape.js +1 -1
  147. package/dist/components/lido-slide-fill.js +1 -1
  148. package/dist/components/lido-text.js +1 -1
  149. package/dist/components/lido-trace.js +1 -1
  150. package/dist/components/lido-wrap.js +1 -1
  151. package/dist/components/{p-73e31a86.js → p-04e904b5.js} +8 -8
  152. package/dist/components/p-0fbeb3a1.js +2700 -0
  153. package/dist/components/{p-1fbdb431.js → p-12432f23.js} +2 -2
  154. package/dist/components/p-1c84cf65.js +123 -0
  155. package/dist/components/{p-74849cdd.js → p-1f3c2783.js} +4 -4
  156. package/dist/components/{p-e4e42677.js → p-4fd6b588.js} +2 -2
  157. package/dist/components/{p-e36ddcc1.js → p-56c8f3da.js} +14 -11
  158. package/dist/components/{p-cbac3cbc.js → p-62d2a5b3.js} +2 -2
  159. package/dist/components/{p-44808985.js → p-6ba0f1af.js} +7 -7
  160. package/dist/components/{p-52844fa4.js → p-6be6c5eb.js} +2 -2
  161. package/dist/components/{p-08d0deab.js → p-74b90a9c.js} +9 -3
  162. package/dist/components/{p-d37ab4dc.js → p-988477ad.js} +2 -2
  163. package/dist/components/{p-7f7e5672.js → p-a8724f06.js} +2 -2
  164. package/dist/components/{p-3f406017.js → p-b7efadad.js} +2 -2
  165. package/dist/components/{p-15971ede.js → p-b89371ac.js} +1 -1
  166. package/dist/components/{p-904711c8.js → p-bb907e43.js} +2 -2
  167. package/dist/components/{p-afbc196f.js → p-bef96764.js} +3 -2
  168. package/dist/components/{p-322acda6.js → p-c8815e84.js} +67 -31
  169. package/dist/components/{p-835b973d.js → p-caa05d1e.js} +2 -2
  170. package/dist/components/{p-bed94c37.js → p-d0131159.js} +187 -105
  171. package/dist/components/{p-29bdd953.js → p-d3f7d561.js} +2 -2
  172. package/dist/components/{p-90465904.js → p-d7693f47.js} +2 -2
  173. package/dist/components/{p-9be56729.js → p-e9548986.js} +46 -2
  174. package/dist/esm/{index-170e58c7.js → index-37c2ad2d.js} +48 -14
  175. package/dist/esm/index.js +2 -2
  176. package/dist/esm/{lido-avatar_21.entry.js → lido-avatar_22.entry.js} +3043 -163
  177. package/dist/esm/lido-player.js +3 -3
  178. package/dist/esm/loader.js +3 -3
  179. package/dist/esm/{utils-5df09162.js → utils-b5eb2360.js} +150 -95
  180. package/dist/lido-player/index.esm.js +1 -1
  181. package/dist/lido-player/lido-player.esm.js +1 -1
  182. package/dist/lido-player/p-9a9d5339.js +2 -0
  183. package/dist/lido-player/{p-7556e652.js → p-9fd87d44.js} +2 -2
  184. package/dist/lido-player/p-e1a9c26f.entry.js +1 -0
  185. package/dist/types/components/canvas/lido-canvas.d.ts +27 -0
  186. package/dist/types/components/container/lido-container.d.ts +6 -0
  187. package/dist/types/components/home/lido-home.d.ts +8 -0
  188. package/dist/types/components/mathMatrix/lido-math-matrix.d.ts +3 -0
  189. package/dist/types/components/root/lido-root.d.ts +5 -0
  190. package/dist/types/components.d.ts +71 -0
  191. package/dist/types/stories/Templates/RocketGame/rocketGame.stories.d.ts +1 -0
  192. package/dist/types/stories/Templates/calculator/calculator.stories.d.ts +4 -0
  193. package/dist/types/stories/Templates/multiplyBeeds/multiplyBeeds.stories.d.ts +1 -0
  194. package/dist/types/stories/Templates/openwindow/openwindow.stories.d.ts +1 -0
  195. package/dist/types/stories/Templates/openwindow/openwindow2.stories.d.ts +1 -0
  196. package/dist/types/stories/Templates/questionBoard/questionBoard.stories.d.ts +1 -0
  197. package/dist/types/stories/Templates/sequenceBox/sequenceBox1.stories.d.ts +1 -0
  198. package/dist/types/stories/Templates/sequenceBox/sequenceBox2.stories.d.ts +1 -0
  199. package/dist/types/stories/Templates/shapePair/shape-pair.stories.d.ts +1 -1
  200. package/dist/types/stories/Templates/sumTogether/sumTogether.stories.d.ts +1 -0
  201. package/dist/types/stories/Templates/writeCard/writeCard.stories.d.ts +1 -0
  202. package/dist/types/stories/Templates/writeLetter/writeLetter.stories.d.ts +1 -0
  203. package/dist/types/stories/Templates/writeNumber/writeNumber.stories.d.ts +1 -0
  204. package/dist/types/stories/Templates/writeWord/writeWord.stories.d.ts +1 -0
  205. package/dist/types/types/json.d.ts +4 -0
  206. package/dist/types/utils/audioPlayer.d.ts +2 -0
  207. package/dist/types/utils/constants.d.ts +1 -0
  208. package/dist/types/utils/i18n.d.ts +5 -0
  209. package/dist/types/utils/utils.d.ts +1 -0
  210. package/package.json +71 -69
  211. package/readme.md +113 -113
  212. package/dist/lido-player/p-137c99ce.js +0 -2
  213. package/dist/lido-player/p-eb956325.entry.js +0 -1
@@ -1,19 +1,19 @@
1
- .lido-col {
2
- /* position: absolute; */
3
- top: var(--y, 0);
4
- left: var(--x, 0);
5
- height: var(--height, 100%);
6
- width: var(--width, 100%);
7
- background-color: var(--bgColor, #eeeeee);
8
- /* position: relative; */
9
- padding: 15px;
10
- border-radius: 10px;
11
- display: flex;
12
- justify-content: space-around;
13
- flex-direction: column;
14
- align-items: center;
15
- }
16
-
17
- .lido-col > * {
18
- /* position: relative; */
19
- }
1
+ .lido-col {
2
+ /* position: absolute; */
3
+ top: var(--y, 0);
4
+ left: var(--x, 0);
5
+ height: var(--height, 100%);
6
+ width: var(--width, 100%);
7
+ background-color: var(--bgColor, #eeeeee);
8
+ /* position: relative; */
9
+ padding: 15px;
10
+ border-radius: 10px;
11
+ display: flex;
12
+ justify-content: space-around;
13
+ flex-direction: column;
14
+ align-items: center;
15
+ }
16
+
17
+ .lido-col > * {
18
+ /* position: relative; */
19
+ }
@@ -84,7 +84,7 @@ export class LidoCol {
84
84
  };
85
85
  }
86
86
  render() {
87
- return (h(Host, { key: '1cf21bb1e817c9078213312aa7165423eaf54ea7', id: this.id, class: "lido-col", type: this.type, "tab-index": this.tabIndex, value: this.value, style: this.style, minDrops: this.minDrops, maxDrops: this.maxDrops, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, h("slot", { key: 'c3bc168ccccacf1425b5d93853bc27ab2962436f' })));
87
+ return (h(Host, { key: 'fe37cc1654101a3d347e2cef52872467ae078139', id: this.id, class: "lido-col", type: this.type, "tab-index": this.tabIndex, value: this.value, style: this.style, minDrops: this.minDrops, maxDrops: this.maxDrops, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, h("slot", { key: 'b27f20f62c30398c343d7aa472a0a211af5eed0e' })));
88
88
  }
89
89
  static get is() { return "lido-col"; }
90
90
  static get originalStyleUrls() {
@@ -435,7 +435,7 @@ export class LidoCol {
435
435
  "optional": false,
436
436
  "docs": {
437
437
  "tags": [],
438
- "text": "The number of child elements that should be displayed inside the row.\nThis value is dynamically adjusted based on `minLength` and `maxLength`."
438
+ "text": "The number of child elements that should be displayed inside the row.\r\nThis value is dynamically adjusted based on `minLength` and `maxLength`."
439
439
  },
440
440
  "attribute": "child-elements-length",
441
441
  "reflect": false
@@ -452,7 +452,7 @@ export class LidoCol {
452
452
  "optional": false,
453
453
  "docs": {
454
454
  "tags": [],
455
- "text": "The minimum number of child elements that must be displayed inside the row.\nIf `childElementsLength` is less than this value, additional elements may be shown to meet this minimum."
455
+ "text": "The minimum number of child elements that must be displayed inside the row.\r\nIf `childElementsLength` is less than this value, additional elements may be shown to meet this minimum."
456
456
  },
457
457
  "attribute": "min-length",
458
458
  "reflect": false
@@ -469,7 +469,7 @@ export class LidoCol {
469
469
  "optional": false,
470
470
  "docs": {
471
471
  "tags": [],
472
- "text": "The maximum number of child elements that can be displayed inside the row.\nIf `childElementsLength` exceeds this value, excess elements will be hidden."
472
+ "text": "The maximum number of child elements that can be displayed inside the row.\r\nIf `childElementsLength` exceeds this value, excess elements will be hidden."
473
473
  },
474
474
  "attribute": "max-length",
475
475
  "reflect": false
@@ -520,7 +520,7 @@ export class LidoCol {
520
520
  "optional": true,
521
521
  "docs": {
522
522
  "tags": [],
523
- "text": "Applies a CSS box-shadow to the component.\nAccepts any valid CSS box-shadow value.\nExample: \"0px 4px 10px rgba(0, 0, 0, 0.1)\""
523
+ "text": "Applies a CSS box-shadow to the component.\r\nAccepts any valid CSS box-shadow value.\r\nExample: \"0px 4px 10px rgba(0, 0, 0, 0.1)\""
524
524
  },
525
525
  "attribute": "box-shadow",
526
526
  "reflect": false
@@ -573,7 +573,7 @@ export class LidoCol {
573
573
  "optional": false,
574
574
  "docs": {
575
575
  "tags": [],
576
- "text": "CSS margin value applied to each child element inside the container.\nAccepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.)."
576
+ "text": "CSS margin value applied to each child element inside the container.\r\nAccepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.)."
577
577
  },
578
578
  "attribute": "margin",
579
579
  "reflect": false,
@@ -1,10 +1,10 @@
1
- .lido-container {
2
- position: relative;
3
- height: 100%;
4
- width: 100%;
5
- background-color: var(--bgColor, transparent);
6
- display: flex;
7
- flex-direction: column;
8
- justify-content: center;
9
- align-items: center;
10
- }
1
+ .lido-container {
2
+ position: relative;
3
+ height: 100%;
4
+ width: 100%;
5
+ background-color: var(--bgColor, transparent);
6
+ display: flex;
7
+ flex-direction: column;
8
+ justify-content: center;
9
+ align-items: center;
10
+ }
@@ -1,5 +1,6 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  import { convertUrlToRelative, initEventsForElement, calculateScale } from "../../utils/utils";
3
+ import i18next from "../../utils/i18n";
3
4
  /**
4
5
  * @component LidoContainer
5
6
  *
@@ -9,6 +10,7 @@ import { convertUrlToRelative, initEventsForElement, calculateScale } from "../.
9
10
  */
10
11
  export class LidoContainer {
11
12
  constructor() {
13
+ this.locale = '';
12
14
  this.showDropBorder = true;
13
15
  this.appendToDropOnCompletion = false;
14
16
  this.id = '';
@@ -47,6 +49,31 @@ export class LidoContainer {
47
49
  this.delayVisible = '';
48
50
  this.disableSpeak = false;
49
51
  }
52
+ languageChanged(newLang) {
53
+ const langToApply = newLang || this.resolveLanguage();
54
+ this.updateChildTextLanguage(langToApply);
55
+ }
56
+ componentWillLoad() {
57
+ const langToApply = this.resolveLanguage();
58
+ this.updateChildTextLanguage(langToApply);
59
+ }
60
+ resolveLanguage() {
61
+ var _a, _b;
62
+ const rootEl = this.el.closest('lido-root');
63
+ const rootLang = (rootEl === null || rootEl === void 0 ? void 0 : rootEl.locale) || '';
64
+ if (rootLang === null || rootLang === void 0 ? void 0 : rootLang.trim())
65
+ return rootLang;
66
+ const homeEl = this.el.closest('lido-home');
67
+ const homeLang = (homeEl === null || homeEl === void 0 ? void 0 : homeEl.locale) || '';
68
+ if (homeLang === null || homeLang === void 0 ? void 0 : homeLang.trim())
69
+ return homeLang;
70
+ if ((_a = this.locale) === null || _a === void 0 ? void 0 : _a.trim())
71
+ return this.locale;
72
+ const xmlLang = this.el.getAttribute('locale');
73
+ if (xmlLang === null || xmlLang === void 0 ? void 0 : xmlLang.trim())
74
+ return xmlLang;
75
+ return (_b = this.el.textContent) === null || _b === void 0 ? void 0 : _b.trim();
76
+ }
50
77
  convertToPixels(height, parentElement = document.body) {
51
78
  if (!height)
52
79
  return 0; // Handle empty or invalid input
@@ -88,6 +115,15 @@ export class LidoContainer {
88
115
  this.el.style.width = '1600px';
89
116
  }
90
117
  }
118
+ updateChildTextLanguage(lang) {
119
+ const appliedLang = lang || i18next.language || 'en';
120
+ i18next.changeLanguage(appliedLang);
121
+ const texts = this.el.querySelectorAll('lido-text');
122
+ texts.forEach((textEl) => {
123
+ textEl.locale = appliedLang;
124
+ textEl.dispatchEvent(new CustomEvent('languageChanged', { bubbles: true }));
125
+ });
126
+ }
91
127
  /**
92
128
  * Lifecycle hook that runs after the component is loaded.
93
129
  * - It scales the container.
@@ -109,6 +145,8 @@ export class LidoContainer {
109
145
  styleElement.innerHTML = this.customStyle;
110
146
  document.head.appendChild(styleElement);
111
147
  }
148
+ const langToApply = this.resolveLanguage();
149
+ this.updateChildTextLanguage(langToApply);
112
150
  }
113
151
  disconnectedCallback() {
114
152
  window.removeEventListener('resize', () => this.scaleContainer(this.el));
@@ -128,7 +166,7 @@ export class LidoContainer {
128
166
  userSelect: 'none', // Prevent any field selection
129
167
  };
130
168
  console.log('🚀 ~ LidoContainer ~ canplay:', this.canplay);
131
- return (h(Host, { key: '1f61c4443b96466e2802b5550e8d999319b41ce7', id: "lido-container", "tab-index": 0, class: "lido-container", objective: this.objective, baseUrl: this.baseUrl, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, "show-check": `${this.showCheck}`, "is-continue-on-correct": `${this.isContinueOnCorrect}`, "is-allow-only-correct": `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}`, appendToDropOnCompletion: `${this.appendToDropOnCompletion}`, "show-prev-button": `${this.showPrevButton}`, "show-next-button": `${this.showNextButton}`, "show-drop-border": `${this.showDropBorder}`, "bg-image": this.bgImage, "exit-button-url": this.exitButtonUrl, "prev-button-url": this.prevButtonUrl, "next-button-url": this.nextButtonUrl, "speaker-button-url": this.speakerButtonUrl, "disable-speak": this.disableSpeak }, h("slot", { key: '2df61e731d3a9de3fd9cdb23f47035ee2e35c30a' })));
169
+ return (h(Host, { key: '5d7f2f02c5a231a18897942ea0d2f3a200efa502', id: "lido-container", locale: this.locale, "tab-index": 0, class: "lido-container", objective: this.objective, baseUrl: this.baseUrl, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, "show-check": `${this.showCheck}`, "is-continue-on-correct": `${this.isContinueOnCorrect}`, "is-allow-only-correct": `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}`, appendToDropOnCompletion: `${this.appendToDropOnCompletion}`, "show-prev-button": `${this.showPrevButton}`, "show-next-button": `${this.showNextButton}`, "show-drop-border": `${this.showDropBorder}`, "bg-image": this.bgImage, "exit-button-url": this.exitButtonUrl, "prev-button-url": this.prevButtonUrl, "next-button-url": this.nextButtonUrl, "speaker-button-url": this.speakerButtonUrl, "disable-speak": this.disableSpeak }, h("slot", { key: 'b82aff47d621fc4f9d6abe5b7add974853f69219' })));
132
170
  }
133
171
  static get is() { return "lido-container"; }
134
172
  static get originalStyleUrls() {
@@ -143,6 +181,24 @@ export class LidoContainer {
143
181
  }
144
182
  static get properties() {
145
183
  return {
184
+ "locale": {
185
+ "type": "string",
186
+ "mutable": false,
187
+ "complexType": {
188
+ "original": "string",
189
+ "resolved": "string",
190
+ "references": {}
191
+ },
192
+ "required": false,
193
+ "optional": false,
194
+ "docs": {
195
+ "tags": [],
196
+ "text": "Language to apply to all texts"
197
+ },
198
+ "attribute": "locale",
199
+ "reflect": false,
200
+ "defaultValue": "''"
201
+ },
146
202
  "showDropBorder": {
147
203
  "type": "boolean",
148
204
  "mutable": false,
@@ -227,7 +283,7 @@ export class LidoContainer {
227
283
  "optional": false,
228
284
  "docs": {
229
285
  "tags": [],
230
- "text": "Custom CSS styles to be applied to the container.\nAllows for dynamic styling through inline styles or class names."
286
+ "text": "Custom CSS styles to be applied to the container.\r\nAllows for dynamic styling through inline styles or class names."
231
287
  },
232
288
  "attribute": "custom-style",
233
289
  "reflect": false,
@@ -623,7 +679,7 @@ export class LidoContainer {
623
679
  "optional": false,
624
680
  "docs": {
625
681
  "tags": [],
626
- "text": "Determines if the activity should proceed automatically only after a correct response.\nAcceptable values: \"true\" or \"false\". Defaults to \"false\"."
682
+ "text": "Determines if the activity should proceed automatically only after a correct response.\r\nAcceptable values: \"true\" or \"false\". Defaults to \"false\"."
627
683
  },
628
684
  "attribute": "is-allow-only-correct",
629
685
  "reflect": false,
@@ -659,7 +715,7 @@ export class LidoContainer {
659
715
  "optional": false,
660
716
  "docs": {
661
717
  "tags": [],
662
- "text": "CSS margin value applied to each child element inside the container.\nAccepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.)."
718
+ "text": "CSS margin value applied to each child element inside the container.\r\nAccepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.)."
663
719
  },
664
720
  "attribute": "margin",
665
721
  "reflect": false,
@@ -677,7 +733,7 @@ export class LidoContainer {
677
733
  "optional": false,
678
734
  "docs": {
679
735
  "tags": [],
680
- "text": "Custom URL for the Exit button icon.\nFalls back to the default icon if not provided or invalid."
736
+ "text": "Custom URL for the Exit button icon.\r\nFalls back to the default icon if not provided or invalid."
681
737
  },
682
738
  "attribute": "exit-button-url",
683
739
  "reflect": false
@@ -694,7 +750,7 @@ export class LidoContainer {
694
750
  "optional": false,
695
751
  "docs": {
696
752
  "tags": [],
697
- "text": "Custom URL for the Previous button icon.\nFalls back to the default icon if not provided or invalid."
753
+ "text": "Custom URL for the Previous button icon.\r\nFalls back to the default icon if not provided or invalid."
698
754
  },
699
755
  "attribute": "prev-button-url",
700
756
  "reflect": false
@@ -711,7 +767,7 @@ export class LidoContainer {
711
767
  "optional": false,
712
768
  "docs": {
713
769
  "tags": [],
714
- "text": "Custom URL for the Next button icon.\nFalls back to the default icon if not provided or invalid."
770
+ "text": "Custom URL for the Next button icon.\r\nFalls back to the default icon if not provided or invalid."
715
771
  },
716
772
  "attribute": "next-button-url",
717
773
  "reflect": false
@@ -728,7 +784,7 @@ export class LidoContainer {
728
784
  "optional": false,
729
785
  "docs": {
730
786
  "tags": [],
731
- "text": "Custom URL for the Speaker button icon.\nFalls back to the default icon if not provided or invalid."
787
+ "text": "Custom URL for the Speaker button icon.\r\nFalls back to the default icon if not provided or invalid."
732
788
  },
733
789
  "attribute": "speaker-button-url",
734
790
  "reflect": false
@@ -808,4 +864,10 @@ export class LidoContainer {
808
864
  };
809
865
  }
810
866
  static get elementRef() { return "el"; }
867
+ static get watchers() {
868
+ return [{
869
+ "propName": "locale",
870
+ "methodName": "languageChanged"
871
+ }];
872
+ }
811
873
  }
@@ -1,28 +1,28 @@
1
-
2
-
3
- .card {
4
- position: relative;
5
- width: 100%;
6
- height: 100%;
7
- transform-style: preserve-3d;
8
- transition: transform 0.6s ease;
9
- cursor: pointer;
10
- }
11
-
12
- .card.flipped {
13
- transform: rotateY(180deg);
14
- }
15
-
16
- .card-face {
17
- position: absolute;
18
- width: 100%;
19
- height: 100%;
20
- backface-visibility: hidden;
21
- display: flex;
22
- align-items: center;
23
- justify-content: center;
24
- }
25
-
26
- .card-back {
27
- transform: rotateY(180deg);
28
- }
1
+
2
+
3
+ .card {
4
+ position: relative;
5
+ width: 100%;
6
+ height: 100%;
7
+ transform-style: preserve-3d;
8
+ transition: transform 0.6s ease;
9
+ cursor: pointer;
10
+ }
11
+
12
+ .card.flipped {
13
+ transform: rotateY(180deg);
14
+ }
15
+
16
+ .card-face {
17
+ position: absolute;
18
+ width: 100%;
19
+ height: 100%;
20
+ backface-visibility: hidden;
21
+ display: flex;
22
+ align-items: center;
23
+ justify-content: center;
24
+ }
25
+
26
+ .card-back {
27
+ transform: rotateY(180deg);
28
+ }
@@ -76,7 +76,7 @@ export class LidoFlash {
76
76
  }
77
77
  /* ---------- Render ---------- */
78
78
  render() {
79
- return (h(Host, { key: 'df221d302a1e91eb995af2f70aa69957cb769ffe', value: this.value, "tab-index": this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, type: this.type, onClick: this.handleFlip, "disable-speak": this.disableSpeak }, h("div", { key: 'd799a3525d9af4ba98d7750a3a76a313dd9cdd76', class: `card ${this.flipped ? 'flipped' : ''}` }, h("div", { key: 'fb7734ca5648e2cf8a91d551b383a5c2c3eae255', class: "card-face card-front" }, this.front != null ? this.front : h("slot", { name: "front" })), h("div", { key: '6071da403b17a079f80f0c5dd576dac7b5a2c357', class: "card-face card-back" }, this.back != null ? this.back : h("slot", { name: "back" })))));
79
+ return (h(Host, { key: '0db825b0f188f46db6699e3d470296d7302a72fc', value: this.value, "tab-index": this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, type: this.type, onClick: this.handleFlip, "disable-speak": this.disableSpeak }, h("div", { key: '78432618dca6729d9a5fa75f9ee162178ec6b8e2', class: `card ${this.flipped ? 'flipped' : ''}` }, h("div", { key: 'c06cab1f3d256a2fcfd44fbeb9e04c47bbe6ba63', class: "card-face card-front" }, this.front != null ? this.front : h("slot", { name: "front" })), h("div", { key: '804ffc2d68292dc9dcb800bcc49a0698092cea43', class: "card-face card-back" }, this.back != null ? this.back : h("slot", { name: "back" })))));
80
80
  }
81
81
  static get is() { return "lido-flash-card"; }
82
82
  static get originalStyleUrls() {
@@ -409,7 +409,7 @@ export class LidoFlash {
409
409
  "optional": false,
410
410
  "docs": {
411
411
  "tags": [],
412
- "text": "The number of child elements that should be displayed inside the row.\nThis value is dynamically adjusted based on `minLength` and `maxLength`."
412
+ "text": "The number of child elements that should be displayed inside the row.\r\nThis value is dynamically adjusted based on `minLength` and `maxLength`."
413
413
  },
414
414
  "attribute": "direction",
415
415
  "reflect": false
@@ -477,7 +477,7 @@ export class LidoFlash {
477
477
  "optional": false,
478
478
  "docs": {
479
479
  "tags": [],
480
- "text": "Whether the card is flipped (back side visible).\n`mutable` lets the component toggle itself on click;\n`reflect` keeps the `<lido-flash-card flipped>` attribute in sync."
480
+ "text": "Whether the card is flipped (back side visible).\r\n`mutable` lets the component toggle itself on click;\r\n`reflect` keeps the `<lido-flash-card flipped>` attribute in sync."
481
481
  },
482
482
  "attribute": "flipped",
483
483
  "reflect": true,
@@ -495,7 +495,7 @@ export class LidoFlash {
495
495
  "optional": false,
496
496
  "docs": {
497
497
  "tags": [],
498
- "text": "CSS margin value applied to each child element inside the container.\nAccepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.)."
498
+ "text": "CSS margin value applied to each child element inside the container.\r\nAccepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.)."
499
499
  },
500
500
  "attribute": "margin",
501
501
  "reflect": false,
@@ -1,30 +1,30 @@
1
- .lido-float {
2
- position: relative;
3
- }
4
-
5
- .lido-float > * {
6
- position: absolute;
7
- cursor: pointer;
8
- }
9
-
10
- @keyframes float-up {
11
- from {
12
- top: var(--el-top);
13
- }
14
- to {
15
- top: -500px;
16
- }
17
- }
18
-
19
- #removeShadow {
20
- box-shadow: unset !important;
21
- }
22
-
23
- @keyframes float-lr {
24
- from {
25
- right: var(--el-left);
26
- }
27
- to {
28
- right: -500px;
29
- }
30
- }
1
+ .lido-float {
2
+ position: relative;
3
+ }
4
+
5
+ .lido-float > * {
6
+ position: absolute;
7
+ cursor: pointer;
8
+ }
9
+
10
+ @keyframes float-up {
11
+ from {
12
+ top: var(--el-top);
13
+ }
14
+ to {
15
+ top: -500px;
16
+ }
17
+ }
18
+
19
+ #removeShadow {
20
+ box-shadow: unset !important;
21
+ }
22
+
23
+ @keyframes float-lr {
24
+ from {
25
+ right: var(--el-left);
26
+ }
27
+ to {
28
+ right: -500px;
29
+ }
30
+ }
@@ -57,7 +57,7 @@ export class LidoFloat {
57
57
  };
58
58
  }
59
59
  render() {
60
- return (h(Host, { key: 'b4c271689b52272251d5623e53b67ef78389c012', class: "lido-float", "float-direction": this.floatDirection, id: this.id, "tab-index": this.tabIndex, style: this.style, onEntry: this.onEntry }, h("slot", { key: '852149328b2a8e85e84fdf9e2a4a64bb2ec8ad3a' })));
60
+ return (h(Host, { key: 'e8bc37c1220b708872748bd49c2d7fc448bdd01c', class: "lido-float", "float-direction": this.floatDirection, id: this.id, "tab-index": this.tabIndex, style: this.style, onEntry: this.onEntry }, h("slot", { key: '991afa719c6fc35f489fae30f77bad81cf2b4c3e' })));
61
61
  }
62
62
  static get is() { return "lido-float"; }
63
63
  static get originalStyleUrls() {
@@ -278,7 +278,7 @@ export class LidoFloat {
278
278
  "optional": false,
279
279
  "docs": {
280
280
  "tags": [],
281
- "text": "Direction of the float element's movement (e.g., 'leftToRight', 'bottomToTop').\nThis can be used to control the animation or positioning of the float elements."
281
+ "text": "Direction of the float element's movement (e.g., 'leftToRight', 'bottomToTop').\r\nThis can be used to control the animation or positioning of the float elements."
282
282
  },
283
283
  "attribute": "float-direction",
284
284
  "reflect": false,