@citolab/qti-components 6.5.1 → 6.5.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/dist/custom-elements.json +359 -359
- package/dist/index.cjs +87 -48
- package/dist/index.d.cts +46 -1
- package/dist/index.d.ts +46 -1
- package/dist/index.js +86 -47
- package/dist/qti-components/index.cjs +23 -19
- package/dist/qti-components/index.d.cts +1 -0
- package/dist/qti-components/index.d.ts +1 -0
- package/dist/qti-components/index.js +50 -46
- package/dist/styles.bundled.css +3 -0
- package/package.json +4 -7
- package/src/styles/qti/qti-input-width.css +0 -36
- package/src/styles/qti/qti-layout.css +0 -119
- package/src/styles/qti/qti-styles.css +0 -58
- package/src/styles/qti-components.css +0 -158
- package/src/styles/qti-interactions.css +0 -299
- package/src/styles/qti-interactions.layout.css +0 -36
- package/src/styles/qti-styles.css +0 -50
- package/src/styles/stories/qti-components.stories.css +0 -11
package/dist/styles.bundled.css
CHANGED
|
@@ -2689,3 +2689,6 @@ qti-item-body :where(.prose > :first-child):not(:where([class~="not-prose"],[cla
|
|
|
2689
2689
|
qti-item-body :where(.prose > :last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)){
|
|
2690
2690
|
margin-bottom: 0;
|
|
2691
2691
|
}
|
|
2692
|
+
qti-item-body{
|
|
2693
|
+
max-width: none;
|
|
2694
|
+
}
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"engines": {
|
|
13
13
|
"node": ">=16.0.0"
|
|
14
14
|
},
|
|
15
|
-
"version": "6.5.
|
|
15
|
+
"version": "6.5.3",
|
|
16
16
|
"type": "module",
|
|
17
17
|
"main": "dist/index.js",
|
|
18
18
|
"exports": {
|
|
@@ -28,10 +28,8 @@
|
|
|
28
28
|
"import": "./dist/qti-transformers/index.js",
|
|
29
29
|
"require": "./dist/qti-transformers/index.cjs"
|
|
30
30
|
},
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
"require": "./src/**/*.css"
|
|
34
|
-
}
|
|
31
|
+
"./styles.bundled.css": "./dist/styles.bundled.css",
|
|
32
|
+
"./styles.css": "./dist/styles.css"
|
|
35
33
|
},
|
|
36
34
|
"types": "./dist/qti-components/index.d.ts",
|
|
37
35
|
"typesVersions": {
|
|
@@ -51,8 +49,7 @@
|
|
|
51
49
|
"dist",
|
|
52
50
|
"types",
|
|
53
51
|
"./dist/styles.css",
|
|
54
|
-
"./dist/styles.bundled.css"
|
|
55
|
-
"./src/styles/**/*.css"
|
|
52
|
+
"./dist/styles.bundled.css"
|
|
56
53
|
],
|
|
57
54
|
"scripts": {
|
|
58
55
|
"test": "jest",
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/* .qti-input-width-1 {
|
|
2
|
-
width: 1ch;
|
|
3
|
-
min-width: 1ch;
|
|
4
|
-
}
|
|
5
|
-
.qti-input-width-2 {
|
|
6
|
-
width: 2ch;
|
|
7
|
-
min-width: 2ch;
|
|
8
|
-
}
|
|
9
|
-
.qti-input-width-3 {
|
|
10
|
-
width: 3ch;
|
|
11
|
-
min-width: 3ch;
|
|
12
|
-
}
|
|
13
|
-
.qti-input-width-4 {
|
|
14
|
-
width: 4ch;
|
|
15
|
-
min-width: 4ch;
|
|
16
|
-
}
|
|
17
|
-
.qti-input-width-6 {
|
|
18
|
-
width: 6ch;
|
|
19
|
-
min-width: 6ch;
|
|
20
|
-
}
|
|
21
|
-
.qti-input-width-10 {
|
|
22
|
-
width: 10ch;
|
|
23
|
-
min-width: 10ch;
|
|
24
|
-
}
|
|
25
|
-
.qti-input-width-15 {
|
|
26
|
-
width: 15ch;
|
|
27
|
-
min-width: 15ch;
|
|
28
|
-
}
|
|
29
|
-
.qti-input-width-20 {
|
|
30
|
-
width: 20ch;
|
|
31
|
-
min-width: 20ch;
|
|
32
|
-
}
|
|
33
|
-
.qti-input-width-72 {
|
|
34
|
-
width: 72ch;
|
|
35
|
-
min-width: 72ch;
|
|
36
|
-
} */
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
.qti-layout-row {
|
|
2
|
-
display: flow-root;
|
|
3
|
-
width: 100%;
|
|
4
|
-
}
|
|
5
|
-
.qti-layout-row [class*='qti-layout-col'] {
|
|
6
|
-
margin-left: 2.1276595745%;
|
|
7
|
-
float: left;
|
|
8
|
-
}
|
|
9
|
-
.qti-layout-row [class*='qti-layout-col']:first-child {
|
|
10
|
-
margin-left: 0;
|
|
11
|
-
}
|
|
12
|
-
.qti-layout-row .qti-layout-col12 {
|
|
13
|
-
width: 100%;
|
|
14
|
-
}
|
|
15
|
-
.qti-layout-row .qti-layout-offset12 {
|
|
16
|
-
margin-left: 104.2553191489%;
|
|
17
|
-
}
|
|
18
|
-
.qti-layout-row .qti-layout-offset12:first-child {
|
|
19
|
-
margin-left: 102.1276595745%;
|
|
20
|
-
}
|
|
21
|
-
.qti-layout-row .qti-layout-col11 {
|
|
22
|
-
width: 91.4893617021%;
|
|
23
|
-
}
|
|
24
|
-
.qti-layout-row .qti-layout-offset11 {
|
|
25
|
-
margin-left: 95.7446808511%;
|
|
26
|
-
}
|
|
27
|
-
.qti-layout-row .qti-layout-offset11:first-child {
|
|
28
|
-
margin-left: 93.6170212766%;
|
|
29
|
-
}
|
|
30
|
-
.qti-layout-row .qti-layout-col10 {
|
|
31
|
-
width: 82.9787234043%;
|
|
32
|
-
}
|
|
33
|
-
.qti-layout-row .qti-layout-offset10 {
|
|
34
|
-
margin-left: 87.2340425532%;
|
|
35
|
-
}
|
|
36
|
-
.qti-layout-row .qti-layout-offset10:first-child {
|
|
37
|
-
margin-left: 85.1063829787%;
|
|
38
|
-
}
|
|
39
|
-
.qti-layout-row .qti-layout-col9 {
|
|
40
|
-
width: 74.4680851064%;
|
|
41
|
-
}
|
|
42
|
-
.qti-layout-row .qti-layout-offset9 {
|
|
43
|
-
margin-left: 78.7234042553%;
|
|
44
|
-
}
|
|
45
|
-
.qti-layout-row .qti-layout-offset9:first-child {
|
|
46
|
-
margin-left: 76.5957446809%;
|
|
47
|
-
}
|
|
48
|
-
.qti-layout-row .qti-layout-col8 {
|
|
49
|
-
width: 65.9574468085%;
|
|
50
|
-
}
|
|
51
|
-
.qti-layout-row .qti-layout-offset8 {
|
|
52
|
-
margin-left: 70.2127659574%;
|
|
53
|
-
}
|
|
54
|
-
.qti-layout-row .qti-layout-offset8:first-child {
|
|
55
|
-
margin-left: 68.085106383%;
|
|
56
|
-
}
|
|
57
|
-
.qti-layout-row .qti-layout-col7 {
|
|
58
|
-
width: 57.4468085106%;
|
|
59
|
-
}
|
|
60
|
-
.qti-layout-row .qti-layout-offset7 {
|
|
61
|
-
margin-left: 61.7021276596%;
|
|
62
|
-
}
|
|
63
|
-
.qti-layout-row .qti-layout-offset7:first-child {
|
|
64
|
-
margin-left: 59.5744680851%;
|
|
65
|
-
}
|
|
66
|
-
.qti-layout-row .qti-layout-col6 {
|
|
67
|
-
width: 48.9361702128%;
|
|
68
|
-
}
|
|
69
|
-
.qti-layout-row .qti-layout-offset6 {
|
|
70
|
-
margin-left: 53.1914893617%;
|
|
71
|
-
}
|
|
72
|
-
.qti-layout-row .qti-layout-offset6:first-child {
|
|
73
|
-
margin-left: 51.0638297872%;
|
|
74
|
-
}
|
|
75
|
-
.qti-layout-row .qti-layout-col5 {
|
|
76
|
-
width: 40.4255319149%;
|
|
77
|
-
}
|
|
78
|
-
.qti-layout-row .qti-layout-offset5 {
|
|
79
|
-
margin-left: 44.6808510638%;
|
|
80
|
-
}
|
|
81
|
-
.qti-layout-row .qti-layout-offset5:first-child {
|
|
82
|
-
margin-left: 42.5531914894%;
|
|
83
|
-
}
|
|
84
|
-
.qti-layout-row .qti-layout-col4 {
|
|
85
|
-
width: 31.914893617%;
|
|
86
|
-
}
|
|
87
|
-
.qti-layout-row .qti-layout-offset4 {
|
|
88
|
-
margin-left: 36.170212766%;
|
|
89
|
-
}
|
|
90
|
-
.qti-layout-row .qti-layout-offset4:first-child {
|
|
91
|
-
margin-left: 34.0425531915%;
|
|
92
|
-
}
|
|
93
|
-
.qti-layout-row .qti-layout-col3 {
|
|
94
|
-
width: 23.4042553191%;
|
|
95
|
-
}
|
|
96
|
-
.qti-layout-row .qti-layout-offset3 {
|
|
97
|
-
margin-left: 27.6595744681%;
|
|
98
|
-
}
|
|
99
|
-
.qti-layout-row .qti-layout-offset3:first-child {
|
|
100
|
-
margin-left: 25.5319148936%;
|
|
101
|
-
}
|
|
102
|
-
.qti-layout-row .qti-layout-col2 {
|
|
103
|
-
width: 14.8936170213%;
|
|
104
|
-
}
|
|
105
|
-
.qti-layout-row .qti-layout-offset2 {
|
|
106
|
-
margin-left: 19.1489361702%;
|
|
107
|
-
}
|
|
108
|
-
.qti-layout-row .qti-layout-offset2:first-child {
|
|
109
|
-
margin-left: 17.0212765957%;
|
|
110
|
-
}
|
|
111
|
-
.qti-layout-row .qti-layout-col1 {
|
|
112
|
-
width: 6.3829787234%;
|
|
113
|
-
}
|
|
114
|
-
.qti-layout-row .qti-layout-offset1 {
|
|
115
|
-
margin-left: 10.6382978723%;
|
|
116
|
-
}
|
|
117
|
-
.qti-layout-row .qti-layout-offset1:first-child {
|
|
118
|
-
margin-left: 8.5106382979%;
|
|
119
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
.qti-underline {
|
|
2
|
-
text-decoration: underline;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.qti-align-left {
|
|
6
|
-
text-align: left;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.qti-align-center {
|
|
10
|
-
text-align: center;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.qti-align-right {
|
|
14
|
-
text-align: right;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.qti-valign-top {
|
|
18
|
-
vertical-align: top;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.qti-valign-middle {
|
|
22
|
-
vertical-align: middle;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.qti-valign-baseline {
|
|
26
|
-
vertical-align: baseline;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.qti-valign-bottom {
|
|
30
|
-
vertical-align: bottom;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.qti-fullwidth {
|
|
34
|
-
width: 100%;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.qti-hidden {
|
|
38
|
-
display: none;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.qti-visually-hidden {
|
|
42
|
-
position: fixed !important;
|
|
43
|
-
overflow: hidden;
|
|
44
|
-
width: 1px;
|
|
45
|
-
height: 1px;
|
|
46
|
-
border: 0;
|
|
47
|
-
margin: -1px;
|
|
48
|
-
clip: rect(1px 1px 1px 1px);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.qti-bordered {
|
|
52
|
-
padding: 2px;
|
|
53
|
-
border: 1px solid #888;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.qti-well {
|
|
57
|
-
@apply base inline-block rounded border border-gray-300 bg-gray-100 px-3 py-2 text-gray-600;
|
|
58
|
-
}
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
@layer base {
|
|
2
|
-
/** default styles for all components */
|
|
3
|
-
.base {
|
|
4
|
-
@apply cursor-pointer rounded-md
|
|
5
|
-
outline-none ring-1 ring-inset ring-gray-300;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
@layer components {
|
|
10
|
-
/** The different components, you can choose only one */
|
|
11
|
-
|
|
12
|
-
/* - button : .input-control-hidden qti-choice, qti-hotspot */
|
|
13
|
-
.button {
|
|
14
|
-
@apply base px-3 py-2 font-semibold shadow-sm;
|
|
15
|
-
/* @apply select-none; */
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/* - select : inline-choice */
|
|
19
|
-
.select {
|
|
20
|
-
@apply base relative appearance-none px-3 py-2 pr-7 shadow-sm;
|
|
21
|
-
background: url("data:image/svg+xml,%3Csvg fill='currentColor' width='22' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' aria-hidden='true'%3E%3Cpath clip-rule='evenodd' fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'%3E%3C/path%3E%3C/svg%3E")
|
|
22
|
-
no-repeat center right 6px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/* - check : qti-choice, qti-hotspot */
|
|
26
|
-
.check {
|
|
27
|
-
@apply base flex items-center gap-2 px-1 py-0.5 shadow-none;
|
|
28
|
-
@apply !ring-0; /* !important, remove for checkbox and radio the active ring, the radio and checkbox will be selected instead */
|
|
29
|
-
/* @apply select-none; */
|
|
30
|
-
|
|
31
|
-
&::part(cha) {
|
|
32
|
-
/* let the checkmark or radio circle already take up space, else when checking everyhing collapses */
|
|
33
|
-
@apply h-2/3 w-2/3;
|
|
34
|
-
}
|
|
35
|
-
&[role='radio']::part(ch) {
|
|
36
|
-
@apply flex h-5 w-5 shrink-0 items-center justify-center rounded-full shadow-sm ring-2 ring-inset ring-gray-300;
|
|
37
|
-
}
|
|
38
|
-
&[role='radio'][aria-checked='true']::part(cha) {
|
|
39
|
-
@apply rounded-full bg-primary-500;
|
|
40
|
-
}
|
|
41
|
-
&[role='checkbox']::part(ch) {
|
|
42
|
-
@apply flex h-5 w-5 shrink-0 items-center justify-center rounded shadow-sm ring-2 ring-inset ring-gray-300;
|
|
43
|
-
}
|
|
44
|
-
&[role='checkbox'][aria-checked='true']::part(cha) {
|
|
45
|
-
@apply bg-primary-500;
|
|
46
|
-
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='100%' height='100%' viewBox='0 0 24 24'%3E%3Cpath d='M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z'/%3E%3C/svg%3E");
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
/* - text : text-entry and extended-text */
|
|
50
|
-
.text {
|
|
51
|
-
@apply base cursor-text rounded-sm border-0 p-3 text-gray-600 shadow-inner;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/* - spot : gap-select-point, graphic-order, qti-graphic-associate */
|
|
55
|
-
.spot {
|
|
56
|
-
@apply base h-full w-full bg-transparent p-0 ring-2 ring-gray-900;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.point {
|
|
60
|
-
@apply base h-6 w-6 bg-transparent p-0 ring-2 ring-gray-900;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/* - drag : gap-match, match, order, associate */
|
|
64
|
-
.drag {
|
|
65
|
-
@apply base inline-block cursor-grab bg-white py-1 pl-4 pr-2 font-semibold shadow-sm;
|
|
66
|
-
/* @apply select-none; */
|
|
67
|
-
background-image: radial-gradient(
|
|
68
|
-
circle at center,
|
|
69
|
-
rgba(0, 0, 0, 0.1) 0,
|
|
70
|
-
rgb(0, 0, 0, 0.1) 2px,
|
|
71
|
-
white 2px,
|
|
72
|
-
white 100%
|
|
73
|
-
);
|
|
74
|
-
background-repeat: repeat-y;
|
|
75
|
-
background-position: left 2px;
|
|
76
|
-
background-size: 14px 8px;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/* - drop : gap-match, match, order, associate */
|
|
80
|
-
.drop {
|
|
81
|
-
@apply base ring-outset relative bg-gray-50 shadow-inner ring-2 ring-gray-300 ring-offset-1;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.order {
|
|
85
|
-
@apply h-6 w-6 rounded-full bg-primary-500 text-white;
|
|
86
|
-
}
|
|
87
|
-
/** End components */
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
@layer utilities {
|
|
91
|
-
/* hover, every element has a hover, except disabled( which overrides hover */
|
|
92
|
-
.hov {
|
|
93
|
-
@apply bg-gray-50;
|
|
94
|
-
}
|
|
95
|
-
.hov-ring {
|
|
96
|
-
@apply ring-primary-500;
|
|
97
|
-
}
|
|
98
|
-
/* focus, every element has a focus, even drop ( for keyboard access, eventually ) */
|
|
99
|
-
.foc {
|
|
100
|
-
@apply outline-2 outline-primary-300;
|
|
101
|
-
}
|
|
102
|
-
/* active, choice active class and, used on checkbox and radio where not .qti-input-choice-hidden */
|
|
103
|
-
.act {
|
|
104
|
-
@apply ring-2 ring-primary-400;
|
|
105
|
-
}
|
|
106
|
-
/* readonly, overwrites cursor, hover background, outline for focus and ring */
|
|
107
|
-
.rdo {
|
|
108
|
-
@apply cursor-pointer bg-white shadow-none outline-0 ring-0;
|
|
109
|
-
}
|
|
110
|
-
/* disabled, make gray state */
|
|
111
|
-
.dis {
|
|
112
|
-
@apply cursor-not-allowed bg-gray-100 text-gray-500 shadow-none ring-gray-400;
|
|
113
|
-
/* drag in the drop, else the drag in the drop was black and not gray */
|
|
114
|
-
& > * {
|
|
115
|
-
@apply !text-gray-500;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
@layer utilities {
|
|
121
|
-
/** Modifiers */
|
|
122
|
-
|
|
123
|
-
/* PK: There was no utility to reset the ring-inset
|
|
124
|
-
We use this for the drop container, where we want the ring to have an outset
|
|
125
|
-
So the drag, with ring-inset, snugs neatly into the drop with ring-'outset'
|
|
126
|
-
by unsetting the ring-inset */
|
|
127
|
-
.ring-outset {
|
|
128
|
-
--tw-ring-inset: unset;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/* intext for elements which has to appear in text
|
|
132
|
-
- intext : gap-match > qti-gap, hottext > hottext, select
|
|
133
|
-
*/
|
|
134
|
-
.button-in {
|
|
135
|
-
@apply inline-flex;
|
|
136
|
-
|
|
137
|
-
/* @apply inline-flex gap-1 px-1 py-0 align-bottom font-normal ring-offset-0; */
|
|
138
|
-
}
|
|
139
|
-
.check-in {
|
|
140
|
-
@apply inline-flex;
|
|
141
|
-
|
|
142
|
-
/* @apply inline-flex gap-1 px-1 py-0 align-bottom font-normal ring-offset-0; */
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/* small for elements which has to appear in text
|
|
146
|
-
- intext : gap-match > qti-gap, hottext > hottext, select
|
|
147
|
-
*/
|
|
148
|
-
.button-sm {
|
|
149
|
-
/* @apply gap-0.5 rounded !px-1 !py-0 outline-offset-0 ring-1; */
|
|
150
|
-
}
|
|
151
|
-
.check-sm {
|
|
152
|
-
@apply gap-0.5 outline-offset-0 ring-1;
|
|
153
|
-
/* @apply gap-0.5 rounded !px-1 !py-0 outline-offset-0 ring-1; */
|
|
154
|
-
&::part(ch) {
|
|
155
|
-
@apply !h-4 !w-4 !ring-1;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
}
|
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
qti-choice-interaction {
|
|
2
|
-
@apply my-2 gap-2;
|
|
3
|
-
|
|
4
|
-
&.qti-input-control-hidden {
|
|
5
|
-
qti-simple-choice {
|
|
6
|
-
@apply button hover:hov focus:foc aria-checked:act aria-readonly:rdo aria-disabled:dis;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
&:not(.qti-input-control-hidden) {
|
|
11
|
-
qti-simple-choice {
|
|
12
|
-
@apply check hover:hov focus:foc aria-checked:act aria-readonly:rdo aria-disabled:dis;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
qti-simple-choice {
|
|
17
|
-
&[data-correct-response='true'] {
|
|
18
|
-
&::after {
|
|
19
|
-
content: '\02714';
|
|
20
|
-
@apply text-green-600;
|
|
21
|
-
}
|
|
22
|
-
/* @apply bg-green-100 text-green-600; */
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
qti-simple-choice > p {
|
|
27
|
-
@apply m-0 p-0;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
qti-text-entry-interaction {
|
|
32
|
-
@apply my-2;
|
|
33
|
-
&::part(input) {
|
|
34
|
-
@apply text hover:hov focus:foc;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
qti-extended-text-interaction {
|
|
39
|
-
@apply my-2;
|
|
40
|
-
&::part(textarea) {
|
|
41
|
-
@apply text hover:hov focus:foc;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
qti-gap-match-interaction {
|
|
46
|
-
@apply my-2 leading-8;
|
|
47
|
-
qti-gap-text {
|
|
48
|
-
@apply drag hover:hov focus:foc pl-3 pr-2 leading-normal;
|
|
49
|
-
}
|
|
50
|
-
qti-gap {
|
|
51
|
-
@apply drop hover:hov focus:foc inline-flex leading-normal;
|
|
52
|
-
@apply w-32; /* PK: should be set in the javascript, default 100px, or listening to data-width attribute according to the spec */
|
|
53
|
-
&:empty:after {
|
|
54
|
-
content: '\0000a0'; /* when empty, put a space in it */
|
|
55
|
-
}
|
|
56
|
-
&:not(:empty) {
|
|
57
|
-
@apply inline-flex w-auto p-0 shadow-none;
|
|
58
|
-
}
|
|
59
|
-
&:not(:empty) > * {
|
|
60
|
-
@apply flex-1 rotate-0 shadow-none ring-gray-200;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
qti-hotspot-interaction {
|
|
66
|
-
@apply my-2;
|
|
67
|
-
|
|
68
|
-
qti-hotspot-choice {
|
|
69
|
-
@apply hover:bg-blue-100 hover:bg-opacity-30;
|
|
70
|
-
|
|
71
|
-
&[shape='circle'] {
|
|
72
|
-
@apply spot hover:hov-ring focus:foc aria-checked:act aria-readonly:rdo aria-disabled:dis rounded-full;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
&[shape='rect'] {
|
|
76
|
-
@apply spot hover:hov-ring focus:foc aria-checked:act aria-readonly:rdo aria-disabled:dis;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&[shape='poly'] {
|
|
80
|
-
@apply hover:hov focus:foc aria-checked:act aria-readonly:rdo aria-disabled:dis;
|
|
81
|
-
&[aria-checked='true'] {
|
|
82
|
-
@apply bg-primary-500;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/* &::after {
|
|
87
|
-
content: '';
|
|
88
|
-
@apply absolute top-0 block origin-center bg-white;
|
|
89
|
-
height: 95%;
|
|
90
|
-
width: 95%;
|
|
91
|
-
clip-path: inherit;
|
|
92
|
-
} */
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
qti-hottext-interaction {
|
|
97
|
-
@apply my-2;
|
|
98
|
-
|
|
99
|
-
&.qti-input-control-hidden {
|
|
100
|
-
qti-hottext {
|
|
101
|
-
@apply button button-sm button-in hover:hov focus:foc aria-checked:act aria-readonly:rdo aria-disabled:dis;
|
|
102
|
-
&::part(ch) {
|
|
103
|
-
@apply !hidden;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&:not(.qti-input-control-hidden) {
|
|
109
|
-
qti-hottext {
|
|
110
|
-
@apply check check-sm check-in hover:hov focus:foc aria-checked:act aria-readonly:rdo aria-disabled:dis;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
qti-inline-choice-interaction {
|
|
116
|
-
&::part(select) {
|
|
117
|
-
@apply select hover:hov focus:foc; /* aria-checked:act aria-readonly:rdo aria-disabled:dis; */
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
qti-match-interaction:not(.qti-match-tabular) {
|
|
122
|
-
qti-simple-match-set:first-of-type {
|
|
123
|
-
@apply flex flex-wrap gap-2 pb-4;
|
|
124
|
-
|
|
125
|
-
qti-simple-associable-choice {
|
|
126
|
-
@apply drag hover:hov focus:foc py-2 pl-4 pr-3;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
qti-simple-match-set:last-of-type {
|
|
131
|
-
@apply grid auto-cols-fr grid-flow-col gap-2;
|
|
132
|
-
|
|
133
|
-
qti-simple-associable-choice {
|
|
134
|
-
@apply drop hover:hov focus:foc;
|
|
135
|
-
/* @apply flex h-32 flex-col gap-2; */
|
|
136
|
-
@apply flex h-32 flex-col;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
qti-simple-associable-choice > qti-simple-associable-choice {
|
|
140
|
-
@apply drag hover:hov focus:foc py-2 pl-4 pr-3;
|
|
141
|
-
flex-basis: fit-content;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
qti-order-interaction {
|
|
147
|
-
&::part(qti-simple-choice),
|
|
148
|
-
qti-simple-choice {
|
|
149
|
-
@apply drag hover:hov focus:foc py-2 pl-4 pr-3;
|
|
150
|
-
}
|
|
151
|
-
&::part(qti-simple-choice) {
|
|
152
|
-
@apply flex w-full items-center overflow-hidden text-ellipsis;
|
|
153
|
-
}
|
|
154
|
-
&::part(drops) {
|
|
155
|
-
@apply gap-2;
|
|
156
|
-
}
|
|
157
|
-
&::part(drags) {
|
|
158
|
-
@apply gap-2;
|
|
159
|
-
}
|
|
160
|
-
&::part(drop-list) {
|
|
161
|
-
@apply drop hover:hov focus:foc flex min-h-[4rem];
|
|
162
|
-
}
|
|
163
|
-
&::part(active) {
|
|
164
|
-
@apply ring-2 ring-primary-400;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
qti-associate-interaction {
|
|
169
|
-
&::part(qti-simple-associable-choice),
|
|
170
|
-
qti-simple-associable-choice {
|
|
171
|
-
@apply drag hover:hov focus:foc flex items-center overflow-hidden text-ellipsis py-2 pl-4 pr-3;
|
|
172
|
-
}
|
|
173
|
-
&::part(associables-container) {
|
|
174
|
-
@apply my-2 flex w-full justify-between;
|
|
175
|
-
background: linear-gradient(
|
|
176
|
-
180deg,
|
|
177
|
-
rgb(0 0 0 / 0%) calc(50% - 1px),
|
|
178
|
-
#000000 calc(50%),
|
|
179
|
-
rgb(0 0 0 / 0%) calc(50% + 1px)
|
|
180
|
-
);
|
|
181
|
-
}
|
|
182
|
-
&::part(active) {
|
|
183
|
-
@apply ring-2 ring-primary-400;
|
|
184
|
-
}
|
|
185
|
-
&::part(drop-list) {
|
|
186
|
-
@apply drop grid h-[3rem] w-1/3;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
qti-graphic-order-interaction {
|
|
191
|
-
/* @apply my-2; */
|
|
192
|
-
|
|
193
|
-
qti-hotspot-choice {
|
|
194
|
-
@apply spot hover:hov focus:foc aria-checked:act aria-readonly:rdo aria-disabled:dis;
|
|
195
|
-
/* &::after {
|
|
196
|
-
content: '';
|
|
197
|
-
@apply absolute top-0 block scale-75 bg-white;
|
|
198
|
-
height: inherit;
|
|
199
|
-
width: inherit;
|
|
200
|
-
clip-path: inherit;
|
|
201
|
-
} */
|
|
202
|
-
&[aria-ordervalue] {
|
|
203
|
-
@apply order flex items-center justify-center;
|
|
204
|
-
}
|
|
205
|
-
&[aria-ordervalue]::after {
|
|
206
|
-
content: attr(aria-ordervalue) !important;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
qti-graphic-associate-interaction {
|
|
212
|
-
@apply relative block;
|
|
213
|
-
|
|
214
|
-
qti-associable-hotspot {
|
|
215
|
-
&[shape='circle'] {
|
|
216
|
-
/* border-radius: 100%;
|
|
217
|
-
background-color: green; */
|
|
218
|
-
@apply spot hover:hov focus:foc aria-checked:act aria-readonly:rdo aria-disabled:dis;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
&[shape='square'] {
|
|
222
|
-
/* border-radius: 0; */
|
|
223
|
-
/* background-color: green; */
|
|
224
|
-
@apply spot hover:hov focus:foc aria-checked:act aria-readonly:rdo aria-disabled:dis;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
qti-graphic-gap-match-interaction {
|
|
230
|
-
@apply relative;
|
|
231
|
-
img {
|
|
232
|
-
@apply m-0 p-0;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
qti-slider-interaction {
|
|
237
|
-
@apply block; /* else no screenshot will be made with html-to-image */
|
|
238
|
-
|
|
239
|
-
/* @apply hover:hov focus:foc aria-checked:act aria-readonly:rdo aria-disabled:dis; */
|
|
240
|
-
|
|
241
|
-
--qti-tick-color: rgb(229 231 235 / 1);
|
|
242
|
-
--qti-tick-width: 1px;
|
|
243
|
-
|
|
244
|
-
&::part(slider) {
|
|
245
|
-
@apply mx-8; /* so the slider stays INSIDE of the qti-slider-interaction */
|
|
246
|
-
@apply pb-4 pt-5; /* this keeps all content in the qti-slider interaction, also for html-to-image */
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
--show-bounds: true;
|
|
250
|
-
&::part(bounds) {
|
|
251
|
-
@apply flex w-full justify-between; /* the two divs with value lower and upper will now be at start and end of this bounds container */
|
|
252
|
-
@apply mb-2; /* just so it aligns with the value 'knob' */
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
--show-ticks: true;
|
|
256
|
-
&::part(ticks) {
|
|
257
|
-
@apply mx-0.5 mb-1 h-2; /* absolute height for the ticks, and keep distance of the rail. push them 0.5 inward */
|
|
258
|
-
background-position: 0 center;
|
|
259
|
-
background: linear-gradient(to right, var(--qti-tick-color) var(--qti-tick-width), transparent 1px) repeat-x;
|
|
260
|
-
background-size: calc(calc(100% - var(--qti-tick-width)) / ((var(--max) - var(--min)) / var(--step))) 100%;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
&::part(rail) {
|
|
264
|
-
@apply flex items-center; /* so the knob is neatly centered vertically */
|
|
265
|
-
/* DESIGN */
|
|
266
|
-
@apply box-border; /* if you have a border in the design apply, this box-border will make the border stay INSIDE the rail */
|
|
267
|
-
@apply h-1.5 w-full cursor-pointer rounded-full border border-solid border-gray-300 bg-gray-200;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
&::part(knob) {
|
|
271
|
-
@apply relative h-4 w-4 origin-center -translate-x-1/2 cursor-pointer rounded-full bg-primary-500;
|
|
272
|
-
left: var(--value-percentage);
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
--show-value: true;
|
|
276
|
-
&::part(value) {
|
|
277
|
-
@apply absolute bottom-8; /* align the value, which you can drag, on top of the knob, so it aligns with the rest of the values */
|
|
278
|
-
@apply left-2; /* should be half width of the knob if you want to center these two */
|
|
279
|
-
@apply -translate-x-1/2 cursor-pointer rounded bg-gray-100 px-2 py-1 text-center text-gray-500;
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
qti-select-point-interaction {
|
|
284
|
-
&::part(point) {
|
|
285
|
-
@apply hover:bg-blue-100 hover:bg-opacity-30;
|
|
286
|
-
@apply point hover:hov-ring focus:foc rounded-full; /* aria-checked:act aria-readonly:rdo aria-disabled:dis ;*/
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
qti-position-object-stage {
|
|
291
|
-
qti-position-object-interaction {
|
|
292
|
-
/* no styles necessary, only layout styles, defined in the component */
|
|
293
|
-
/* height: 40px; */
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
qti-prompt {
|
|
298
|
-
@apply my-2 block w-full;
|
|
299
|
-
}
|