@zomako/elearning-components 2.0.0 → 2.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zomako/elearning-components",
3
- "version": "2.0.0",
3
+ "version": "2.0.3",
4
4
  "description": "A library of interactive and SCORM-compliant eLearning components.",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -31,6 +31,11 @@
31
31
  height: 300px;
32
32
  cursor: pointer;
33
33
  transform-style: preserve-3d;
34
+ transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
35
+ }
36
+
37
+ .flashcard--flipped {
38
+ transform: rotateY(180deg);
34
39
  }
35
40
 
36
41
  .flashcard-face {
@@ -1,5 +1,4 @@
1
1
  import React, { useState } from 'react';
2
- import { motion } from 'motion/react';
3
2
  import './FlashcardDeck.css';
4
3
 
5
4
  export interface Flashcard {
@@ -54,13 +53,10 @@ const FlashcardDeck: React.FC<FlashcardDeckProps> = ({ cards = [] }) => {
54
53
  </div>
55
54
 
56
55
  <div className="flashcard-wrapper">
57
- <motion.div
56
+ <div
58
57
  key={currentIndex}
59
- className="flashcard"
58
+ className={`flashcard ${isFlipped ? 'flashcard--flipped' : ''}`}
60
59
  onClick={handleCardClick}
61
- animate={{ rotateY: isFlipped ? 180 : 0 }}
62
- transition={{ duration: 0.6, type: 'spring', stiffness: 100 }}
63
- style={{ transformStyle: 'preserve-3d' }}
64
60
  >
65
61
  <div className="flashcard-face flashcard-front">
66
62
  <div className="flashcard-content">{currentCard.front}</div>
@@ -68,7 +64,7 @@ const FlashcardDeck: React.FC<FlashcardDeckProps> = ({ cards = [] }) => {
68
64
  <div className="flashcard-face flashcard-back">
69
65
  <div className="flashcard-content">{currentCard.back}</div>
70
66
  </div>
71
- </motion.div>
67
+ </div>
72
68
  </div>
73
69
 
74
70
  <div className="flashcard-controls">