@atlaskit/quiz-widget 2.1.9 → 2.1.11
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 +56 -15
- package/dist/cjs/components/QuizWidget/styled.js +98 -12
- package/dist/cjs/styled.js +8 -3
- package/dist/es2019/components/QuizWidget/styled.js +96 -70
- package/dist/es2019/styled.js +7 -5
- package/dist/esm/components/QuizWidget/styled.js +97 -12
- package/dist/esm/styled.js +7 -3
- package/dist/types/components/QuizWidget/index.d.ts +1 -1
- package/dist/types-ts4.5/components/QuizWidget/index.d.ts +1 -1
- package/docs/0-intro.tsx +28 -26
- package/package.json +53 -55
- package/report.api.md +23 -22
package/CHANGELOG.md
CHANGED
|
@@ -1,22 +1,42 @@
|
|
|
1
1
|
# @atlaskit/quiz-widget
|
|
2
2
|
|
|
3
|
+
## 2.1.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 2.1.10
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#92007](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/92007)
|
|
14
|
+
[`85525725cb0d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/85525725cb0d) -
|
|
15
|
+
Migrated to the new button component
|
|
16
|
+
|
|
3
17
|
## 2.1.9
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
6
20
|
|
|
7
|
-
- [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
|
|
21
|
+
- [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
|
|
22
|
+
[`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
|
|
23
|
+
Upgrade Typescript from `4.9.5` to `5.4.2`
|
|
8
24
|
|
|
9
25
|
## 2.1.8
|
|
10
26
|
|
|
11
27
|
### Patch Changes
|
|
12
28
|
|
|
13
|
-
- [#80509](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80509)
|
|
29
|
+
- [#80509](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80509)
|
|
30
|
+
[`fcf7481f594f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/fcf7481f594f) -
|
|
31
|
+
Upgrade dependency of `@emotion/styled` to version 11
|
|
14
32
|
|
|
15
33
|
## 2.1.7
|
|
16
34
|
|
|
17
35
|
### Patch Changes
|
|
18
36
|
|
|
19
|
-
- [#61323](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61323)
|
|
37
|
+
- [#61323](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/61323)
|
|
38
|
+
[`e9e3532437e8`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e9e3532437e8) -
|
|
39
|
+
Converted spacing values to corresponding space tokens
|
|
20
40
|
|
|
21
41
|
## 2.1.6
|
|
22
42
|
|
|
@@ -40,25 +60,33 @@
|
|
|
40
60
|
|
|
41
61
|
### Patch Changes
|
|
42
62
|
|
|
43
|
-
- [#38162](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38162)
|
|
63
|
+
- [#38162](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/38162)
|
|
64
|
+
[`fd6bb9c9184`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fd6bb9c9184) - Delete
|
|
65
|
+
version.json
|
|
44
66
|
|
|
45
67
|
## 2.1.2
|
|
46
68
|
|
|
47
69
|
### Patch Changes
|
|
48
70
|
|
|
49
|
-
- [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793)
|
|
71
|
+
- [#33793](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33793)
|
|
72
|
+
[`9d00501a414`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9d00501a414) - Ensure
|
|
73
|
+
legacy types are published for TS 4.5-4.8
|
|
50
74
|
|
|
51
75
|
## 2.1.1
|
|
52
76
|
|
|
53
77
|
### Patch Changes
|
|
54
78
|
|
|
55
|
-
- [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649)
|
|
79
|
+
- [#33649](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33649)
|
|
80
|
+
[`41fae2c6f68`](https://bitbucket.org/atlassian/atlassian-frontend/commits/41fae2c6f68) - Upgrade
|
|
81
|
+
Typescript from `4.5.5` to `4.9.5`
|
|
56
82
|
|
|
57
83
|
## 2.1.0
|
|
58
84
|
|
|
59
85
|
### Minor Changes
|
|
60
86
|
|
|
61
|
-
- [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258)
|
|
87
|
+
- [#33258](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/33258)
|
|
88
|
+
[`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip
|
|
89
|
+
minor dependency bump
|
|
62
90
|
|
|
63
91
|
### Patch Changes
|
|
64
92
|
|
|
@@ -68,19 +96,25 @@
|
|
|
68
96
|
|
|
69
97
|
### Patch Changes
|
|
70
98
|
|
|
71
|
-
- [#24874](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24874)
|
|
99
|
+
- [#24874](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24874)
|
|
100
|
+
[`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade
|
|
101
|
+
Typescript from `4.3.5` to `4.5.5`
|
|
72
102
|
|
|
73
103
|
## 2.0.5
|
|
74
104
|
|
|
75
105
|
### Patch Changes
|
|
76
106
|
|
|
77
|
-
- [#24492](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24492)
|
|
107
|
+
- [#24492](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/24492)
|
|
108
|
+
[`8d4228767b0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8d4228767b0) - Upgrade
|
|
109
|
+
Typescript from `4.2.4` to `4.3.5`.
|
|
78
110
|
|
|
79
111
|
## 2.0.4
|
|
80
112
|
|
|
81
113
|
### Patch Changes
|
|
82
114
|
|
|
83
|
-
- [#20650](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/20650)
|
|
115
|
+
- [#20650](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/20650)
|
|
116
|
+
[`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade
|
|
117
|
+
to TypeScript 4.2.4
|
|
84
118
|
- Updated dependencies
|
|
85
119
|
|
|
86
120
|
## 2.0.3
|
|
@@ -93,18 +127,25 @@
|
|
|
93
127
|
|
|
94
128
|
### Patch Changes
|
|
95
129
|
|
|
96
|
-
- [#5857](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5857)
|
|
130
|
+
- [#5857](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5857)
|
|
131
|
+
[`d3265f19be`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d3265f19be) - Transpile
|
|
132
|
+
packages using babel rather than tsc
|
|
97
133
|
|
|
98
134
|
## 2.0.1
|
|
99
135
|
|
|
100
136
|
### Patch Changes
|
|
101
137
|
|
|
102
|
-
- [#5497](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5497)
|
|
103
|
-
|
|
104
|
-
|
|
138
|
+
- [#5497](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5497)
|
|
139
|
+
[`5f58283e1f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f58283e1f) - Export
|
|
140
|
+
types using Typescript's new "export type" syntax to satisfy Typescript's --isolatedModules
|
|
141
|
+
compiler option. This requires version 3.8 of Typescript, read more about how we handle Typescript
|
|
142
|
+
versions here: https://atlaskit.atlassian.com/get-started Also add `typescript` to
|
|
143
|
+
`devDependencies` to denote version that the package was built with.
|
|
105
144
|
|
|
106
145
|
## 2.0.0
|
|
107
146
|
|
|
108
147
|
### Major Changes
|
|
109
148
|
|
|
110
|
-
- [#5392](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5392)
|
|
149
|
+
- [#5392](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/5392)
|
|
150
|
+
[`8298fd2ed1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8298fd2ed1) - Create new
|
|
151
|
+
react element for passing quizzes
|
|
@@ -5,16 +5,102 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.Score = exports.QuizName = exports.QuizBlock = exports.Quiz = exports.Question = exports.NavQuiz = exports.NavAction = exports.Header = exports.Footer = exports.Answer = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
8
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
|
+
var Quiz = exports.Quiz = _styled.default.div({
|
|
13
|
+
display: 'flex',
|
|
14
|
+
flexDirection: 'column',
|
|
15
|
+
fontSize: '16px',
|
|
16
|
+
width: '100%',
|
|
17
|
+
padding: "var(--ds-space-250, 20px)".concat(" 30px ", "var(--ds-space-250, 20px)", " 0"),
|
|
18
|
+
border: '1px solid grey',
|
|
19
|
+
borderRadius: '28px',
|
|
20
|
+
minWidth: '300px',
|
|
21
|
+
maxWidth: '380px'
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
25
|
+
var QuizName = exports.QuizName = _styled.default.div({
|
|
26
|
+
margin: '3px 0',
|
|
27
|
+
fontSize: '24px',
|
|
28
|
+
fontWeight: 500,
|
|
29
|
+
paddingLeft: "var(--ds-space-250, 20px)"
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
33
|
+
var Header = exports.Header = _styled.default.div({
|
|
34
|
+
display: 'flex',
|
|
35
|
+
alignItems: 'start',
|
|
36
|
+
flexDirection: 'column'
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
40
|
+
var QuizBlock = exports.QuizBlock = _styled.default.ul({
|
|
41
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- needs manual remediation
|
|
42
|
+
paddingLeft: '15px',
|
|
43
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- needs manual remediation
|
|
44
|
+
marginBottom: '15px',
|
|
45
|
+
marginTop: 0,
|
|
46
|
+
minHeight: '105px'
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
50
|
+
var Footer = exports.Footer = _styled.default.div({
|
|
51
|
+
paddingLeft: "var(--ds-space-100, 8px)",
|
|
52
|
+
display: 'flex',
|
|
53
|
+
justifyContent: 'space-between',
|
|
54
|
+
alignItems: 'center',
|
|
55
|
+
maxHeight: '32px'
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
59
|
+
var Question = exports.Question = _styled.default.div({
|
|
60
|
+
paddingLeft: "var(--ds-space-075, 6px)",
|
|
61
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- needs manual remediation
|
|
62
|
+
marginBottom: '10px',
|
|
63
|
+
fontSize: '14px',
|
|
64
|
+
color: '#707070',
|
|
65
|
+
textAlign: 'left'
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
69
|
+
var NavQuiz = exports.NavQuiz = _styled.default.div({
|
|
70
|
+
display: 'flex',
|
|
71
|
+
alignContent: 'center',
|
|
72
|
+
justifyContent: 'center',
|
|
73
|
+
padding: '0 0 0 3px',
|
|
74
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
75
|
+
':hover': {
|
|
76
|
+
color: 'grey'
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
81
|
+
var NavAction = exports.NavAction = _styled.default.span({
|
|
82
|
+
fontSize: '14px',
|
|
83
|
+
fontWeight: 500,
|
|
84
|
+
display: 'flex',
|
|
85
|
+
alignItems: 'center'
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
89
|
+
var Score = exports.Score = _styled.default.div({
|
|
90
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- needs manual remediation
|
|
91
|
+
marginTop: '10px',
|
|
92
|
+
paddingLeft: "var(--ds-space-075, 6px)",
|
|
93
|
+
display: 'flex',
|
|
94
|
+
flexDirection: 'column',
|
|
95
|
+
textAlign: 'start',
|
|
96
|
+
fontWeight: 400,
|
|
97
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- needs manual remediation
|
|
98
|
+
gap: '5px'
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
102
|
+
var Answer = exports.Answer = _styled.default.div({
|
|
103
|
+
display: 'flex',
|
|
104
|
+
alignItems: 'flex-end',
|
|
105
|
+
maxHeight: '25px'
|
|
106
|
+
});
|
package/dist/cjs/styled.js
CHANGED
|
@@ -5,7 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.QuizWrapper = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
8
|
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
12
|
+
var QuizWrapper = exports.QuizWrapper = _styled.default.div({
|
|
13
|
+
display: 'flex',
|
|
14
|
+
justifyContent: 'center',
|
|
15
|
+
margin: "var(--ds-space-250, 20px)"
|
|
16
|
+
});
|
|
@@ -1,72 +1,98 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import styled from '@emotion/styled';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
border
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
4
|
+
export const Quiz = styled.div({
|
|
5
|
+
display: 'flex',
|
|
6
|
+
flexDirection: 'column',
|
|
7
|
+
fontSize: '16px',
|
|
8
|
+
width: '100%',
|
|
9
|
+
padding: `${"var(--ds-space-250, 20px)"} 30px ${"var(--ds-space-250, 20px)"} 0`,
|
|
10
|
+
border: '1px solid grey',
|
|
11
|
+
borderRadius: '28px',
|
|
12
|
+
minWidth: '300px',
|
|
13
|
+
maxWidth: '380px'
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
17
|
+
export const QuizName = styled.div({
|
|
18
|
+
margin: '3px 0',
|
|
19
|
+
fontSize: '24px',
|
|
20
|
+
fontWeight: 500,
|
|
21
|
+
paddingLeft: "var(--ds-space-250, 20px)"
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
25
|
+
export const Header = styled.div({
|
|
26
|
+
display: 'flex',
|
|
27
|
+
alignItems: 'start',
|
|
28
|
+
flexDirection: 'column'
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
32
|
+
export const QuizBlock = styled.ul({
|
|
33
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- needs manual remediation
|
|
34
|
+
paddingLeft: '15px',
|
|
35
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- needs manual remediation
|
|
36
|
+
marginBottom: '15px',
|
|
37
|
+
marginTop: 0,
|
|
38
|
+
minHeight: '105px'
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
42
|
+
export const Footer = styled.div({
|
|
43
|
+
paddingLeft: "var(--ds-space-100, 8px)",
|
|
44
|
+
display: 'flex',
|
|
45
|
+
justifyContent: 'space-between',
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
maxHeight: '32px'
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
51
|
+
export const Question = styled.div({
|
|
52
|
+
paddingLeft: "var(--ds-space-075, 6px)",
|
|
53
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- needs manual remediation
|
|
54
|
+
marginBottom: '10px',
|
|
55
|
+
fontSize: '14px',
|
|
56
|
+
color: '#707070',
|
|
57
|
+
textAlign: 'left'
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
61
|
+
export const NavQuiz = styled.div({
|
|
62
|
+
display: 'flex',
|
|
63
|
+
alignContent: 'center',
|
|
64
|
+
justifyContent: 'center',
|
|
65
|
+
padding: '0 0 0 3px',
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
67
|
+
':hover': {
|
|
68
|
+
color: 'grey'
|
|
51
69
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
73
|
+
export const NavAction = styled.span({
|
|
74
|
+
fontSize: '14px',
|
|
75
|
+
fontWeight: 500,
|
|
76
|
+
display: 'flex',
|
|
77
|
+
alignItems: 'center'
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
81
|
+
export const Score = styled.div({
|
|
82
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- needs manual remediation
|
|
83
|
+
marginTop: '10px',
|
|
84
|
+
paddingLeft: "var(--ds-space-075, 6px)",
|
|
85
|
+
display: 'flex',
|
|
86
|
+
flexDirection: 'column',
|
|
87
|
+
textAlign: 'start',
|
|
88
|
+
fontWeight: 400,
|
|
89
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- needs manual remediation
|
|
90
|
+
gap: '5px'
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
94
|
+
export const Answer = styled.div({
|
|
95
|
+
display: 'flex',
|
|
96
|
+
alignItems: 'flex-end',
|
|
97
|
+
maxHeight: '25px'
|
|
98
|
+
});
|
package/dist/es2019/styled.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
1
2
|
import styled from '@emotion/styled';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
4
|
+
export const QuizWrapper = styled.div({
|
|
5
|
+
display: 'flex',
|
|
6
|
+
justifyContent: 'center',
|
|
7
|
+
margin: "var(--ds-space-250, 20px)"
|
|
8
|
+
});
|
|
@@ -1,13 +1,98 @@
|
|
|
1
|
-
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
2
|
import styled from '@emotion/styled';
|
|
4
|
-
|
|
5
|
-
export var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
4
|
+
export var Quiz = styled.div({
|
|
5
|
+
display: 'flex',
|
|
6
|
+
flexDirection: 'column',
|
|
7
|
+
fontSize: '16px',
|
|
8
|
+
width: '100%',
|
|
9
|
+
padding: "var(--ds-space-250, 20px)".concat(" 30px ", "var(--ds-space-250, 20px)", " 0"),
|
|
10
|
+
border: '1px solid grey',
|
|
11
|
+
borderRadius: '28px',
|
|
12
|
+
minWidth: '300px',
|
|
13
|
+
maxWidth: '380px'
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
17
|
+
export var QuizName = styled.div({
|
|
18
|
+
margin: '3px 0',
|
|
19
|
+
fontSize: '24px',
|
|
20
|
+
fontWeight: 500,
|
|
21
|
+
paddingLeft: "var(--ds-space-250, 20px)"
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
25
|
+
export var Header = styled.div({
|
|
26
|
+
display: 'flex',
|
|
27
|
+
alignItems: 'start',
|
|
28
|
+
flexDirection: 'column'
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
32
|
+
export var QuizBlock = styled.ul({
|
|
33
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- needs manual remediation
|
|
34
|
+
paddingLeft: '15px',
|
|
35
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- needs manual remediation
|
|
36
|
+
marginBottom: '15px',
|
|
37
|
+
marginTop: 0,
|
|
38
|
+
minHeight: '105px'
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
42
|
+
export var Footer = styled.div({
|
|
43
|
+
paddingLeft: "var(--ds-space-100, 8px)",
|
|
44
|
+
display: 'flex',
|
|
45
|
+
justifyContent: 'space-between',
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
maxHeight: '32px'
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
51
|
+
export var Question = styled.div({
|
|
52
|
+
paddingLeft: "var(--ds-space-075, 6px)",
|
|
53
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- needs manual remediation
|
|
54
|
+
marginBottom: '10px',
|
|
55
|
+
fontSize: '14px',
|
|
56
|
+
color: '#707070',
|
|
57
|
+
textAlign: 'left'
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
61
|
+
export var NavQuiz = styled.div({
|
|
62
|
+
display: 'flex',
|
|
63
|
+
alignContent: 'center',
|
|
64
|
+
justifyContent: 'center',
|
|
65
|
+
padding: '0 0 0 3px',
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
67
|
+
':hover': {
|
|
68
|
+
color: 'grey'
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
73
|
+
export var NavAction = styled.span({
|
|
74
|
+
fontSize: '14px',
|
|
75
|
+
fontWeight: 500,
|
|
76
|
+
display: 'flex',
|
|
77
|
+
alignItems: 'center'
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
81
|
+
export var Score = styled.div({
|
|
82
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- needs manual remediation
|
|
83
|
+
marginTop: '10px',
|
|
84
|
+
paddingLeft: "var(--ds-space-075, 6px)",
|
|
85
|
+
display: 'flex',
|
|
86
|
+
flexDirection: 'column',
|
|
87
|
+
textAlign: 'start',
|
|
88
|
+
fontWeight: 400,
|
|
89
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space -- needs manual remediation
|
|
90
|
+
gap: '5px'
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
94
|
+
export var Answer = styled.div({
|
|
95
|
+
display: 'flex',
|
|
96
|
+
alignItems: 'flex-end',
|
|
97
|
+
maxHeight: '25px'
|
|
98
|
+
});
|
package/dist/esm/styled.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
var _templateObject;
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
3
2
|
import styled from '@emotion/styled';
|
|
4
|
-
|
|
3
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
4
|
+
export var QuizWrapper = styled.div({
|
|
5
|
+
display: 'flex',
|
|
6
|
+
justifyContent: 'center',
|
|
7
|
+
margin: "var(--ds-space-250, 20px)"
|
|
8
|
+
});
|
package/docs/0-intro.tsx
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
AtlassianInternalWarning,
|
|
5
|
+
code,
|
|
6
|
+
DevPreviewWarning,
|
|
7
|
+
Example,
|
|
8
|
+
md,
|
|
9
|
+
Props,
|
|
10
10
|
} from '@atlaskit/docs';
|
|
11
11
|
|
|
12
12
|
export default md`
|
|
13
13
|
|
|
14
14
|
${(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
<>
|
|
16
|
+
{/* eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 */}
|
|
17
|
+
<div style={{ marginBottom: '0.5rem' }}>
|
|
18
|
+
<AtlassianInternalWarning />
|
|
19
|
+
</div>
|
|
20
|
+
{/* eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766 */}
|
|
21
|
+
<div style={{ marginTop: '0.5rem' }}>
|
|
22
|
+
<DevPreviewWarning />
|
|
23
|
+
</div>
|
|
24
|
+
</>
|
|
23
25
|
)}
|
|
24
26
|
|
|
25
27
|
## Usage
|
|
@@ -28,18 +30,18 @@ ${(
|
|
|
28
30
|
`}
|
|
29
31
|
|
|
30
32
|
${(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
<Example
|
|
34
|
+
packageName="@atlaskit/quiz-widget"
|
|
35
|
+
Component={require('../examples/0-Quiz-Widget').default}
|
|
36
|
+
title="Basic"
|
|
37
|
+
source={require('!!raw-loader!../examples/0-Quiz-Widget')}
|
|
38
|
+
/>
|
|
39
|
+
)}
|
|
38
40
|
|
|
39
41
|
${(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
<Props
|
|
43
|
+
heading="QuizWidget Props"
|
|
44
|
+
props={require('!!extract-react-types-loader!../src/components/QuizWidget/index')}
|
|
45
|
+
/>
|
|
46
|
+
)}
|
|
45
47
|
`;
|
package/package.json
CHANGED
|
@@ -1,56 +1,54 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
56
|
-
}
|
|
2
|
+
"name": "@atlaskit/quiz-widget",
|
|
3
|
+
"version": "2.1.11",
|
|
4
|
+
"description": "A React component that gives a possibility to pass quizzes",
|
|
5
|
+
"author": "Atlassian Pty Ltd",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"af:exports": {
|
|
8
|
+
".": "./src/index.ts"
|
|
9
|
+
},
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"registry": "https://registry.npmjs.org/"
|
|
12
|
+
},
|
|
13
|
+
"atlassian": {
|
|
14
|
+
"team": "Jira Training App",
|
|
15
|
+
"releaseModel": "continuous",
|
|
16
|
+
"website": {
|
|
17
|
+
"name": "QuizWidget"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
21
|
+
"main": "dist/cjs/index.js",
|
|
22
|
+
"module": "dist/esm/index.js",
|
|
23
|
+
"module:es2019": "dist/es2019/index.js",
|
|
24
|
+
"types": "dist/types/index.d.ts",
|
|
25
|
+
"typesVersions": {
|
|
26
|
+
">=4.5 <4.9": {
|
|
27
|
+
"*": [
|
|
28
|
+
"dist/types-ts4.5/*",
|
|
29
|
+
"dist/types-ts4.5/index.d.ts"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"sideEffects": false,
|
|
34
|
+
"atlaskit:src": "src/index.ts",
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@atlaskit/button": "^18.0.0",
|
|
37
|
+
"@atlaskit/icon": "^22.4.0",
|
|
38
|
+
"@atlaskit/radio": "^6.4.0",
|
|
39
|
+
"@atlaskit/spinner": "^16.2.0",
|
|
40
|
+
"@atlaskit/tokens": "^1.52.0",
|
|
41
|
+
"@babel/runtime": "^7.0.0",
|
|
42
|
+
"@emotion/styled": "^11.0.0"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"react": "^16.8.0",
|
|
46
|
+
"react-dom": "^16.8.0"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@testing-library/react": "^12.1.5",
|
|
50
|
+
"enzyme": "^3.10.0",
|
|
51
|
+
"typescript": "~5.4.2",
|
|
52
|
+
"wait-for-expect": "^1.2.0"
|
|
53
|
+
}
|
|
54
|
+
}
|
package/report.api.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## API Report File for "@atlaskit/quiz-widget"
|
|
4
4
|
|
|
5
|
-
> Do not edit this file. This report is auto-generated using
|
|
5
|
+
> Do not edit this file. This report is auto-generated using
|
|
6
|
+
> [API Extractor](https://api-extractor.com/).
|
|
6
7
|
> [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
7
8
|
|
|
8
9
|
### Table of contents
|
|
@@ -19,33 +20,33 @@
|
|
|
19
20
|
|
|
20
21
|
// @public (undocumented)
|
|
21
22
|
interface Props {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
// (undocumented)
|
|
24
|
+
correctAnswers?: QuizElement | null;
|
|
25
|
+
// (undocumented)
|
|
26
|
+
onNextButtonClick?: () => void;
|
|
27
|
+
// (undocumented)
|
|
28
|
+
onSubmitButtonClick?: (choosenAnswers: string[]) => void;
|
|
29
|
+
// (undocumented)
|
|
30
|
+
quizContent: QuizInterface;
|
|
31
|
+
// (undocumented)
|
|
32
|
+
score: null | number;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
35
|
// @public (undocumented)
|
|
35
36
|
type QuizElement = {
|
|
36
|
-
|
|
37
|
+
[key: number]: string;
|
|
37
38
|
};
|
|
38
39
|
|
|
39
40
|
// @public (undocumented)
|
|
40
41
|
interface QuizInterface {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
// (undocumented)
|
|
43
|
+
answers: {
|
|
44
|
+
[key: number]: string[];
|
|
45
|
+
};
|
|
46
|
+
// (undocumented)
|
|
47
|
+
name: string;
|
|
48
|
+
// (undocumented)
|
|
49
|
+
questions: QuizElement;
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
// @public (undocumented)
|
|
@@ -62,8 +63,8 @@ export const QuizWidget: (props: Props) => JSX.Element;
|
|
|
62
63
|
|
|
63
64
|
```json
|
|
64
65
|
{
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
"react": "^16.8.0",
|
|
67
|
+
"react-dom": "^16.8.0"
|
|
67
68
|
}
|
|
68
69
|
```
|
|
69
70
|
|