@atlaskit/quiz-widget 2.0.2 → 2.0.5
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/CHANGELOG.md +19 -0
- package/build/tsconfig.json +10 -3
- package/dist/cjs/components/QuizWidget/index.js +9 -3
- package/dist/cjs/components/QuizWidget/styled.js +12 -110
- package/dist/cjs/components/QuizWidget/types.js +5 -1
- package/dist/cjs/styled.js +2 -10
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/QuizWidget/index.js +3 -1
- package/dist/es2019/components/QuizWidget/types.js +1 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/QuizWidget/index.js +3 -1
- package/dist/esm/components/QuizWidget/styled.js +11 -109
- package/dist/esm/components/QuizWidget/types.js +1 -0
- package/dist/esm/styled.js +2 -10
- package/dist/esm/version.json +1 -1
- package/dist/types/components/QuizWidget/index.d.ts +1 -0
- package/dist/types/components/QuizWidget/styled.d.ts +10 -10
- package/dist/types/styled.d.ts +1 -1
- package/docs/0-intro.tsx +1 -1
- package/package.json +7 -6
- package/report.api.md +33 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/quiz-widget
|
|
2
2
|
|
|
3
|
+
## 2.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade Typescript from `4.2.4` to `4.3.5`.
|
|
8
|
+
|
|
9
|
+
## 2.0.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
16
|
+
## 2.0.3
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 2.0.2
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/build/tsconfig.json
CHANGED
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
"target": "es5",
|
|
5
5
|
"paths": {}
|
|
6
6
|
},
|
|
7
|
-
"include": [
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
"include": [
|
|
8
|
+
"../src/**/*.ts",
|
|
9
|
+
"../src/**/*.tsx"
|
|
10
|
+
],
|
|
11
|
+
"exclude": [
|
|
12
|
+
"../src/**/__tests__/*",
|
|
13
|
+
"../src/**/*.test.*",
|
|
14
|
+
"../src/**/test.*"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
-
|
|
5
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
4
|
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
@@ -29,6 +29,10 @@ var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
|
29
29
|
|
|
30
30
|
var _styled = require("./styled");
|
|
31
31
|
|
|
32
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
33
|
+
|
|
34
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
35
|
+
|
|
32
36
|
var QuizWidget = function QuizWidget(props) {
|
|
33
37
|
var _useState = (0, _react.useState)(1),
|
|
34
38
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -75,7 +79,9 @@ var QuizWidget = function QuizWidget(props) {
|
|
|
75
79
|
value: answer,
|
|
76
80
|
label: answer,
|
|
77
81
|
name: answer,
|
|
78
|
-
isChecked: answer === checkedAnswer
|
|
82
|
+
isChecked: answer === checkedAnswer //error TS7006: Parameter 'e' implicitly has an 'any' type.
|
|
83
|
+
//@fixme TypeScript 4.2.4 upgrade
|
|
84
|
+
,
|
|
79
85
|
onChange: function onChange(e) {
|
|
80
86
|
return _onChange(e, currentQuestionNumber);
|
|
81
87
|
}
|
|
@@ -5,148 +5,50 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.Score = exports.QuizName = exports.QuizBlock = exports.Quiz = exports.Question = exports.NavQuiz = exports.NavAction = exports.Header = exports.Footer = exports.Answer = void 0;
|
|
9
9
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
|
|
12
12
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
var data = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: flex-end;\n max-height: 25px;\n"]);
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
return data;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
return data;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function _templateObject9() {
|
|
25
|
-
var data = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 10px;\n padding-left: 6px;\n display: flex;\n flex-direction: column;\n text-align: start;\n font-weight: 400;\n gap: 5px;\n"]);
|
|
26
|
-
|
|
27
|
-
_templateObject9 = function _templateObject9() {
|
|
28
|
-
return data;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
return data;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function _templateObject8() {
|
|
35
|
-
var data = (0, _taggedTemplateLiteral2.default)(["\n font-size: 14px;\n font-weight: 500;\n display: flex;\n align-items: center;\n"]);
|
|
36
|
-
|
|
37
|
-
_templateObject8 = function _templateObject8() {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
return data;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function _templateObject7() {
|
|
45
|
-
var data = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-content: center;\n justify-content: center;\n padding: 0 0 0 3px;\n :hover {\n color: grey;\n }\n"]);
|
|
46
|
-
|
|
47
|
-
_templateObject7 = function _templateObject7() {
|
|
48
|
-
return data;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
return data;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function _templateObject6() {
|
|
55
|
-
var data = (0, _taggedTemplateLiteral2.default)(["\n padding-left: 6px;\n margin-bottom: 10px;\n font-size: 14px;\n color: #707070;\n text-align: left;\n"]);
|
|
56
|
-
|
|
57
|
-
_templateObject6 = function _templateObject6() {
|
|
58
|
-
return data;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
return data;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function _templateObject5() {
|
|
65
|
-
var data = (0, _taggedTemplateLiteral2.default)(["\n padding-left: 8px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n max-height: 32px;\n"]);
|
|
66
|
-
|
|
67
|
-
_templateObject5 = function _templateObject5() {
|
|
68
|
-
return data;
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
return data;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function _templateObject4() {
|
|
75
|
-
var data = (0, _taggedTemplateLiteral2.default)(["\n padding-left: 15px;\n margin-bottom: 15px;\n margin-top: 0;\n min-height: 105px;\n"]);
|
|
76
|
-
|
|
77
|
-
_templateObject4 = function _templateObject4() {
|
|
78
|
-
return data;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
return data;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function _templateObject3() {
|
|
85
|
-
var data = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: start;\n flex-direction: column;\n"]);
|
|
86
|
-
|
|
87
|
-
_templateObject3 = function _templateObject3() {
|
|
88
|
-
return data;
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
return data;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function _templateObject2() {
|
|
95
|
-
var data = (0, _taggedTemplateLiteral2.default)(["\n margin: 3px 0;\n font-size: 24px;\n font-weight: 500;\n padding-left: 20px;\n"]);
|
|
96
|
-
|
|
97
|
-
_templateObject2 = function _templateObject2() {
|
|
98
|
-
return data;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
return data;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function _templateObject() {
|
|
105
|
-
var data = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n font-size: 16px;\n width: 100%;\n padding: 20px 30px 20px 0;\n border: 1px solid grey;\n border-radius: 28px;\n min-width: 300px;\n max-width: 380px;\n"]);
|
|
106
|
-
|
|
107
|
-
_templateObject = function _templateObject() {
|
|
108
|
-
return data;
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
return data;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
var Quiz = _styled.default.div(_templateObject());
|
|
16
|
+
var Quiz = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n font-size: 16px;\n width: 100%;\n padding: 20px 30px 20px 0;\n border: 1px solid grey;\n border-radius: 28px;\n min-width: 300px;\n max-width: 380px;\n"])));
|
|
115
17
|
|
|
116
18
|
exports.Quiz = Quiz;
|
|
117
19
|
|
|
118
|
-
var QuizName = _styled.default.div(_templateObject2());
|
|
20
|
+
var QuizName = _styled.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin: 3px 0;\n font-size: 24px;\n font-weight: 500;\n padding-left: 20px;\n"])));
|
|
119
21
|
|
|
120
22
|
exports.QuizName = QuizName;
|
|
121
23
|
|
|
122
|
-
var Header = _styled.default.div(_templateObject3());
|
|
24
|
+
var Header = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: start;\n flex-direction: column;\n"])));
|
|
123
25
|
|
|
124
26
|
exports.Header = Header;
|
|
125
27
|
|
|
126
|
-
var QuizBlock = _styled.default.ul(_templateObject4());
|
|
28
|
+
var QuizBlock = _styled.default.ul(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n padding-left: 15px;\n margin-bottom: 15px;\n margin-top: 0;\n min-height: 105px;\n"])));
|
|
127
29
|
|
|
128
30
|
exports.QuizBlock = QuizBlock;
|
|
129
31
|
|
|
130
|
-
var Footer = _styled.default.div(_templateObject5());
|
|
32
|
+
var Footer = _styled.default.div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n padding-left: 8px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n max-height: 32px;\n"])));
|
|
131
33
|
|
|
132
34
|
exports.Footer = Footer;
|
|
133
35
|
|
|
134
|
-
var Question = _styled.default.div(_templateObject6());
|
|
36
|
+
var Question = _styled.default.div(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n padding-left: 6px;\n margin-bottom: 10px;\n font-size: 14px;\n color: #707070;\n text-align: left;\n"])));
|
|
135
37
|
|
|
136
38
|
exports.Question = Question;
|
|
137
39
|
|
|
138
|
-
var NavQuiz = _styled.default.div(_templateObject7());
|
|
40
|
+
var NavQuiz = _styled.default.div(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-content: center;\n justify-content: center;\n padding: 0 0 0 3px;\n :hover {\n color: grey;\n }\n"])));
|
|
139
41
|
|
|
140
42
|
exports.NavQuiz = NavQuiz;
|
|
141
43
|
|
|
142
|
-
var NavAction = _styled.default.span(_templateObject8());
|
|
44
|
+
var NavAction = _styled.default.span(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 14px;\n font-weight: 500;\n display: flex;\n align-items: center;\n"])));
|
|
143
45
|
|
|
144
46
|
exports.NavAction = NavAction;
|
|
145
47
|
|
|
146
|
-
var Score = _styled.default.div(_templateObject9());
|
|
48
|
+
var Score = _styled.default.div(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: 10px;\n padding-left: 6px;\n display: flex;\n flex-direction: column;\n text-align: start;\n font-weight: 400;\n gap: 5px;\n"])));
|
|
147
49
|
|
|
148
50
|
exports.Score = Score;
|
|
149
51
|
|
|
150
|
-
var Answer = _styled.default.div(_templateObject10());
|
|
52
|
+
var Answer = _styled.default.div(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: flex-end;\n max-height: 25px;\n"])));
|
|
151
53
|
|
|
152
54
|
exports.Answer = Answer;
|
package/dist/cjs/styled.js
CHANGED
|
@@ -11,16 +11,8 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
11
11
|
|
|
12
12
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
var data = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n margin: 20px;\n"]);
|
|
14
|
+
var _templateObject;
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
return data;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
return data;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
var QuizWrapper = _styled.default.div(_templateObject());
|
|
16
|
+
var QuizWrapper = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n margin: 20px;\n"])));
|
|
25
17
|
|
|
26
18
|
exports.QuizWrapper = QuizWrapper;
|
package/dist/cjs/version.json
CHANGED
|
@@ -45,7 +45,9 @@ const QuizWidget = props => {
|
|
|
45
45
|
value: answer,
|
|
46
46
|
label: answer,
|
|
47
47
|
name: answer,
|
|
48
|
-
isChecked: answer === checkedAnswer
|
|
48
|
+
isChecked: answer === checkedAnswer //error TS7006: Parameter 'e' implicitly has an 'any' type.
|
|
49
|
+
//@fixme TypeScript 4.2.4 upgrade
|
|
50
|
+
,
|
|
49
51
|
onChange: e => onChange(e, currentQuestionNumber)
|
|
50
52
|
}), props.score && correctAnswer && /*#__PURE__*/React.createElement("span", null, answer === correctAnswer ? /*#__PURE__*/React.createElement(CheckIcon, {
|
|
51
53
|
label: "right",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/es2019/version.json
CHANGED
|
@@ -55,7 +55,9 @@ var QuizWidget = function QuizWidget(props) {
|
|
|
55
55
|
value: answer,
|
|
56
56
|
label: answer,
|
|
57
57
|
name: answer,
|
|
58
|
-
isChecked: answer === checkedAnswer
|
|
58
|
+
isChecked: answer === checkedAnswer //error TS7006: Parameter 'e' implicitly has an 'any' type.
|
|
59
|
+
//@fixme TypeScript 4.2.4 upgrade
|
|
60
|
+
,
|
|
59
61
|
onChange: function onChange(e) {
|
|
60
62
|
return _onChange(e, currentQuestionNumber);
|
|
61
63
|
}
|
|
@@ -1,113 +1,15 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
var data = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-end;\n max-height: 25px;\n"]);
|
|
5
|
-
|
|
6
|
-
_templateObject10 = function _templateObject10() {
|
|
7
|
-
return data;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
return data;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function _templateObject9() {
|
|
14
|
-
var data = _taggedTemplateLiteral(["\n margin-top: 10px;\n padding-left: 6px;\n display: flex;\n flex-direction: column;\n text-align: start;\n font-weight: 400;\n gap: 5px;\n"]);
|
|
15
|
-
|
|
16
|
-
_templateObject9 = function _templateObject9() {
|
|
17
|
-
return data;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
return data;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function _templateObject8() {
|
|
24
|
-
var data = _taggedTemplateLiteral(["\n font-size: 14px;\n font-weight: 500;\n display: flex;\n align-items: center;\n"]);
|
|
25
|
-
|
|
26
|
-
_templateObject8 = function _templateObject8() {
|
|
27
|
-
return data;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
return data;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function _templateObject7() {
|
|
34
|
-
var data = _taggedTemplateLiteral(["\n display: flex;\n align-content: center;\n justify-content: center;\n padding: 0 0 0 3px;\n :hover {\n color: grey;\n }\n"]);
|
|
35
|
-
|
|
36
|
-
_templateObject7 = function _templateObject7() {
|
|
37
|
-
return data;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
return data;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function _templateObject6() {
|
|
44
|
-
var data = _taggedTemplateLiteral(["\n padding-left: 6px;\n margin-bottom: 10px;\n font-size: 14px;\n color: #707070;\n text-align: left;\n"]);
|
|
45
|
-
|
|
46
|
-
_templateObject6 = function _templateObject6() {
|
|
47
|
-
return data;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
return data;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function _templateObject5() {
|
|
54
|
-
var data = _taggedTemplateLiteral(["\n padding-left: 8px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n max-height: 32px;\n"]);
|
|
55
|
-
|
|
56
|
-
_templateObject5 = function _templateObject5() {
|
|
57
|
-
return data;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
return data;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function _templateObject4() {
|
|
64
|
-
var data = _taggedTemplateLiteral(["\n padding-left: 15px;\n margin-bottom: 15px;\n margin-top: 0;\n min-height: 105px;\n"]);
|
|
65
|
-
|
|
66
|
-
_templateObject4 = function _templateObject4() {
|
|
67
|
-
return data;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
return data;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function _templateObject3() {
|
|
74
|
-
var data = _taggedTemplateLiteral(["\n display: flex;\n align-items: start;\n flex-direction: column;\n"]);
|
|
75
|
-
|
|
76
|
-
_templateObject3 = function _templateObject3() {
|
|
77
|
-
return data;
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
return data;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function _templateObject2() {
|
|
84
|
-
var data = _taggedTemplateLiteral(["\n margin: 3px 0;\n font-size: 24px;\n font-weight: 500;\n padding-left: 20px;\n"]);
|
|
85
|
-
|
|
86
|
-
_templateObject2 = function _templateObject2() {
|
|
87
|
-
return data;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
return data;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function _templateObject() {
|
|
94
|
-
var data = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n font-size: 16px;\n width: 100%;\n padding: 20px 30px 20px 0;\n border: 1px solid grey;\n border-radius: 28px;\n min-width: 300px;\n max-width: 380px;\n"]);
|
|
95
|
-
|
|
96
|
-
_templateObject = function _templateObject() {
|
|
97
|
-
return data;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
return data;
|
|
101
|
-
}
|
|
3
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
102
4
|
|
|
103
5
|
import styled from '@emotion/styled';
|
|
104
|
-
export var Quiz = styled.div(_templateObject());
|
|
105
|
-
export var QuizName = styled.div(_templateObject2());
|
|
106
|
-
export var Header = styled.div(_templateObject3());
|
|
107
|
-
export var QuizBlock = styled.ul(_templateObject4());
|
|
108
|
-
export var Footer = styled.div(_templateObject5());
|
|
109
|
-
export var Question = styled.div(_templateObject6());
|
|
110
|
-
export var NavQuiz = styled.div(_templateObject7());
|
|
111
|
-
export var NavAction = styled.span(_templateObject8());
|
|
112
|
-
export var Score = styled.div(_templateObject9());
|
|
113
|
-
export var Answer = styled.div(_templateObject10());
|
|
6
|
+
export var Quiz = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n font-size: 16px;\n width: 100%;\n padding: 20px 30px 20px 0;\n border: 1px solid grey;\n border-radius: 28px;\n min-width: 300px;\n max-width: 380px;\n"])));
|
|
7
|
+
export var QuizName = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin: 3px 0;\n font-size: 24px;\n font-weight: 500;\n padding-left: 20px;\n"])));
|
|
8
|
+
export var Header = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n align-items: start;\n flex-direction: column;\n"])));
|
|
9
|
+
export var QuizBlock = styled.ul(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding-left: 15px;\n margin-bottom: 15px;\n margin-top: 0;\n min-height: 105px;\n"])));
|
|
10
|
+
export var Footer = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-left: 8px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n max-height: 32px;\n"])));
|
|
11
|
+
export var Question = styled.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding-left: 6px;\n margin-bottom: 10px;\n font-size: 14px;\n color: #707070;\n text-align: left;\n"])));
|
|
12
|
+
export var NavQuiz = styled.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n align-content: center;\n justify-content: center;\n padding: 0 0 0 3px;\n :hover {\n color: grey;\n }\n"])));
|
|
13
|
+
export var NavAction = styled.span(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n font-size: 14px;\n font-weight: 500;\n display: flex;\n align-items: center;\n"])));
|
|
14
|
+
export var Score = styled.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin-top: 10px;\n padding-left: 6px;\n display: flex;\n flex-direction: column;\n text-align: start;\n font-weight: 400;\n gap: 5px;\n"])));
|
|
15
|
+
export var Answer = styled.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-end;\n max-height: 25px;\n"])));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/styled.js
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
var data = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n margin: 20px;\n"]);
|
|
5
|
-
|
|
6
|
-
_templateObject = function _templateObject() {
|
|
7
|
-
return data;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
return data;
|
|
11
|
-
}
|
|
3
|
+
var _templateObject;
|
|
12
4
|
|
|
13
5
|
import styled from '@emotion/styled';
|
|
14
|
-
export var QuizWrapper = styled.div(_templateObject());
|
|
6
|
+
export var QuizWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n margin: 20px;\n"])));
|
package/dist/esm/version.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const Quiz: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").
|
|
3
|
-
export declare const QuizName: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").
|
|
4
|
-
export declare const Header: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").
|
|
5
|
-
export declare const QuizBlock: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, Pick<import("react").
|
|
6
|
-
export declare const Footer: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").
|
|
7
|
-
export declare const Question: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").
|
|
8
|
-
export declare const NavQuiz: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").
|
|
9
|
-
export declare const NavAction: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, Pick<import("react").
|
|
10
|
-
export declare const Score: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").
|
|
11
|
-
export declare const Answer: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").
|
|
2
|
+
export declare const Quiz: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").HTMLAttributes<HTMLDivElement>>, object>;
|
|
3
|
+
export declare const QuizName: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").HTMLAttributes<HTMLDivElement>>, object>;
|
|
4
|
+
export declare const Header: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").HTMLAttributes<HTMLDivElement>>, object>;
|
|
5
|
+
export declare const QuizBlock: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, Pick<import("react").ClassAttributes<HTMLUListElement> & import("react").HTMLAttributes<HTMLUListElement>, keyof import("react").HTMLAttributes<HTMLUListElement>>, object>;
|
|
6
|
+
export declare const Footer: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").HTMLAttributes<HTMLDivElement>>, object>;
|
|
7
|
+
export declare const Question: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").HTMLAttributes<HTMLDivElement>>, object>;
|
|
8
|
+
export declare const NavQuiz: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").HTMLAttributes<HTMLDivElement>>, object>;
|
|
9
|
+
export declare const NavAction: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, Pick<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement>, keyof import("react").HTMLAttributes<HTMLSpanElement>>, object>;
|
|
10
|
+
export declare const Score: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").HTMLAttributes<HTMLDivElement>>, object>;
|
|
11
|
+
export declare const Answer: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").HTMLAttributes<HTMLDivElement>>, object>;
|
package/dist/types/styled.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const QuizWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").
|
|
2
|
+
export declare const QuizWrapper: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").HTMLAttributes<HTMLDivElement>>, object>;
|
package/docs/0-intro.tsx
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/quiz-widget",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"description": "A React component that gives a possibility to pass quizzes",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"sideEffects": false,
|
|
26
26
|
"atlaskit:src": "src/index.ts",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@atlaskit/button": "^
|
|
29
|
-
"@atlaskit/icon": "^21.
|
|
28
|
+
"@atlaskit/button": "^16.3.0",
|
|
29
|
+
"@atlaskit/icon": "^21.10.0",
|
|
30
30
|
"@atlaskit/radio": "^5.0.1",
|
|
31
31
|
"@atlaskit/spinner": "^15.0.3",
|
|
32
32
|
"@babel/runtime": "^7.0.0",
|
|
@@ -37,11 +37,12 @@
|
|
|
37
37
|
"react-dom": "^16.8.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@atlaskit/build-utils": "*",
|
|
41
40
|
"@atlaskit/docs": "*",
|
|
41
|
+
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
42
42
|
"@testing-library/react": "^8.0.1",
|
|
43
43
|
"enzyme": "^3.10.0",
|
|
44
|
-
"typescript": "3.
|
|
44
|
+
"typescript": "4.3.5",
|
|
45
45
|
"wait-for-expect": "^1.2.0"
|
|
46
|
-
}
|
|
46
|
+
},
|
|
47
|
+
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
47
48
|
}
|
package/report.api.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
## API Report File for "@atlaskit/quiz-widget".
|
|
2
|
+
|
|
3
|
+
> Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
/// <reference types="react" />
|
|
9
|
+
|
|
10
|
+
declare interface Props {
|
|
11
|
+
quizContent: QuizInterface;
|
|
12
|
+
score: number | null;
|
|
13
|
+
correctAnswers?: QuizElement | null;
|
|
14
|
+
onSubmitButtonClick?: (choosenAnswers: string[]) => void;
|
|
15
|
+
onNextButtonClick?: () => void;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare type QuizElement = {
|
|
19
|
+
[key: number]: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
declare interface QuizInterface {
|
|
23
|
+
name: string;
|
|
24
|
+
questions: QuizElement;
|
|
25
|
+
answers: {
|
|
26
|
+
[key: number]: string[];
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export declare const QuizWidget: (props: Props) => JSX.Element;
|
|
31
|
+
|
|
32
|
+
export {};
|
|
33
|
+
```
|