@citolab/qti-components 7.0.1 → 7.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/{index.min.js → index.js} +378 -186
  3. package/dist/custom-elements.json +27088 -0
  4. package/dist/{qti-test/index.d.ts → index.d.ts} +163 -2
  5. package/dist/index.js +13601 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/item.css +223 -32
  8. package/dist/{qti-loader → loader}/index.d.ts +1 -1
  9. package/dist/qti-components-jsx.d.ts +29 -25
  10. package/dist/{qti-simple-choice-CynLWb8d.d.cts → qti-simple-choice-DG8ImdPz.d.ts} +2 -2
  11. package/dist/vscode.html-custom-data.json +12 -9
  12. package/package.json +40 -59
  13. package/cdn/index.min.cjs +0 -4489
  14. package/dist/qti-components/index.cjs +0 -6704
  15. package/dist/qti-components/index.cjs.map +0 -1
  16. package/dist/qti-components/index.d.cts +0 -150
  17. package/dist/qti-components/index.d.ts +0 -150
  18. package/dist/qti-components/index.js +0 -6593
  19. package/dist/qti-components/index.js.map +0 -1
  20. package/dist/qti-item/index.cjs +0 -89
  21. package/dist/qti-item/index.cjs.map +0 -1
  22. package/dist/qti-item/index.d.cts +0 -24
  23. package/dist/qti-item/index.d.ts +0 -24
  24. package/dist/qti-item/index.js +0 -65
  25. package/dist/qti-item/index.js.map +0 -1
  26. package/dist/qti-loader/index.cjs +0 -332
  27. package/dist/qti-loader/index.cjs.map +0 -1
  28. package/dist/qti-loader/index.d.cts +0 -20
  29. package/dist/qti-simple-choice-CynLWb8d.d.ts +0 -1185
  30. package/dist/qti-test/index.cjs +0 -4632
  31. package/dist/qti-test/index.cjs.map +0 -1
  32. package/dist/qti-test/index.d.cts +0 -304
  33. package/dist/qti-test/index.js +0 -4599
  34. package/dist/qti-test/index.js.map +0 -1
  35. package/dist/qti-transformers/index.cjs +0 -316
  36. package/dist/qti-transformers/index.cjs.map +0 -1
  37. package/dist/qti-transformers/index.d.cts +0 -75
  38. /package/dist/{qti-loader → loader}/index.js +0 -0
  39. /package/dist/{qti-loader → loader}/index.js.map +0 -0
  40. /package/dist/{qti-transformers → transformers}/index.d.ts +0 -0
  41. /package/dist/{qti-transformers → transformers}/index.js +0 -0
  42. /package/dist/{qti-transformers → transformers}/index.js.map +0 -0
@@ -1,4632 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
- var __decorateClass = (decorators, target, key, kind) => {
19
- var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
20
- for (var i = decorators.length - 1, decorator; i >= 0; i--)
21
- if (decorator = decorators[i])
22
- result = (kind ? decorator(target, key, result) : decorator(result)) || result;
23
- if (kind && result) __defProp(target, key, result);
24
- return result;
25
- };
26
-
27
- // src/lib/qti-test/index.ts
28
- var qti_test_exports = {};
29
- __export(qti_test_exports, {
30
- QtiAssessmentItemRef: () => QtiAssessmentItemRef,
31
- QtiAssessmentSection: () => QtiAssessmentSection,
32
- QtiAssessmentTest: () => QtiAssessmentTest,
33
- QtiTest: () => QtiTest,
34
- QtiTestPart: () => QtiTestPart,
35
- TestContainer: () => TestContainer,
36
- TestItemLink: () => TestItemLink,
37
- TestNext: () => TestNext,
38
- TestPagingButtonsStamp: () => TestPagingButtonsStamp,
39
- TestPrev: () => TestPrev,
40
- TestView: () => TestView
41
- });
42
- module.exports = __toCommonJS(qti_test_exports);
43
-
44
- // src/lib/qti-test/qti-assessment-test/qti-assessment-item-ref.ts
45
- var import_context2 = require("@lit/context");
46
- var import_lit = require("lit");
47
- var import_decorators = require("lit/decorators.js");
48
-
49
- // src/lib/qti-test/context/test.context.ts
50
- var import_context = require("@lit/context");
51
- var testContext = (0, import_context.createContext)(Symbol("test"));
52
- var testElement = (0, import_context.createContext)(Symbol("testElement"));
53
-
54
- // src/lib/qti-test/qti-assessment-test/qti-assessment-item-ref.ts
55
- var stringToBooleanConverter = {
56
- fromAttribute(value) {
57
- return value === "true";
58
- },
59
- toAttribute(value) {
60
- return value ? "true" : "false";
61
- }
62
- };
63
- var QtiAssessmentItemRef = class extends import_lit.LitElement {
64
- constructor() {
65
- super(...arguments);
66
- this.weigths = /* @__PURE__ */ new Map();
67
- }
68
- // the XMLDocument
69
- createRenderRoot() {
70
- return this;
71
- }
72
- get assessmentItem() {
73
- return this.renderRoot?.querySelector("qti-assessment-item");
74
- }
75
- async connectedCallback() {
76
- super.connectedCallback();
77
- await this.updateComplete;
78
- this.dispatchEvent(
79
- new CustomEvent("qti-assessment-item-ref-connected", {
80
- bubbles: true,
81
- composed: true,
82
- detail: { identifier: this.identifier, href: this.href, category: this.category }
83
- })
84
- );
85
- }
86
- render() {
87
- return import_lit.html`${this.xmlDoc}`;
88
- }
89
- };
90
- __decorateClass([
91
- (0, import_decorators.property)({ type: String })
92
- ], QtiAssessmentItemRef.prototype, "category", 2);
93
- __decorateClass([
94
- (0, import_decorators.property)({ type: String })
95
- ], QtiAssessmentItemRef.prototype, "identifier", 2);
96
- __decorateClass([
97
- (0, import_decorators.property)({ type: Boolean, converter: stringToBooleanConverter })
98
- ], QtiAssessmentItemRef.prototype, "required", 2);
99
- __decorateClass([
100
- (0, import_decorators.property)({ type: Boolean, converter: stringToBooleanConverter })
101
- ], QtiAssessmentItemRef.prototype, "fixed", 2);
102
- __decorateClass([
103
- (0, import_decorators.property)({ type: String })
104
- ], QtiAssessmentItemRef.prototype, "href", 2);
105
- __decorateClass([
106
- (0, import_context2.consume)({ context: testContext, subscribe: true })
107
- ], QtiAssessmentItemRef.prototype, "_testContext", 2);
108
- __decorateClass([
109
- (0, import_decorators.property)({ type: Object, attribute: false })
110
- ], QtiAssessmentItemRef.prototype, "xmlDoc", 2);
111
- if (!customElements.get("qti-assessment-item-ref")) {
112
- customElements.define("qti-assessment-item-ref", QtiAssessmentItemRef);
113
- }
114
-
115
- // src/lib/qti-test/qti-assessment-test/qti-assessment-section.ts
116
- var import_context4 = require("@lit/context");
117
- var import_lit2 = require("lit");
118
- var import_decorators2 = require("lit/decorators.js");
119
- var stringToBooleanConverter2 = {
120
- fromAttribute(value) {
121
- return value === "true";
122
- },
123
- toAttribute(value) {
124
- return value ? "true" : "false";
125
- }
126
- };
127
- var QtiAssessmentSection = class extends import_lit2.LitElement {
128
- async connectedCallback() {
129
- super.connectedCallback();
130
- await this.updateComplete;
131
- this.dispatchEvent(
132
- new Event("qti-assessment-section-connected", {
133
- bubbles: true,
134
- composed: true
135
- })
136
- );
137
- }
138
- render() {
139
- return import_lit2.html`<slot name="qti-rubric-block"></slot><slot></slot>`;
140
- }
141
- };
142
- __decorateClass([
143
- (0, import_decorators2.property)({ type: String })
144
- ], QtiAssessmentSection.prototype, "identifier", 2);
145
- __decorateClass([
146
- (0, import_decorators2.property)({ type: String })
147
- ], QtiAssessmentSection.prototype, "required", 2);
148
- __decorateClass([
149
- (0, import_decorators2.property)({ type: Boolean, converter: stringToBooleanConverter2 })
150
- ], QtiAssessmentSection.prototype, "fixed", 2);
151
- __decorateClass([
152
- (0, import_decorators2.property)({ type: String })
153
- ], QtiAssessmentSection.prototype, "title", 2);
154
- __decorateClass([
155
- (0, import_decorators2.property)({ type: Boolean, converter: stringToBooleanConverter2 })
156
- ], QtiAssessmentSection.prototype, "visible", 2);
157
- __decorateClass([
158
- (0, import_decorators2.property)({ type: Boolean, converter: stringToBooleanConverter2, attribute: "keep-together" })
159
- ], QtiAssessmentSection.prototype, "keepTogether", 2);
160
- __decorateClass([
161
- (0, import_context4.consume)({ context: testContext, subscribe: true })
162
- ], QtiAssessmentSection.prototype, "_testContext", 2);
163
- if (!customElements.get("qti-assessment-section")) {
164
- customElements.define("qti-assessment-section", QtiAssessmentSection);
165
- }
166
-
167
- // src/lib/qti-test/qti-assessment-test/qti-assessment-test.ts
168
- var import_context6 = require("@lit/context");
169
- var import_lit3 = require("lit");
170
- var import_decorators3 = require("lit/decorators.js");
171
- var QtiAssessmentTest = class extends import_lit3.LitElement {
172
- async connectedCallback() {
173
- super.connectedCallback();
174
- await this.updateComplete;
175
- this.dispatchEvent(
176
- new CustomEvent("qti-assessment-test-connected", {
177
- detail: this,
178
- bubbles: true,
179
- composed: true
180
- })
181
- );
182
- }
183
- render() {
184
- return import_lit3.html` <slot></slot>`;
185
- }
186
- };
187
- __decorateClass([
188
- (0, import_decorators3.property)({ type: String })
189
- ], QtiAssessmentTest.prototype, "identifier", 2);
190
- __decorateClass([
191
- (0, import_decorators3.property)({ type: String })
192
- ], QtiAssessmentTest.prototype, "title", 2);
193
- __decorateClass([
194
- (0, import_context6.consume)({ context: testContext, subscribe: true })
195
- ], QtiAssessmentTest.prototype, "_testContext", 2);
196
- QtiAssessmentTest = __decorateClass([
197
- (0, import_decorators3.customElement)("qti-assessment-test")
198
- ], QtiAssessmentTest);
199
-
200
- // src/lib/qti-test/qti-assessment-test/qti-test-part.ts
201
- var import_lit4 = require("lit");
202
- var import_decorators4 = require("lit/decorators.js");
203
- var QtiTestPart = class extends import_lit4.LitElement {
204
- constructor() {
205
- super(...arguments);
206
- this.identifier = "";
207
- this.title = "";
208
- this.class = "";
209
- this.NavigationMode = "nonlinear";
210
- this.submissionMode = "individual";
211
- }
212
- async connectedCallback() {
213
- super.connectedCallback();
214
- await this.updateComplete;
215
- this.dispatchEvent(
216
- new Event("qti-test-part-connected", {
217
- bubbles: true,
218
- composed: true
219
- })
220
- );
221
- }
222
- render() {
223
- return import_lit4.html` <slot></slot>`;
224
- }
225
- };
226
- __decorateClass([
227
- (0, import_decorators4.property)({ type: String })
228
- ], QtiTestPart.prototype, "identifier", 2);
229
- __decorateClass([
230
- (0, import_decorators4.property)({ type: String })
231
- ], QtiTestPart.prototype, "title", 2);
232
- __decorateClass([
233
- (0, import_decorators4.property)({ type: String })
234
- ], QtiTestPart.prototype, "class", 2);
235
- __decorateClass([
236
- (0, import_decorators4.property)({ type: String, attribute: "navigation-mode" })
237
- ], QtiTestPart.prototype, "NavigationMode", 2);
238
- __decorateClass([
239
- (0, import_decorators4.property)({ type: String, attribute: "submission-mode" })
240
- ], QtiTestPart.prototype, "submissionMode", 2);
241
- QtiTestPart = __decorateClass([
242
- (0, import_decorators4.customElement)("qti-test-part")
243
- ], QtiTestPart);
244
- if (!customElements.get("qti-test-part")) {
245
- customElements.define("qti-test-part", QtiTestPart);
246
- }
247
-
248
- // src/lib/qti-test/qti-test.ts
249
- var import_lit6 = require("lit");
250
- var import_decorators6 = require("lit/decorators.js");
251
-
252
- // src/lib/qti-transformers/qti-transformers.ts
253
- var xml = String.raw;
254
- var xmlToHTML = xml`<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
255
- <xsl:output method="html" version="5.0" encoding="UTF-8" indent="yes" />
256
- <xsl:template match="@*|node()">
257
- <xsl:copy>
258
- <xsl:apply-templates select="@*|node()"/>
259
- </xsl:copy>
260
- </xsl:template>
261
-
262
- <!-- remove existing namespaces -->
263
- <xsl:template match="*">
264
- <!-- remove element prefix -->
265
- <xsl:element name="{local-name()}">
266
- <!-- process attributes -->
267
- <xsl:for-each select="@*">
268
- <!-- remove attribute prefix -->
269
- <xsl:attribute name="{local-name()}">
270
- <xsl:value-of select="."/>
271
- </xsl:attribute>
272
- </xsl:for-each>
273
- <xsl:apply-templates/>
274
- </xsl:element>
275
- </xsl:template>
276
- </xsl:stylesheet>`;
277
- function extendElementName(xmlFragment, tagName, extension) {
278
- xmlFragment.querySelectorAll(tagName).forEach((element) => {
279
- const newTagName = `${tagName}-${extension}`;
280
- const newElement = createElementWithNewTagName(element, newTagName);
281
- element.replaceWith(newElement);
282
- });
283
- }
284
- function extendElementsWithClass(xmlFragment, classNamePattern) {
285
- xmlFragment.querySelectorAll("*").forEach((element) => {
286
- const classList = element.classList;
287
- if (classList) {
288
- classList.forEach((className) => {
289
- if (className.startsWith(`${classNamePattern}:`)) {
290
- const suffix = className.slice(`${classNamePattern}:`.length);
291
- const newTagName = `${element.nodeName}-${suffix}`;
292
- const newElement = createElementWithNewTagName(element, newTagName);
293
- element.replaceWith(newElement);
294
- }
295
- });
296
- }
297
- });
298
- }
299
- function createElementWithNewTagName(element, newTagName) {
300
- const newElement = document.createElement(newTagName);
301
- for (const attr of element.attributes) {
302
- newElement.setAttribute(attr.name, attr.value);
303
- }
304
- while (element.firstChild) {
305
- newElement.appendChild(element.firstChild);
306
- }
307
- return newElement;
308
- }
309
- function itemsFromTest(xmlFragment) {
310
- const items = [];
311
- xmlFragment.querySelectorAll("qti-assessment-item-ref").forEach((el) => {
312
- const identifier = el.getAttribute("identifier");
313
- const href = el.getAttribute("href");
314
- const category = el.getAttribute("category");
315
- items.push({ identifier, href, category });
316
- });
317
- return items;
318
- }
319
- var currentRequest = null;
320
- function loadXML(url, cancelPreviousRequest = false) {
321
- if (cancelPreviousRequest && currentRequest !== null) {
322
- currentRequest.abort();
323
- }
324
- return new Promise((resolve, reject) => {
325
- const xhr = new XMLHttpRequest();
326
- currentRequest = xhr;
327
- xhr.open("GET", url, true);
328
- xhr.responseType = "document";
329
- xhr.onload = () => {
330
- if (xhr.status >= 200 && xhr.status < 300) {
331
- resolve(xhr.responseXML);
332
- } else {
333
- reject(xhr.statusText);
334
- }
335
- };
336
- xhr.onerror = () => {
337
- reject(xhr.statusText);
338
- };
339
- xhr.send();
340
- });
341
- }
342
- function parseXML(xmlDocument) {
343
- const parser = new DOMParser();
344
- const xmlFragment = parser.parseFromString(xmlDocument, "text/xml");
345
- return xmlFragment;
346
- }
347
- function toHTML(xmlFragment) {
348
- const processor = new XSLTProcessor();
349
- const xsltDocument = new DOMParser().parseFromString(xmlToHTML, "text/xml");
350
- processor.importStylesheet(xsltDocument);
351
- const itemHTMLFragment = processor.transformToFragment(xmlFragment, document);
352
- return itemHTMLFragment;
353
- }
354
- function setLocation(xmlFragment, location) {
355
- if (!location.endsWith("/")) {
356
- location += "/";
357
- }
358
- xmlFragment.querySelectorAll("[src],[href],[primary-path]").forEach((elWithSrc) => {
359
- let attr = "";
360
- if (elWithSrc.getAttribute("src")) {
361
- attr = "src";
362
- }
363
- if (elWithSrc.getAttribute("href")) {
364
- attr = "href";
365
- }
366
- if (elWithSrc.getAttribute("primary-path")) {
367
- attr = "primary-path";
368
- }
369
- const attrValue = elWithSrc.getAttribute(attr)?.trim();
370
- if (!attrValue.startsWith("data:") && !attrValue.startsWith("http")) {
371
- const newSrcValue = location + encodeURI(attrValue);
372
- elWithSrc.setAttribute(attr, newSrcValue);
373
- }
374
- });
375
- }
376
- function convertCDATAtoComment(xmlFragment) {
377
- const cdataElements = xmlFragment.querySelectorAll('qti-custom-operator[class="js.org"] > qti-base-value');
378
- cdataElements.forEach((element) => {
379
- const commentText = document.createComment(element.textContent);
380
- element.replaceChild(commentText, element.firstChild);
381
- });
382
- }
383
- function stripStyleSheets(xmlFragment) {
384
- xmlFragment.querySelectorAll("qti-stylesheet").forEach((stylesheet) => stylesheet.remove());
385
- }
386
-
387
- // src/lib/qti-transformers/qti-transform-item.ts
388
- var qtiTransformItem = () => {
389
- let xmlFragment;
390
- const api = {
391
- async load(uri, cancelPreviousRequest = false) {
392
- return new Promise((resolve) => {
393
- loadXML(uri, cancelPreviousRequest).then((xml2) => {
394
- xmlFragment = xml2;
395
- api.path(uri.substring(0, uri.lastIndexOf("/")));
396
- return resolve(api);
397
- });
398
- });
399
- },
400
- parse(xmlString) {
401
- xmlFragment = parseXML(xmlString);
402
- return api;
403
- },
404
- path: (location) => {
405
- setLocation(xmlFragment, location);
406
- return api;
407
- },
408
- fn(fn) {
409
- fn(xmlFragment);
410
- return api;
411
- },
412
- pciHooks(uri) {
413
- const attributes = ["hook", "module"];
414
- const documentPath = uri.substring(0, uri.lastIndexOf("/"));
415
- for (const attribute of attributes) {
416
- const srcAttributes = xmlFragment.querySelectorAll("[" + attribute + "]");
417
- srcAttributes.forEach((node) => {
418
- const srcValue = node.getAttribute(attribute);
419
- if (!srcValue.startsWith("data:") && !srcValue.startsWith("http")) {
420
- node.setAttribute("base-url", uri);
421
- node.setAttribute(
422
- "module",
423
- documentPath + "/" + encodeURI(srcValue + (srcValue.endsWith(".js") ? "" : ".js"))
424
- );
425
- }
426
- });
427
- }
428
- return api;
429
- },
430
- extendElementName: (tagName, extension) => {
431
- extendElementName(xmlFragment, tagName, extension);
432
- return api;
433
- },
434
- extendElementsWithClass: (param = "extend") => {
435
- extendElementsWithClass(xmlFragment, param);
436
- return api;
437
- },
438
- customInteraction(baseRef, baseItem) {
439
- const qtiCustomInteraction = xmlFragment.querySelector("qti-custom-interaction");
440
- const qtiCustomInteractionObject = qtiCustomInteraction.querySelector("object");
441
- qtiCustomInteraction.setAttribute("data-base-ref", baseRef);
442
- qtiCustomInteraction.setAttribute("data-base-item", baseRef + baseItem);
443
- qtiCustomInteraction.setAttribute("data", qtiCustomInteractionObject.getAttribute("data"));
444
- qtiCustomInteraction.setAttribute("width", qtiCustomInteractionObject.getAttribute("width"));
445
- qtiCustomInteraction.setAttribute("height", qtiCustomInteractionObject.getAttribute("height"));
446
- qtiCustomInteraction.removeChild(qtiCustomInteractionObject);
447
- return api;
448
- },
449
- convertCDATAtoComment() {
450
- convertCDATAtoComment(xmlFragment);
451
- return api;
452
- },
453
- stripStyleSheets() {
454
- stripStyleSheets(xmlFragment);
455
- return api;
456
- },
457
- html() {
458
- return new XMLSerializer().serializeToString(toHTML(xmlFragment));
459
- },
460
- xml() {
461
- return new XMLSerializer().serializeToString(xmlFragment);
462
- },
463
- htmlDoc() {
464
- return toHTML(xmlFragment);
465
- },
466
- xmlDoc() {
467
- return xmlFragment;
468
- }
469
- };
470
- return api;
471
- };
472
-
473
- // src/lib/qti-transformers/qti-transform-test.ts
474
- var qtiTransformTest = () => {
475
- let xmlFragment;
476
- const api = {
477
- async load(uri) {
478
- return new Promise((resolve, _) => {
479
- loadXML(uri).then((xml2) => {
480
- xmlFragment = xml2;
481
- return resolve(api);
482
- });
483
- });
484
- },
485
- parse(xmlString) {
486
- xmlFragment = parseXML(xmlString);
487
- return api;
488
- },
489
- fn(fn) {
490
- fn(xmlFragment);
491
- return api;
492
- },
493
- items() {
494
- return itemsFromTest(xmlFragment);
495
- },
496
- html() {
497
- return new XMLSerializer().serializeToString(toHTML(xmlFragment));
498
- },
499
- xml() {
500
- return new XMLSerializer().serializeToString(xmlFragment);
501
- },
502
- htmlDoc() {
503
- return toHTML(xmlFragment);
504
- },
505
- xmlDoc() {
506
- return xmlFragment;
507
- }
508
- };
509
- return api;
510
- };
511
-
512
- // src/lib/qti-test/mixins/test-loader.mixin.ts
513
- var TestLoaderMixin = (superClass) => {
514
- class TestLoaderClass extends superClass {
515
- constructor(...args) {
516
- super(...args);
517
- this.testURL = "";
518
- this.addEventListener("qti-load-test-request", (e) => {
519
- const { testURL } = e.detail;
520
- if (!testURL) {
521
- console.warn(
522
- "No test found, there should be an aattribute test-url with the path to the test on the test-container"
523
- );
524
- } else {
525
- this.testURL = testURL;
526
- }
527
- e.detail.promise = (async () => {
528
- e.preventDefault();
529
- const api = await qtiTransformTest().load(`${this.testURL}`);
530
- return api.htmlDoc();
531
- })();
532
- });
533
- this.addEventListener("qti-assessment-test-connected", () => {
534
- });
535
- this.addEventListener("qti-load-item-request", ({ detail }) => {
536
- if (!this.testURL) return;
537
- detail.promise = (async () => {
538
- const api = await qtiTransformItem().load(
539
- `${this.testURL.slice(0, this.testURL.lastIndexOf("/"))}/${detail.href}`,
540
- detail.cancelPreviousRequest
541
- );
542
- return api.htmlDoc();
543
- })();
544
- });
545
- this.addEventListener("qti-interaction-changed", (e) => {
546
- });
547
- this.addEventListener("qti-outcome-changed", () => {
548
- });
549
- }
550
- }
551
- return TestLoaderClass;
552
- };
553
-
554
- // src/lib/qti-test/mixins/test-navigation.mixin.ts
555
- var TestNavigationMixin = (superClass) => {
556
- class TestNavigationClass extends superClass {
557
- constructor(...args) {
558
- super(...args);
559
- this.addEventListener("qti-request-test-item", ({ detail: navItemId }) => {
560
- if (!navItemId) return;
561
- this._clearLoadedItems();
562
- const itemRefEl = this.testElement.el.querySelector(`qti-assessment-item-ref[identifier="${navItemId}"]`);
563
- const promise = this._loadItemRequest(itemRefEl.href, true);
564
- const navPartId = itemRefEl.closest("qti-test-part").identifier;
565
- const navSectionId = itemRefEl.closest("qti-assessment-section").identifier;
566
- this._testContext = { ...this._testContext, navPartId, navSectionId, navItemId, navItemLoading: true };
567
- if (promise) {
568
- promise.then((doc) => {
569
- itemRefEl.xmlDoc = doc;
570
- requestAnimationFrame(() => this.dispatchEvent(new CustomEvent("qti-item-connected", { bubbles: true, composed: true })));
571
- this._testContext = { ...this._testContext, navItemLoading: false };
572
- }).catch((error) => console.error("Failed to load item:", error));
573
- } else {
574
- console.info("Load item request was not handled:", itemRefEl.href);
575
- }
576
- });
577
- this.addEventListener("qti-assessment-test-connected", () => {
578
- let navItemId = this._testContext.navItemId;
579
- if (!navItemId) {
580
- const itemRefEl = this.testElement.el.querySelector("qti-assessment-item-ref");
581
- navItemId = itemRefEl.identifier;
582
- }
583
- this.dispatchEvent(new CustomEvent("qti-request-test-item", { detail: navItemId, bubbles: true, composed: true }));
584
- });
585
- }
586
- _clearLoadedItems() {
587
- const itemRefEls = this.testElement.el.querySelectorAll(`qti-assessment-test qti-assessment-item-ref`);
588
- Array.from(itemRefEls).forEach((itemElement) => {
589
- itemElement.xmlDoc = null;
590
- });
591
- }
592
- _loadItemRequest(href, cancelPreviousRequest = true) {
593
- const event = new CustomEvent("qti-load-item-request", {
594
- bubbles: true,
595
- composed: true,
596
- detail: {
597
- href,
598
- promise: null,
599
- cancelPreviousRequest
600
- }
601
- });
602
- this.dispatchEvent(event);
603
- return event.detail.promise;
604
- }
605
- }
606
- return TestNavigationClass;
607
- };
608
-
609
- // src/lib/qti-test/mixins/test-view.mixin.ts
610
- var TestViewMixin = (superClass) => {
611
- class TestViewClass extends superClass {
612
- constructor(...args) {
613
- super(...args);
614
- this._testContext = { ...this._testContext, view: "candidate" };
615
- this.addEventListener("on-test-switch-view", (e) => {
616
- this._testContext = { ...this._testContext, view: e.detail };
617
- this._updateElementView();
618
- });
619
- this.addEventListener("qti-assessment-test-connected", () => {
620
- this._updateElementView();
621
- });
622
- this.addEventListener("qti-assessment-item-connected", (e) => {
623
- this._updateElementView();
624
- this._setCorrectResponseVisibility(e.detail);
625
- });
626
- }
627
- willUpdate(changedProperties) {
628
- super.willUpdate(changedProperties);
629
- if (changedProperties.has("_testContext")) {
630
- this._updateElementView();
631
- }
632
- }
633
- // Method to handle view updates for elements based on the current context view
634
- _updateElementView() {
635
- if (this.testElement && this.testElement.el) {
636
- const viewElements = Array.from(this.testElement.el.querySelectorAll("[view]"));
637
- viewElements.forEach((element) => {
638
- element.classList.toggle("show", element.getAttribute("view") === this._testContext.view);
639
- });
640
- const assessmentItem = this.testElement.el.querySelector(
641
- `qti-assessment-item[identifier="${this._testContext.navItemId}"]`
642
- );
643
- if (assessmentItem) {
644
- assessmentItem.showCorrectResponse(this._testContext.view === "scorer");
645
- }
646
- }
647
- }
648
- // Event handler for connected QTI assessment items
649
- _setCorrectResponseVisibility(assessmentItem) {
650
- assessmentItem.showCorrectResponse(this._testContext.view === "scorer");
651
- }
652
- }
653
- return TestViewClass;
654
- };
655
-
656
- // src/lib/qti-test/test-base.ts
657
- var import_context8 = require("@lit/context");
658
- var import_lit5 = require("lit");
659
- var import_decorators5 = require("lit/decorators.js");
660
- var TestBase = class extends import_lit5.LitElement {
661
- constructor() {
662
- super();
663
- this._testContext = { items: [], testOutcomeVariables: [] };
664
- this.testElement = { el: null };
665
- /**
666
- * Updates the variables of an assessment item in the test context.
667
- * - Matches the assessment item with the corresponding test context item.
668
- * - If the item is not found, logs a warning.
669
- * - Updates variables in the test context if exactly one variable exists.
670
- * - Otherwise, syncs the assessment item's variables with the test context.
671
- *
672
- * @param assessmentItem - The assessment item to update.
673
- */
674
- this._updateItemInTestContext = (assessmentItem) => {
675
- const { identifier, variables } = assessmentItem;
676
- const itemContext = this._testContext.items.find((i) => i?.identifier === identifier);
677
- if (!itemContext) {
678
- console.warn(`Item IDs between assessment.xml and item.xml should match: ${identifier} is not found!`);
679
- return;
680
- }
681
- if (itemContext.variables?.length === 1) {
682
- this._updateItemVariablesInTestContext(identifier, variables);
683
- } else {
684
- assessmentItem.variables = [...itemContext.variables || []];
685
- }
686
- };
687
- this.addEventListener("qti-assessment-test-connected", (e) => {
688
- const qtiAssessmentTest = e.detail;
689
- const items = Array.from(qtiAssessmentTest.querySelectorAll("qti-assessment-item-ref")).map(
690
- (itemRef) => ({
691
- href: itemRef.href,
692
- identifier: itemRef.identifier,
693
- category: itemRef.category,
694
- variables: [{ identifier: "completionStatus", value: "not_attempted", type: "outcome" }]
695
- })
696
- );
697
- this.testElement = { el: qtiAssessmentTest };
698
- this._testContext = { ...this._testContext, items };
699
- });
700
- this.addEventListener("qti-assessment-item-connected", (e) => {
701
- this._updateItemInTestContext(e.detail);
702
- });
703
- this.addEventListener("qti-outcome-changed", (e) => {
704
- const assessmentitem = e.composedPath()[0];
705
- this._updateItemVariablesInTestContext(assessmentitem.identifier, assessmentitem.variables);
706
- });
707
- }
708
- get context() {
709
- return this._testContext;
710
- }
711
- // /* restores the context by updating existing items and adding new items from the "contextToRestore" parameter into the "this._context.items" array. */
712
- set context(testContext2) {
713
- if (testContext2 === null || testContext2 === void 0) return;
714
- this._testContext = { ...testContext2 };
715
- testContext2.items?.forEach((itemContext) => {
716
- const existingItemContext = this._testContext.items.find((i) => i.identifier === itemContext.identifier);
717
- if (existingItemContext) {
718
- existingItemContext.variables = itemContext.variables;
719
- } else {
720
- this._testContext.items.push(itemContext);
721
- }
722
- });
723
- }
724
- _updateItemVariablesInTestContext(identifier, variables) {
725
- this._testContext = {
726
- ...this._testContext,
727
- // Spread existing test context properties
728
- items: this._testContext.items.map((itemContext) => {
729
- if (itemContext.identifier !== identifier) {
730
- return itemContext;
731
- }
732
- return {
733
- ...itemContext,
734
- // Keep other properties of the item context
735
- variables: variables.map((variable) => {
736
- const matchingVariable = itemContext.variables.find((v) => v.identifier === variable.identifier);
737
- return matchingVariable ? { ...matchingVariable, ...variable } : variable;
738
- })
739
- };
740
- })
741
- };
742
- }
743
- // private _addItemToTestContext(
744
- // e: CustomEvent<{ href: string; identifier: string; category: string }> & { target: QtiAssessmentItemRef }
745
- // ): void {
746
- // const { href, identifier, category } = e.detail;
747
- // // Update test context items, adding a new item if the identifier is not already in the list
748
- // if (!this._testContext.items.some(item => item.identifier === identifier)) {
749
- // this._testContext.items.push({
750
- // href,
751
- // identifier,
752
- // category,
753
- // variables: [{ identifier: 'completionStatus', value: 'not_attempted', type: 'outcome' }]
754
- // // category: e.target.category
755
- // });
756
- // }
757
- // }
758
- connectedCallback() {
759
- super.connectedCallback();
760
- this.setAttribute("qti-test", "");
761
- }
762
- };
763
- __decorateClass([
764
- (0, import_decorators5.state)(),
765
- (0, import_context8.provide)({ context: testContext })
766
- ], TestBase.prototype, "_testContext", 2);
767
- __decorateClass([
768
- (0, import_decorators5.state)(),
769
- (0, import_context8.provide)({ context: testElement })
770
- ], TestBase.prototype, "testElement", 2);
771
-
772
- // src/lib/qti-test/qti-test.ts
773
- var QtiTest = class extends TestLoaderMixin(TestNavigationMixin(TestViewMixin(TestBase))) {
774
- /**
775
- * Lifecycle callback invoked when the element is added to the DOM.
776
- * Automatically appends the content of a `<template>` element (if present)
777
- * to the shadow DOM.
778
- */
779
- connectedCallback() {
780
- super.connectedCallback();
781
- const template = this.querySelector(":scope > template");
782
- if (template) {
783
- this.shadowRoot?.appendChild(template.content);
784
- }
785
- }
786
- /**
787
- * Renders the component's template.
788
- * Provides a default `<slot>` for content projection.
789
- */
790
- render() {
791
- return import_lit6.html`<slot></slot>`;
792
- }
793
- };
794
- QtiTest = __decorateClass([
795
- (0, import_decorators6.customElement)("qti-test")
796
- ], QtiTest);
797
-
798
- // src/lib/qti-test/components/test-next.ts
799
- var import_lit9 = require("lit");
800
- var import_decorators10 = require("lit/decorators.js");
801
-
802
- // src/lib/qti-test/components/styles.ts
803
- var import_lit7 = require("lit");
804
- var form = import_lit7.css`
805
- display: inline-flex;
806
- align-items: center;
807
- cursor: pointer;
808
- padding: 0.5rem 1rem;
809
- border-radius: 0.25rem;
810
- user-select: none;
811
- `;
812
- var btn = import_lit7.css`
813
- background-color: lightgray;
814
- ${form};
815
- `;
816
- var dis = import_lit7.css`
817
- cursor: not-allowed;
818
- opacity: 0.5;
819
- `;
820
- var ind = import_lit7.css`
821
- ${form};
822
- border: 1px solid gray;
823
- `;
824
-
825
- // src/lib/qti-test/components/test-component.abstract.ts
826
- var import_context10 = require("@lit/context");
827
- var import_lit8 = require("lit");
828
- var import_decorators8 = require("lit/decorators.js");
829
-
830
- // src/lib/decorators/watch.ts
831
- function watch(propertyName, options) {
832
- const resolvedOptions = {
833
- waitUntilFirstUpdate: false,
834
- ...options
835
- };
836
- return (proto, decoratedFnName) => {
837
- const { update } = proto;
838
- const watchedProperties = Array.isArray(propertyName) ? propertyName : [propertyName];
839
- proto.update = function(changedProps) {
840
- watchedProperties.forEach((property10) => {
841
- const key = property10;
842
- if (changedProps.has(key)) {
843
- const oldValue = changedProps.get(key);
844
- const newValue = this[key];
845
- if (oldValue !== newValue) {
846
- if (!resolvedOptions.waitUntilFirstUpdate || this.hasUpdated) {
847
- this[decoratedFnName](oldValue, newValue);
848
- }
849
- }
850
- }
851
- });
852
- update.call(this, changedProps);
853
- };
854
- };
855
- }
856
-
857
- // src/lib/decorators/prop-internal-state.ts
858
- var import_decorators7 = require("lit/decorators.js");
859
- function propInternalState(options) {
860
- return (protoOrDescriptor, name) => {
861
- (0, import_decorators7.property)(options)(protoOrDescriptor, name);
862
- const key = `__${name}`;
863
- Object.defineProperty(protoOrDescriptor, name, {
864
- get() {
865
- return this[key];
866
- },
867
- set(value) {
868
- const oldValue = this[key];
869
- this[key] = value;
870
- if (oldValue !== value) {
871
- if (this._internals?.states) {
872
- const stateName = name.toLowerCase();
873
- if (value) {
874
- this._internals.states.add(`--${stateName}`);
875
- } else {
876
- this._internals.states.delete(`--${stateName}`);
877
- }
878
- }
879
- if (options.aria && this._internals) {
880
- const ariaAttribute = options.aria;
881
- if (value) {
882
- this._internals[ariaAttribute] = "true";
883
- } else {
884
- this._internals[ariaAttribute] = null;
885
- }
886
- }
887
- this.requestUpdate(name, oldValue);
888
- }
889
- },
890
- configurable: true,
891
- enumerable: true
892
- });
893
- };
894
- }
895
-
896
- // src/lib/qti-test/components/test-component.abstract.ts
897
- var TestComponent = class extends import_lit8.LitElement {
898
- constructor() {
899
- super();
900
- this.disabled = true;
901
- this._internals = this.attachInternals();
902
- }
903
- _handleTestElementChange(_oldValue, newValue) {
904
- if (newValue.el) {
905
- this.disabled = false;
906
- }
907
- }
908
- willUpdate(changedProperties) {
909
- if (changedProperties.has("_testContext")) {
910
- const { items = [], navItemId } = this._testContext ?? {};
911
- this.itemIndex = items.findIndex((item) => item.identifier === navItemId);
912
- this.items = items;
913
- this.view = this._testContext?.view;
914
- }
915
- }
916
- _switchView(view) {
917
- this.dispatchEvent(
918
- new CustomEvent("on-test-switch-view", {
919
- composed: true,
920
- bubbles: true,
921
- detail: view
922
- })
923
- );
924
- }
925
- _requestItem(identifier) {
926
- this.dispatchEvent(
927
- new CustomEvent("qti-request-test-item", {
928
- composed: true,
929
- bubbles: true,
930
- detail: identifier
931
- })
932
- );
933
- }
934
- };
935
- __decorateClass([
936
- propInternalState({
937
- type: Boolean,
938
- reflect: true,
939
- aria: "ariaDisabled"
940
- // Maps to `aria-disabled` attribute
941
- })
942
- ], TestComponent.prototype, "disabled", 2);
943
- __decorateClass([
944
- (0, import_decorators8.state)(),
945
- (0, import_context10.consume)({ context: testContext, subscribe: true })
946
- ], TestComponent.prototype, "_testContext", 2);
947
- __decorateClass([
948
- (0, import_decorators8.state)(),
949
- (0, import_context10.consume)({ context: testElement, subscribe: true })
950
- ], TestComponent.prototype, "_testElement", 2);
951
- __decorateClass([
952
- watch("_testElement")
953
- ], TestComponent.prototype, "_handleTestElementChange", 1);
954
-
955
- // src/lib/qti-test/components/test-next.ts
956
- var TestNext = class extends TestComponent {
957
- constructor() {
958
- super();
959
- this._internals.role = "button";
960
- this._internals.ariaLabel = "Next item";
961
- this.addEventListener("click", (e) => {
962
- e.preventDefault();
963
- if (!this.disabled) this._requestItem(this.items[this.itemIndex + 1].identifier);
964
- });
965
- }
966
- willUpdate(changedProperties) {
967
- super.willUpdate(changedProperties);
968
- if (changedProperties.has("_testContext")) {
969
- this.disabled = !this._testElement?.el || this.itemIndex < 0 || this.itemIndex >= this.items.length - 1;
970
- }
971
- }
972
- render() {
973
- return import_lit9.html`<slot></slot>`;
974
- }
975
- };
976
- TestNext.styles = import_lit9.css`
977
- :host {
978
- ${btn};
979
- }
980
- :host([disabled]) {
981
- ${dis};
982
- }
983
- `;
984
- TestNext = __decorateClass([
985
- (0, import_decorators10.customElement)("test-next")
986
- ], TestNext);
987
-
988
- // src/lib/qti-test/components/test-prev.ts
989
- var import_lit10 = require("lit");
990
- var import_decorators11 = require("lit/decorators.js");
991
- var TestPrev = class extends TestComponent {
992
- constructor() {
993
- super();
994
- this._internals.role = "button";
995
- this._internals.ariaLabel = "Next item";
996
- this.addEventListener("click", (e) => {
997
- e.preventDefault();
998
- if (!this.disabled) this._requestItem(this.items[this.itemIndex - 1].identifier);
999
- });
1000
- }
1001
- willUpdate(changedProperties) {
1002
- super.willUpdate(changedProperties);
1003
- if (changedProperties.has("_testContext")) {
1004
- this.disabled = !this._testElement?.el || this.itemIndex === 0 || this.itemIndex === -1;
1005
- }
1006
- }
1007
- render() {
1008
- return import_lit10.html`<slot></slot>`;
1009
- }
1010
- };
1011
- TestPrev.styles = import_lit10.css`
1012
- :host {
1013
- ${btn};
1014
- }
1015
- :host([disabled]) {
1016
- ${dis};
1017
- }
1018
- `;
1019
- TestPrev = __decorateClass([
1020
- (0, import_decorators11.customElement)("test-prev")
1021
- ], TestPrev);
1022
-
1023
- // src/lib/qti-test/components/test-view.ts
1024
- var import_lit11 = require("lit");
1025
- var import_decorators12 = require("lit/decorators.js");
1026
- var TestView = class extends TestComponent {
1027
- constructor() {
1028
- super(...arguments);
1029
- this.label = "view";
1030
- this.viewOptions = "";
1031
- this._handleViewOptionsChange = (_, viewOptions) => {
1032
- console.log(viewOptions);
1033
- };
1034
- this._viewOptions = TestView.DEFAULT_VIEW_OPTIONS;
1035
- }
1036
- // updated(changedProperties: PropertyValues) {
1037
- // super.updated(changedProperties);
1038
- // if (changedProperties.has('viewOptionsString')) {
1039
- // this._updateViewOptions();
1040
- // }
1041
- // }
1042
- // private _updateViewOptions() {
1043
- // if (this.viewOptionsString) {
1044
- // const options = this.viewOptionsString.split(',').map(opt => opt.trim());
1045
- // this.viewOptions = options.filter(opt => TestView.DEFAULT_VIEW_OPTIONS.includes(opt));
1046
- // } else {
1047
- // this.viewOptions = TestView.DEFAULT_VIEW_OPTIONS;
1048
- // }
1049
- // }
1050
- render() {
1051
- return import_lit11.html`
1052
- <label part="label" for="viewSelect">${this.label}</label>
1053
- <select
1054
- part="select"
1055
- id="viewSelect"
1056
- .disabled=${this.disabled}
1057
- @change=${(e) => {
1058
- const el = e.target;
1059
- this._switchView(el.value);
1060
- }}
1061
- >
1062
- ${this._viewOptions.map((v) => import_lit11.html`<option value="${v}" ?selected=${v === this.view}>${v}</option>`)}
1063
- </select>
1064
- `;
1065
- }
1066
- };
1067
- TestView.DEFAULT_VIEW_OPTIONS = ["author", "candidate", "proctor", "scorer", "testConstructor", "tutor"];
1068
- __decorateClass([
1069
- (0, import_decorators12.property)({ type: String })
1070
- ], TestView.prototype, "label", 2);
1071
- __decorateClass([
1072
- (0, import_decorators12.property)({ type: String, attribute: "view-options" })
1073
- ], TestView.prototype, "viewOptions", 2);
1074
- __decorateClass([
1075
- watch("viewOptions")
1076
- ], TestView.prototype, "_handleViewOptionsChange", 2);
1077
- TestView = __decorateClass([
1078
- (0, import_decorators12.customElement)("test-view")
1079
- ], TestView);
1080
-
1081
- // src/lib/qti-test/components/test-item-link.ts
1082
- var import_lit12 = require("lit");
1083
- var import_decorators13 = require("lit/decorators.js");
1084
- var TestItemLink = class extends TestComponent {
1085
- constructor() {
1086
- super();
1087
- this.itemId = null;
1088
- this.addEventListener("click", () => this._requestItem(this.itemId));
1089
- }
1090
- render() {
1091
- return import_lit12.html` <slot></slot> `;
1092
- }
1093
- };
1094
- __decorateClass([
1095
- (0, import_decorators13.property)({ type: String, attribute: "item-id" })
1096
- ], TestItemLink.prototype, "itemId", 2);
1097
- TestItemLink = __decorateClass([
1098
- (0, import_decorators13.customElement)("test-item-link")
1099
- ], TestItemLink);
1100
-
1101
- // src/lib/qti-test/components/test-container.ts
1102
- var import_lit13 = require("lit");
1103
- var import_decorators14 = require("lit/decorators.js");
1104
- var import_until = require("lit/directives/until.js");
1105
-
1106
- // inline:../../../item.css?inline
1107
- var item_default = `@layer qti-base, qti-components, qti-utilities, qti-variants, qti-extended;
1108
-
1109
- :root,
1110
- :host {
1111
- /* Active colors */
1112
- --qti-bg-active: #ffecec;
1113
- --qti-border-active: #f86d70;
1114
-
1115
- /* Gap size */
1116
- --qti-gap-size: 1rem;
1117
-
1118
- /* Background colors */
1119
- --qti-bg: white;
1120
- --qti-hover-bg: #f9fafb;
1121
-
1122
- /* Light theme colors */
1123
- --qti-light-bg-active: #f0f0f0; /* Light gray */
1124
- --qti-light-border-active: #d0d0d0; /* Medium gray */
1125
-
1126
- /* Dark theme colors */
1127
- --qti-dark-bg-active: #1f2937; /* Dark gray */
1128
- --qti-dark-border-active: #64748b; /* Medium gray */
1129
-
1130
- /* Disabled colors */
1131
- --qti-disabled-bg: #f3f4f6;
1132
- --qti-disabled-color: #45484f;
1133
-
1134
- /* Border properties */
1135
- --qti-border-thickness: 2px;
1136
- --qti-border-style: solid;
1137
- --qti-border-color: #c6cad0;
1138
- --qti-border-radius: 0.3rem;
1139
- --qti-drop-border-radius: calc(var(--qti-border-radius) + var(--qti-border-thickness));
1140
-
1141
- /* Focus & active states */
1142
- --qti-focus-border-width: 5px;
1143
- --qti-focus-color: #bddcff7e;
1144
-
1145
- /* Class-specific variables */
1146
-
1147
- /* Form elements */
1148
- --qti-form-size: 1rem;
1149
-
1150
- /* Point elements */
1151
- --qti-point-size: 2rem;
1152
-
1153
- /* Order buttons */
1154
- --qti-order-size: 2rem;
1155
-
1156
- /* Generic padding for all elements */
1157
- --qti-padding-vertical: 0.5rem; /* py-2 */
1158
- --qti-padding-horizontal: 0.5rem; /* px-2 */
1159
- }
1160
-
1161
- /* SVG masks and backgrounds */
1162
-
1163
- .chevron {
1164
- 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")
1165
- no-repeat center right 6px;
1166
- }
1167
-
1168
- .handle {
1169
- background-image: radial-gradient(
1170
- circle at center,
1171
- rgb(0 0 0 / 10%) 0,
1172
- rgb(0 0 0 / 20%) 2px,
1173
- rgb(255 255 255 / 0%) 2px,
1174
- rgb(255 255 255 / 0%) 100%
1175
- );
1176
- background-repeat: repeat-y;
1177
- background-position: left center;
1178
- background-size: 14px 8px;
1179
- }
1180
-
1181
- .check-mask {
1182
- -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");
1183
- 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");
1184
- }
1185
-
1186
- /*
1187
- Following are classes that can be applied to elements and element states, so they are not used directly
1188
- The @apply directive is used to apply these classes to elements
1189
- */
1190
-
1191
- /* Apply .bordered to an element */
1192
-
1193
- .bordered {
1194
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1195
- outline: none;
1196
- }
1197
-
1198
- /* Apply .form rules for checkbox and radiobutton */
1199
-
1200
- .form {
1201
-
1202
- display: grid;
1203
- place-content: center;
1204
- width: var(--qti-form-size);
1205
- height: var(--qti-form-size);
1206
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1207
- outline: none;
1208
- }
1209
-
1210
- /* Apply .button rules for button-like elements, such as drags and buttons */
1211
-
1212
- .button {
1213
-
1214
- border-radius: var(--qti-border-radius);
1215
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
1216
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1217
- outline: none;
1218
- }
1219
-
1220
- /* Apply .select for the select dropdown element */
1221
-
1222
- .select {
1223
-
1224
- border-radius: var(--qti-border-radius);
1225
- position: relative;
1226
- -webkit-appearance: none;
1227
- -moz-appearance: none;
1228
- appearance: none;
1229
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
1230
- padding-right: calc(var(--qti-padding-horizontal) + 1.5rem); /* 1.5rem for the chevron */ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color); outline: none; 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")
1231
- no-repeat center right 6px;
1232
- }
1233
-
1234
- /* Apply .text for the input text and textarea */
1235
-
1236
- .text {
1237
-
1238
- border-radius: 0;
1239
- cursor: text;
1240
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
1241
- background: unset;
1242
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1243
- outline: none;
1244
- }
1245
-
1246
- /* Apply .spot for hotspot shapes */
1247
-
1248
- .spot {
1249
-
1250
- width: 100%;
1251
- height: 100%;
1252
- background-color: transparent;
1253
- padding: 0;
1254
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1255
- outline: none;
1256
- }
1257
-
1258
- /* Apply .point for circular small hotspots */
1259
-
1260
- .point {
1261
-
1262
- border-radius: 100%;
1263
- width: var(--qti-point-size);
1264
- height: var(--qti-point-size);
1265
- background-color: transparent;
1266
- padding: 0;
1267
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1268
- outline: none;
1269
- }
1270
-
1271
- /* Apply .drag for draggable elements */
1272
-
1273
- .drag {
1274
-
1275
- transition:
1276
- transform 200ms ease-out,
1277
- box-shadow 200ms ease-out,
1278
- rotate 200ms ease-out;
1279
- cursor: grab;
1280
- background-color: var(--qti-bg);
1281
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
1282
- border-radius: var(--qti-border-radius);
1283
- padding-left: calc(var(--qti-padding-horizontal) + 0.5rem) !important; /* 1.5rem for the drag */ border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color); outline: none; background-image: radial-gradient(
1284
- circle at center,
1285
- rgb(0 0 0 / 10%) 0,
1286
- rgb(0 0 0 / 20%) 2px,
1287
- rgb(255 255 255 / 0%) 2px,
1288
- rgb(255 255 255 / 0%) 100%
1289
- ); background-repeat: repeat-y; background-position: left center; background-size: 14px 8px;
1290
- }
1291
-
1292
- /* Apply .dragging for the dragging state of a draggable element */
1293
-
1294
- .dragging {
1295
- pointer-events: none;
1296
- rotate: -2deg;
1297
- box-shadow:
1298
- 0 8px 12px rgb(0 0 0 / 20%),
1299
- 0 4px 8px rgb(0 0 0 / 10%);
1300
- }
1301
-
1302
- /* Apply .drop for an element where you can drop the draggable */
1303
-
1304
- .drop {
1305
-
1306
- background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
1307
- center no-repeat;
1308
- border-radius: var(--qti-border-radius);
1309
- position: relative;
1310
- background-color: var(--qti-bg);
1311
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1312
- outline: none;
1313
- }
1314
-
1315
- /* Apply .dropping for an indicator where you can drop the draggable */
1316
-
1317
- .dropping {
1318
- background-color: var(--qti-bg-active);
1319
- }
1320
-
1321
- /* Apply .order for a small circular button */
1322
-
1323
- .order {
1324
-
1325
- display: grid;
1326
- place-content: center;
1327
-
1328
- /* background-color: var(--qti-bg-active); */
1329
- border-radius: 100%;
1330
- width: var(--qti-order-size);
1331
- height: var(--qti-order-size);
1332
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1333
- outline: none;
1334
- }
1335
-
1336
- /* Apply .check-size for radio and checkbox size */
1337
-
1338
- .check-size {
1339
- width: calc(var(--qti-form-size) - 6px);
1340
- height: calc(var(--qti-form-size) - 6px);
1341
- }
1342
-
1343
- /* Apply .check for checkbox */
1344
-
1345
- .check {
1346
- gap: 0.5rem;
1347
- border-radius: var(--qti-border-radius);
1348
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
1349
- outline: none;
1350
- cursor: pointer;
1351
- }
1352
-
1353
- /* Apply .check-radio for outer circle of the radio buttons */
1354
-
1355
- .check-radio {
1356
-
1357
- border-radius: 100%;
1358
-
1359
- display: grid;
1360
-
1361
- place-content: center;
1362
-
1363
- width: var(--qti-form-size);
1364
-
1365
- height: var(--qti-form-size);
1366
-
1367
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1368
-
1369
- outline: none;
1370
- }
1371
-
1372
- /* Apply .check-radio-checked for the inner checked radio */
1373
-
1374
- .check-radio-checked {
1375
- background-color: var(--qti-border-active);
1376
- border-radius: 100%;
1377
- }
1378
-
1379
- /* Apply .check-checkbox for outer square of the checkbox */
1380
-
1381
- .check-checkbox {
1382
-
1383
- display: flex;
1384
- place-items: center;
1385
- border-radius: var(--qti-border-radius);
1386
- display: grid;
1387
- place-content: center;
1388
- width: var(--qti-form-size);
1389
- height: var(--qti-form-size);
1390
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
1391
- outline: none;
1392
- }
1393
-
1394
- /* Apply .check-checkbox-checked for the inner checkmark */
1395
-
1396
- .check-checkbox-checked {
1397
- background-color: var(--qti-border-active);
1398
- -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");
1399
- 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");
1400
- }
1401
-
1402
- /* Apply .hov for hover state */
1403
-
1404
- .hov {
1405
- background-color: var(--qti-hover-bg);
1406
- }
1407
-
1408
- /* Apply .foc for focus state */
1409
-
1410
- .foc {
1411
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
1412
- }
1413
-
1414
- /* Apply .act for active state */
1415
-
1416
- .act {
1417
- border-color: var(--qti-border-active);
1418
- background-color: var(--qti-bg-active);
1419
- }
1420
-
1421
- .act-bg {
1422
- background-color: var(--qti-bg-active);
1423
- }
1424
-
1425
- .act-bor {
1426
- border-color: var(--qti-border-active);
1427
- }
1428
-
1429
- /* Apply .rdo for readonly state */
1430
-
1431
- .rdo {
1432
- cursor: pointer;
1433
- background-color: var(--qti-bg);
1434
- outline: 0;
1435
- border: none;
1436
- }
1437
-
1438
- /* Apply .dis for disabled state */
1439
-
1440
- .dis {
1441
- cursor: not-allowed;
1442
- background-color: var(--qti-disabled-bg);
1443
- color: var(--qti-disabled-color);
1444
- border-color: var(--qti-border-color);
1445
- outline: 4px solid var(--qti-disabled-bg);
1446
- }
1447
-
1448
- /* base */
1449
-
1450
- /* ============================
1451
- QTI 3 shared css
1452
- 1. Display
1453
- 2. Special Flex styles
1454
- 3. Margin
1455
- 4. Padding
1456
- 5. Horizontal Alignment styles
1457
- 6. Vertical Alignment styles
1458
- 7. Height
1459
- 8. Width
1460
- 9. Text-Indent
1461
- 10. List Style
1462
- 11. Layout
1463
- 12. Other QTI 3 presentation utilities
1464
- ============================ */
1465
-
1466
- /* ==========
1467
- Display css
1468
- =========== */
1469
-
1470
- .qti-display-inline {
1471
- display: inline;
1472
- }
1473
-
1474
- .qti-display-inline-block {
1475
- display: inline-block;
1476
- }
1477
-
1478
- .qti-display-block {
1479
- display: block;
1480
- }
1481
-
1482
- .qti-display-flex {
1483
- display: flexbox;
1484
- display: flex;
1485
- }
1486
-
1487
- .qti-display-inline-flex {
1488
- display: inline-flex;
1489
- }
1490
-
1491
- .qti-display-grid {
1492
- display: grid;
1493
- }
1494
-
1495
- .qti-display-inline-grid {
1496
- display: inline-grid;
1497
- }
1498
-
1499
- .qti-display-table {
1500
- display: table;
1501
- }
1502
-
1503
- .qti-display-table-cell {
1504
- display: table-cell;
1505
- }
1506
-
1507
- .qti-display-table-row {
1508
- display: table-row;
1509
- }
1510
-
1511
- .qti-display-list-item {
1512
- display: list-item;
1513
- }
1514
-
1515
- .qti-display-inherit {
1516
- display: inherit;
1517
- }
1518
-
1519
- /*
1520
- * hidden to screen readers and sighted
1521
- */
1522
-
1523
- .qti-hidden {
1524
- display: none;
1525
- }
1526
-
1527
- /*
1528
- * visible to screen readers, hidden to sighted
1529
- */
1530
-
1531
- .qti-visually-hidden {
1532
- position: fixed !important;
1533
- overflow: hidden;
1534
- clip: rect(1px 1px 1px 1px);
1535
- height: 1px;
1536
- width: 1px;
1537
- border: 0;
1538
- margin: -1px;
1539
- }
1540
-
1541
- /* =============================
1542
- Special flex styles
1543
- ============================= */
1544
-
1545
- .qti-flex-direction-column {
1546
- flex-direction: column;
1547
- }
1548
-
1549
- .qti-flex-direction-row {
1550
- flex-direction: row;
1551
- }
1552
-
1553
- .qti-flex-grow-1 {
1554
- flex-grow: 1;
1555
- }
1556
-
1557
- .qti-flex-grow-0 {
1558
- flex-grow: 0;
1559
- }
1560
-
1561
- /* =========
1562
- Margin css
1563
- ========== */
1564
-
1565
- /**
1566
- * For margin Top and Bottom and Left and Right
1567
- */
1568
-
1569
- .qti-margin-0 {
1570
- margin: 0 !important;
1571
- }
1572
-
1573
- .qti-margin-1 {
1574
- margin: 0.25rem !important;
1575
- }
1576
-
1577
- .qti-margin-2 {
1578
- margin: 0.5rem !important;
1579
- }
1580
-
1581
- .qti-margin-3 {
1582
- margin: 1rem !important;
1583
- }
1584
-
1585
- .qti-margin-4 {
1586
- margin: 1.5rem !important;
1587
- }
1588
-
1589
- .qti-margin-5 {
1590
- margin: 3rem !important;
1591
- }
1592
-
1593
- .qti-margin-auto {
1594
- margin: auto !important;
1595
- }
1596
-
1597
- /*
1598
- For margin Left and Right
1599
- */
1600
-
1601
- .qti-margin-x-0 {
1602
- margin-right: 0 !important;
1603
- margin-left: 0 !important;
1604
- }
1605
-
1606
- .qti-margin-x-1 {
1607
- margin-right: 0.25rem !important;
1608
- margin-left: 0.25rem !important;
1609
- }
1610
-
1611
- .qti-margin-x-2 {
1612
- margin-right: 0.5rem !important;
1613
- margin-left: 0.5rem !important;
1614
- }
1615
-
1616
- .qti-margin-x-3 {
1617
- margin-right: 1rem !important;
1618
- margin-left: 1rem !important;
1619
- }
1620
-
1621
- .qti-margin-x-4 {
1622
- margin-right: 1.5rem !important;
1623
- margin-left: 1.5rem !important;
1624
- }
1625
-
1626
- .qti-margin-x-5 {
1627
- margin-right: 3rem !important;
1628
- margin-left: 3rem !important;
1629
- }
1630
-
1631
- .qti-margin-x-auto {
1632
- margin-right: auto !important;
1633
- margin-left: auto !important;
1634
- }
1635
-
1636
- /*
1637
- For margin Top and Bottom
1638
- */
1639
-
1640
- .qti-margin-y-0 {
1641
- margin-top: 0 !important;
1642
- margin-bottom: 0 !important;
1643
- }
1644
-
1645
- .qti-margin-y-1 {
1646
- margin-top: 0.25rem !important;
1647
- margin-bottom: 0.25rem !important;
1648
- }
1649
-
1650
- .qti-margin-y-2 {
1651
- margin-top: 0.5rem !important;
1652
- margin-bottom: 0.5rem !important;
1653
- }
1654
-
1655
- .qti-margin-y-3 {
1656
- margin-top: 1rem !important;
1657
- margin-bottom: 1rem !important;
1658
- }
1659
-
1660
- .qti-margin-y-4 {
1661
- margin-top: 1.5rem !important;
1662
- margin-bottom: 1.5rem !important;
1663
- }
1664
-
1665
- .qti-margin-y-5 {
1666
- margin-top: 3rem !important;
1667
- margin-bottom: 3rem !important;
1668
- }
1669
-
1670
- .qti-margin-y-auto {
1671
- margin-top: auto !important;
1672
- margin-bottom: auto !important;
1673
- }
1674
-
1675
- /*
1676
- For margin Top
1677
- */
1678
-
1679
- .qti-margin-t-0 {
1680
- margin-top: 0 !important;
1681
- }
1682
-
1683
- .qti-margin-t-1 {
1684
- margin-top: 0.25rem !important;
1685
- }
1686
-
1687
- .qti-margin-t-2 {
1688
- margin-top: 0.5rem !important;
1689
- }
1690
-
1691
- .qti-margin-t-3 {
1692
- margin-top: 1rem !important;
1693
- }
1694
-
1695
- .qti-margin-t-4 {
1696
- margin-top: 1.5rem !important;
1697
- }
1698
-
1699
- .qti-margin-t-5 {
1700
- margin-top: 3rem !important;
1701
- }
1702
-
1703
- .qti-margin-t-auto {
1704
- margin-top: auto !important;
1705
- }
1706
-
1707
- /*
1708
- For margin Bottom
1709
- */
1710
-
1711
- .qti-margin-b-0 {
1712
- margin-bottom: 0 !important;
1713
- }
1714
-
1715
- .qti-margin-b-1 {
1716
- margin-bottom: 0.25rem !important;
1717
- }
1718
-
1719
- .qti-margin-b-2 {
1720
- margin-bottom: 0.5rem !important;
1721
- }
1722
-
1723
- .qti-margin-b-3 {
1724
- margin-bottom: 1rem !important;
1725
- }
1726
-
1727
- .qti-margin-b-4 {
1728
- margin-bottom: 1.5rem !important;
1729
- }
1730
-
1731
- .qti-margin-b-5 {
1732
- margin-bottom: 3rem !important;
1733
- }
1734
-
1735
- .qti-margin-b-auto {
1736
- margin-bottom: auto !important;
1737
- }
1738
-
1739
- /*
1740
- For margin Start LTR
1741
- */
1742
-
1743
- .qti-margin-s-0 {
1744
- margin-left: 0 !important;
1745
- }
1746
-
1747
- .qti-margin-s-1 {
1748
- margin-left: 0.25rem !important;
1749
- }
1750
-
1751
- .qti-margin-s-2 {
1752
- margin-left: 0.5rem !important;
1753
- }
1754
-
1755
- .qti-margin-s-3 {
1756
- margin-left: 1rem !important;
1757
- }
1758
-
1759
- .qti-margin-s-4 {
1760
- margin-left: 1.5rem !important;
1761
- }
1762
-
1763
- .qti-margin-s-5 {
1764
- margin-left: 3rem !important;
1765
- }
1766
-
1767
- .qti-margin-s-auto {
1768
- margin-left: auto !important;
1769
- }
1770
-
1771
- /*
1772
- For margin End LTR
1773
- */
1774
-
1775
- .qti-margin-e-0 {
1776
- margin-right: 0 !important;
1777
- }
1778
-
1779
- .qti-margin-e-1 {
1780
- margin-right: 0.25rem !important;
1781
- }
1782
-
1783
- .qti-margin-e-2 {
1784
- margin-right: 0.5rem !important;
1785
- }
1786
-
1787
- .qti-margin-e-3 {
1788
- margin-right: 1rem !important;
1789
- }
1790
-
1791
- .qti-margin-e-4 {
1792
- margin-right: 1.5rem !important;
1793
- }
1794
-
1795
- .qti-margin-e-5 {
1796
- margin-right: 3rem !important;
1797
- }
1798
-
1799
- .qti-margin-e-auto {
1800
- margin-right: auto !important;
1801
- }
1802
-
1803
- /* =========
1804
- Padding css
1805
- ========== */
1806
-
1807
- /*
1808
- For padding Top and Bottom and Left and Right
1809
- */
1810
-
1811
- .qti-padding-0 {
1812
- padding: 0 !important;
1813
- }
1814
-
1815
- .qti-padding-1 {
1816
- padding: 0.25rem !important;
1817
- }
1818
-
1819
- .qti-padding-2 {
1820
- padding: 0.5rem !important;
1821
- }
1822
-
1823
- .qti-padding-3 {
1824
- padding: 1rem !important;
1825
- }
1826
-
1827
- .qti-padding-4 {
1828
- padding: 1.5rem !important;
1829
- }
1830
-
1831
- .qti-padding-5 {
1832
- padding: 3rem !important;
1833
- }
1834
-
1835
- /*
1836
- For padding Left and Right
1837
- */
1838
-
1839
- .qti-padding-x-0 {
1840
- padding-right: 0 !important;
1841
- padding-left: 0 !important;
1842
- }
1843
-
1844
- .qti-padding-x-1 {
1845
- padding-right: 0.25rem !important;
1846
- padding-left: 0.25rem !important;
1847
- }
1848
-
1849
- .qti-padding-x-2 {
1850
- padding-right: 0.5rem !important;
1851
- padding-left: 0.5rem !important;
1852
- }
1853
-
1854
- .qti-padding-x-3 {
1855
- padding-right: 1rem !important;
1856
- padding-left: 1rem !important;
1857
- }
1858
-
1859
- .qti-padding-x-4 {
1860
- padding-right: 1.5rem !important;
1861
- padding-left: 1.5rem !important;
1862
- }
1863
-
1864
- .qti-padding-x-5 {
1865
- padding-right: 3rem !important;
1866
- padding-left: 3rem !important;
1867
- }
1868
-
1869
- /*
1870
- For padding Top and Bottom
1871
- */
1872
-
1873
- .qti-padding-y-0 {
1874
- padding-top: 0 !important;
1875
- padding-bottom: 0 !important;
1876
- }
1877
-
1878
- .qti-padding-y-1 {
1879
- padding-top: 0.25rem !important;
1880
- padding-bottom: 0.25rem !important;
1881
- }
1882
-
1883
- .qti-padding-y-2 {
1884
- padding-top: 0.5rem !important;
1885
- padding-bottom: 0.5rem !important;
1886
- }
1887
-
1888
- .qti-padding-y-3 {
1889
- padding-top: 1rem !important;
1890
- padding-bottom: 1rem !important;
1891
- }
1892
-
1893
- .qti-padding-y-4 {
1894
- padding-top: 1.5rem !important;
1895
- padding-bottom: 1.5rem !important;
1896
- }
1897
-
1898
- .qti-padding-y-5 {
1899
- padding-top: 3rem !important;
1900
- padding-bottom: 3rem !important;
1901
- }
1902
-
1903
- /*
1904
- For padding Top
1905
- */
1906
-
1907
- .qti-padding-t-0 {
1908
- padding-top: 0 !important;
1909
- }
1910
-
1911
- .qti-padding-t-1 {
1912
- padding-top: 0.25rem !important;
1913
- }
1914
-
1915
- .qti-padding-t-2 {
1916
- padding-top: 0.5rem !important;
1917
- }
1918
-
1919
- .qti-padding-t-3 {
1920
- padding-top: 1rem !important;
1921
- }
1922
-
1923
- .qti-padding-t-4 {
1924
- padding-top: 1.5rem !important;
1925
- }
1926
-
1927
- .qti-padding-t-5 {
1928
- padding-top: 3rem !important;
1929
- }
1930
-
1931
- /*
1932
- For padding Bottom
1933
- */
1934
-
1935
- .qti-padding-b-0 {
1936
- padding-bottom: 0 !important;
1937
- }
1938
-
1939
- .qti-padding-b-1 {
1940
- padding-bottom: 0.25rem !important;
1941
- }
1942
-
1943
- .qti-padding-b-2 {
1944
- padding-bottom: 0.5rem !important;
1945
- }
1946
-
1947
- .qti-padding-b-3 {
1948
- padding-bottom: 1rem !important;
1949
- }
1950
-
1951
- .qti-padding-b-4 {
1952
- padding-bottom: 1.5rem !important;
1953
- }
1954
-
1955
- .qti-padding-b-5 {
1956
- padding-bottom: 3rem !important;
1957
- }
1958
-
1959
- /*
1960
- For padding Start LTR
1961
- */
1962
-
1963
- .qti-padding-s-0 {
1964
- padding-left: 0 !important;
1965
- }
1966
-
1967
- .qti-padding-s-1 {
1968
- padding-left: 0.25rem !important;
1969
- }
1970
-
1971
- .qti-padding-s-2 {
1972
- padding-left: 0.5rem !important;
1973
- }
1974
-
1975
- .qti-padding-s-3 {
1976
- padding-left: 1rem !important;
1977
- }
1978
-
1979
- .qti-padding-s-4 {
1980
- padding-left: 1.5rem !important;
1981
- }
1982
-
1983
- .qti-padding-s-5 {
1984
- padding-left: 3rem !important;
1985
- }
1986
-
1987
- /*
1988
- For padding End LTR
1989
- */
1990
-
1991
- .qti-padding-e-0 {
1992
- padding-right: 0 !important;
1993
- }
1994
-
1995
- .qti-padding-e-1 {
1996
- padding-right: 0.25rem !important;
1997
- }
1998
-
1999
- .qti-padding-e-2 {
2000
- padding-right: 0.5rem !important;
2001
- }
2002
-
2003
- .qti-padding-e-3 {
2004
- padding-right: 1rem !important;
2005
- }
2006
-
2007
- .qti-padding-e-4 {
2008
- padding-right: 1.5rem !important;
2009
- }
2010
-
2011
- .qti-padding-e-5 {
2012
- padding-right: 3rem !important;
2013
- }
2014
-
2015
- /* ====================
2016
- Horizontal alignment
2017
- ==================== */
2018
-
2019
- .qti-align-left {
2020
- text-align: left;
2021
- }
2022
-
2023
- .qti-align-center {
2024
- text-align: center;
2025
- }
2026
-
2027
- .qti-align-right {
2028
- text-align: right;
2029
- }
2030
-
2031
- /* ==================
2032
- Vertical alignment
2033
- ================== */
2034
-
2035
- .qti-valign-top {
2036
- vertical-align: top;
2037
- }
2038
-
2039
- .qti-valign-middle {
2040
- vertical-align: middle;
2041
- }
2042
-
2043
- .qti-valign-baseline {
2044
- vertical-align: baseline;
2045
- }
2046
-
2047
- .qti-valign-bottom {
2048
- vertical-align: bottom;
2049
- }
2050
-
2051
- /* =============
2052
- Height styles
2053
- ============= */
2054
-
2055
- .qti-height-0 {
2056
- height: 0;
2057
- }
2058
-
2059
- .qti-height-px {
2060
- height: 1px;
2061
- }
2062
-
2063
- .qti-height-0p5 {
2064
- height: 0.125rem;
2065
- }
2066
-
2067
- .qti-height-1 {
2068
- height: 0.25rem;
2069
- }
2070
-
2071
- .qti-height-1p5 {
2072
- height: 0.375rem;
2073
- }
2074
-
2075
- .qti-height-2 {
2076
- height: 0.5rem;
2077
- }
2078
-
2079
- .qti-height-2p5 {
2080
- height: 0.625rem;
2081
- }
2082
-
2083
- .qti-height-3 {
2084
- height: 0.75rem;
2085
- }
2086
-
2087
- .qti-height-3p5 {
2088
- height: 0.875rem;
2089
- }
2090
-
2091
- .qti-height-4 {
2092
- height: 1rem;
2093
- }
2094
-
2095
- .qti-height-5 {
2096
- height: 1.25rem;
2097
- }
2098
-
2099
- .qti-height-6 {
2100
- height: 1.5rem;
2101
- }
2102
-
2103
- .qti-height-7 {
2104
- height: 1.75rem;
2105
- }
2106
-
2107
- .qti-height-8 {
2108
- height: 2rem;
2109
- }
2110
-
2111
- .qti-height-9 {
2112
- height: 2.25rem;
2113
- }
2114
-
2115
- .qti-height-10 {
2116
- height: 2.5rem;
2117
- }
2118
-
2119
- .qti-height-11 {
2120
- height: 2.75rem;
2121
- }
2122
-
2123
- .qti-height-12 {
2124
- height: 3rem;
2125
- }
2126
-
2127
- .qti-height-14 {
2128
- height: 3.5rem;
2129
- }
2130
-
2131
- .qti-height-16 {
2132
- height: 4rem;
2133
- }
2134
-
2135
- .qti-height-20 {
2136
- height: 5rem;
2137
- }
2138
-
2139
- .qti-height-24 {
2140
- height: 6rem;
2141
- }
2142
-
2143
- .qti-height-28 {
2144
- height: 7rem;
2145
- }
2146
-
2147
- .qti-height-32 {
2148
- height: 8rem;
2149
- }
2150
-
2151
- .qti-height-36 {
2152
- height: 9rem;
2153
- }
2154
-
2155
- .qti-height-40 {
2156
- height: 10rem;
2157
- }
2158
-
2159
- .qti-height-44 {
2160
- height: 11rem;
2161
- }
2162
-
2163
- .qti-height-48 {
2164
- height: 12rem;
2165
- }
2166
-
2167
- .qti-height-52 {
2168
- height: 13rem;
2169
- }
2170
-
2171
- .qti-height-56 {
2172
- height: 14rem;
2173
- }
2174
-
2175
- .qti-height-60 {
2176
- height: 15rem;
2177
- }
2178
-
2179
- .qti-height-64 {
2180
- height: 16rem;
2181
- }
2182
-
2183
- .qti-height-72 {
2184
- height: 18rem;
2185
- }
2186
-
2187
- .qti-height-80 {
2188
- height: 20rem;
2189
- }
2190
-
2191
- .qti-height-96 {
2192
- height: 24rem;
2193
- }
2194
-
2195
- .qti-height-1-2 {
2196
- height: 50%;
2197
- }
2198
-
2199
- .qti-height-1-3 {
2200
- height: 33.3333%;
2201
- }
2202
-
2203
- .qti-height-2-3 {
2204
- height: 66.6667%;
2205
- }
2206
-
2207
- .qti-height-1-4 {
2208
- height: 25%;
2209
- }
2210
-
2211
- .qti-height-2-4 {
2212
- height: 50%;
2213
- }
2214
-
2215
- .qti-height-3-4 {
2216
- height: 75%;
2217
- }
2218
-
2219
- .qti-height-1-5 {
2220
- height: 20%;
2221
- }
2222
-
2223
- .qti-height-2-5 {
2224
- height: 40%;
2225
- }
2226
-
2227
- .qti-height-3-5 {
2228
- height: 60%;
2229
- }
2230
-
2231
- .qti-height-4-5 {
2232
- height: 80%;
2233
- }
2234
-
2235
- .qti-height-1-6 {
2236
- height: 16.6667%;
2237
- }
2238
-
2239
- .qti-height-2-6 {
2240
- height: 33.3333%;
2241
- }
2242
-
2243
- .qti-height-3-6 {
2244
- height: 50%;
2245
- }
2246
-
2247
- .qti-height-4-6 {
2248
- height: 66.6667%;
2249
- }
2250
-
2251
- .qti-height-5-6 {
2252
- height: 83.3333%;
2253
- }
2254
-
2255
- .qti-height-auto {
2256
- height: auto;
2257
- }
2258
-
2259
- .qti-height-full {
2260
- height: 100%;
2261
- }
2262
-
2263
- /* ============
2264
- Width styles
2265
- ============ */
2266
-
2267
- .qti-width-0 {
2268
- width: 0;
2269
- }
2270
-
2271
- .qti-width-px {
2272
- width: 1px;
2273
- }
2274
-
2275
- .qti-width-0p5 {
2276
- width: 0.125rem;
2277
- }
2278
-
2279
- .qti-width-1 {
2280
- width: 0.25rem;
2281
- }
2282
-
2283
- .qti-width-1p5 {
2284
- width: 0.375rem;
2285
- }
2286
-
2287
- .qti-width-2 {
2288
- width: 0.5rem;
2289
- }
2290
-
2291
- .qti-width-2p5 {
2292
- width: 0.625rem;
2293
- }
2294
-
2295
- .qti-width-3 {
2296
- width: 0.75rem;
2297
- }
2298
-
2299
- .qti-width-3p5 {
2300
- width: 0.875rem;
2301
- }
2302
-
2303
- .qti-width-4 {
2304
- width: 1rem;
2305
- }
2306
-
2307
- .qti-width-5 {
2308
- width: 1.25rem;
2309
- }
2310
-
2311
- .qti-width-6 {
2312
- width: 1.5rem;
2313
- }
2314
-
2315
- .qti-width-7 {
2316
- width: 1.75rem;
2317
- }
2318
-
2319
- .qti-width-8 {
2320
- width: 2rem;
2321
- }
2322
-
2323
- .qti-width-9 {
2324
- width: 2.25rem;
2325
- }
2326
-
2327
- .qti-width-10 {
2328
- width: 2.5rem;
2329
- }
2330
-
2331
- .qti-width-11 {
2332
- width: 2.75rem;
2333
- }
2334
-
2335
- .qti-width-12 {
2336
- width: 3rem;
2337
- }
2338
-
2339
- .qti-width-14 {
2340
- width: 3.5rem;
2341
- }
2342
-
2343
- .qti-width-16 {
2344
- width: 4rem;
2345
- }
2346
-
2347
- .qti-width-20 {
2348
- width: 5rem;
2349
- }
2350
-
2351
- .qti-width-24 {
2352
- width: 6rem;
2353
- }
2354
-
2355
- .qti-width-28 {
2356
- width: 7rem;
2357
- }
2358
-
2359
- .qti-width-32 {
2360
- width: 8rem;
2361
- }
2362
-
2363
- .qti-width-36 {
2364
- width: 9rem;
2365
- }
2366
-
2367
- .qti-width-40 {
2368
- width: 10rem;
2369
- }
2370
-
2371
- .qti-width-44 {
2372
- width: 11rem;
2373
- }
2374
-
2375
- .qti-width-48 {
2376
- width: 12rem;
2377
- }
2378
-
2379
- .qti-width-52 {
2380
- width: 13rem;
2381
- }
2382
-
2383
- .qti-width-56 {
2384
- width: 14rem;
2385
- }
2386
-
2387
- .qti-width-60 {
2388
- width: 15rem;
2389
- }
2390
-
2391
- .qti-width-64 {
2392
- width: 16rem;
2393
- }
2394
-
2395
- .qti-width-72 {
2396
- width: 18rem;
2397
- }
2398
-
2399
- .qti-width-80 {
2400
- width: 20rem;
2401
- }
2402
-
2403
- .qti-width-96 {
2404
- width: 24rem;
2405
- }
2406
-
2407
- .qti-width-auto {
2408
- width: auto;
2409
- }
2410
-
2411
- .qti-width-1-2 {
2412
- width: 50%;
2413
- }
2414
-
2415
- .qti-width-1-3 {
2416
- width: 33.3333%;
2417
- }
2418
-
2419
- .qti-width-2-3 {
2420
- width: 66.6667%;
2421
- }
2422
-
2423
- .qti-width-1-4 {
2424
- width: 25%;
2425
- }
2426
-
2427
- .qti-width-2-4 {
2428
- width: 50%;
2429
- }
2430
-
2431
- .qti-width-3-4 {
2432
- width: 75%;
2433
- }
2434
-
2435
- .qti-width-1-5 {
2436
- width: 20%;
2437
- }
2438
-
2439
- .qti-width-2-5 {
2440
- width: 40%;
2441
- }
2442
-
2443
- .qti-width-3-5 {
2444
- width: 60%;
2445
- }
2446
-
2447
- .qti-width-4-5 {
2448
- width: 80%;
2449
- }
2450
-
2451
- .qti-width-1-6 {
2452
- width: 16.6667%;
2453
- }
2454
-
2455
- .qti-width-2-6 {
2456
- width: 33.3333%;
2457
- }
2458
-
2459
- .qti-width-3-6 {
2460
- width: 50%;
2461
- }
2462
-
2463
- .qti-width-4-6 {
2464
- width: 66.6667%;
2465
- }
2466
-
2467
- .qti-width-5-6 {
2468
- width: 83.3333%;
2469
- }
2470
-
2471
- .qti-width-1-12 {
2472
- width: 8.3333%;
2473
- }
2474
-
2475
- .qti-width-2-12 {
2476
- width: 16.6667%;
2477
- }
2478
-
2479
- .qti-width-3-12 {
2480
- width: 25%;
2481
- }
2482
-
2483
- .qti-width-4-12 {
2484
- width: 33.3333%;
2485
- }
2486
-
2487
- .qti-width-5-12 {
2488
- width: 41.6667%;
2489
- }
2490
-
2491
- .qti-width-6-12 {
2492
- width: 50%;
2493
- }
2494
-
2495
- .qti-width-7-12 {
2496
- width: 58.3333%;
2497
- }
2498
-
2499
- .qti-width-8-12 {
2500
- width: 66.6667%;
2501
- }
2502
-
2503
- .qti-width-9-12 {
2504
- width: 75%;
2505
- }
2506
-
2507
- .qti-width-10-12 {
2508
- width: 83.3333%;
2509
- }
2510
-
2511
- .qti-width-11-12 {
2512
- width: 91.6667%;
2513
- }
2514
-
2515
- .qti-width-full,
2516
- .qti-fullwidth {
2517
- width: 100%;
2518
- }
2519
-
2520
- /* ==================
2521
- Text Indent styles
2522
- ================== */
2523
-
2524
- .qti-text-indent-0 {
2525
- text-indent: 0;
2526
- }
2527
-
2528
- .qti-text-indent-px {
2529
- text-indent: 1px;
2530
- }
2531
-
2532
- .qti-text-indent-0p5 {
2533
- text-indent: 0.125rem;
2534
- }
2535
-
2536
- .qti-text-indent-1 {
2537
- text-indent: 0.25rem;
2538
- }
2539
-
2540
- .qti-text-indent-1p5 {
2541
- text-indent: 0.375rem;
2542
- }
2543
-
2544
- .qti-text-indent-2 {
2545
- text-indent: 0.5rem;
2546
- }
2547
-
2548
- .qti-text-indent-2p5 {
2549
- text-indent: 0.625rem;
2550
- }
2551
-
2552
- .qti-text-indent-3 {
2553
- text-indent: 0.75rem;
2554
- }
2555
-
2556
- .qti-text-indent-3p5 {
2557
- text-indent: 0.875rem;
2558
- }
2559
-
2560
- .qti-text-indent-4 {
2561
- text-indent: 1rem;
2562
- }
2563
-
2564
- .qti-text-indent-5 {
2565
- text-indent: 1.25rem;
2566
- }
2567
-
2568
- .qti-text-indent-6 {
2569
- text-indent: 1.5rem;
2570
- }
2571
-
2572
- .qti-text-indent-7 {
2573
- text-indent: 1.75rem;
2574
- }
2575
-
2576
- .qti-text-indent-8 {
2577
- text-indent: 2rem;
2578
- }
2579
-
2580
- .qti-text-indent-12 {
2581
- text-indent: 3rem;
2582
- }
2583
-
2584
- .qti-text-indent-16 {
2585
- text-indent: 4rem;
2586
- }
2587
-
2588
- .qti-text-indent-20 {
2589
- text-indent: 5rem;
2590
- }
2591
-
2592
- .qti-text-indent-24 {
2593
- text-indent: 6rem;
2594
- }
2595
-
2596
- .qti-text-indent-28 {
2597
- text-indent: 7rem;
2598
- }
2599
-
2600
- .qti-text-indent-32 {
2601
- text-indent: 8rem;
2602
- }
2603
-
2604
- /* =================
2605
- List Style styles
2606
- ================= */
2607
-
2608
- .qti-list-style-type-none {
2609
- list-style-type: none;
2610
- }
2611
-
2612
- .qti-list-style-type-disc {
2613
- list-style-type: disc;
2614
- }
2615
-
2616
- .qti-list-style-type-circle {
2617
- list-style-type: circle;
2618
- }
2619
-
2620
- .qti-list-style-type-square {
2621
- list-style-type: square;
2622
- }
2623
-
2624
- .qti-list-style-type-decimal {
2625
- list-style-type: decimal;
2626
- }
2627
-
2628
- .qti-list-style-type-decimal-leading-zero {
2629
- list-style-type: decimal-leading-zero;
2630
- }
2631
-
2632
- .qti-list-style-type-lower-alpha {
2633
- list-style-type: lower-alpha;
2634
- }
2635
-
2636
- .qti-list-style-type-upper-alpha {
2637
- list-style-type: upper-alpha;
2638
- }
2639
-
2640
- .qti-list-style-type-lower-roman {
2641
- list-style-type: lower-roman;
2642
- }
2643
-
2644
- .qti-list-style-type-upper-roman {
2645
- list-style-type: upper-roman;
2646
- }
2647
-
2648
- .qti-list-style-type-lower-latin {
2649
- list-style-type: lower-latin;
2650
- }
2651
-
2652
- .qti-list-style-type-upper-latin {
2653
- list-style-type: upper-latin;
2654
- }
2655
-
2656
- .qti-list-style-type-lower-greek {
2657
- list-style-type: lower-greek;
2658
- }
2659
-
2660
- .qti-list-style-type-arabic-indic {
2661
- list-style-type: arabic-indic;
2662
- }
2663
-
2664
- .qti-list-style-type-armenian {
2665
- list-style-type: armenian;
2666
- }
2667
-
2668
- .qti-list-style-type-lower-armenian {
2669
- list-style-type: lower-armenian;
2670
- }
2671
-
2672
- .qti-list-style-type-upper-armenian {
2673
- list-style-type: upper-armenian;
2674
- }
2675
-
2676
- .qti-list-style-type-bengali {
2677
- list-style-type: bengali;
2678
- }
2679
-
2680
- .qti-list-style-type-cambodian {
2681
- list-style-type: cambodian;
2682
- }
2683
-
2684
- .qti-list-style-type-simp-chinese-formal {
2685
- list-style-type: simp-chinese-formal;
2686
- }
2687
-
2688
- .qti-list-style-type-simp-chinese-informal {
2689
- list-style-type: simp-chinese-informal;
2690
- }
2691
-
2692
- .qti-list-style-type-trad-chinese-formal {
2693
- list-style-type: trad-chinese-formal;
2694
- }
2695
-
2696
- .qti-list-style-type-trad-chinese-informal {
2697
- list-style-type: trad-chinese-informal;
2698
- }
2699
-
2700
- .qti-list-style-type-cjk-ideographic {
2701
- list-style-type: cjk-ideographic;
2702
- }
2703
-
2704
- .qti-list-style-type-cjk-heavenly-stem {
2705
- list-style-type: cjk-heavenly-stem;
2706
- }
2707
-
2708
- .qti-list-style-type-cjk-earthly-branch {
2709
- list-style-type: cjk-earthly-branch;
2710
- }
2711
-
2712
- .qti-list-style-type-devanagari {
2713
- list-style-type: devanagari;
2714
- }
2715
-
2716
- .qti-list-style-type-ethiopic-halehame-ti-er {
2717
- list-style-type: ethiopic-halehame-ti-er;
2718
- }
2719
-
2720
- .qti-list-style-type-ethiopic-halehame-ti-et {
2721
- list-style-type: ethiopic-halehame-ti-et;
2722
- }
2723
-
2724
- .qti-list-style-type-ethiopic-halehame-am {
2725
- list-style-type: ethiopic-halehame-am;
2726
- }
2727
-
2728
- .qti-list-style-type-ethiopic-halehame {
2729
- list-style-type: ethiopic-halehame;
2730
- }
2731
-
2732
- .qti-list-style-type-georgian {
2733
- list-style-type: georgian;
2734
- }
2735
-
2736
- .qti-list-style-type-gujarati {
2737
- list-style-type: gujarati;
2738
- }
2739
-
2740
- .qti-list-style-type-gurmukhi {
2741
- list-style-type: gurmukhi;
2742
- }
2743
-
2744
- .qti-list-style-type-hangul {
2745
- list-style-type: hangul;
2746
- }
2747
-
2748
- .qti-list-style-type-hangul-consonant {
2749
- list-style-type: hangul-consonant;
2750
- }
2751
-
2752
- .qti-list-style-type-hebrew {
2753
- list-style-type: hebrew;
2754
- }
2755
-
2756
- .qti-list-style-type-hiragana {
2757
- list-style-type: hiragana;
2758
- }
2759
-
2760
- .qti-list-style-type-hiragana-iroha {
2761
- list-style-type: hiragana-iroha;
2762
- }
2763
-
2764
- .qti-list-style-type-khmer {
2765
- list-style-type: khmer;
2766
- }
2767
-
2768
- .qti-list-style-type-korean-hangul-formal {
2769
- list-style-type: korean-hangul-formal;
2770
- }
2771
-
2772
- .qti-list-style-type-korean-hanja-formal {
2773
- list-style-type: korean-hanja-formal;
2774
- }
2775
-
2776
- .qti-list-style-type-korean-hanja-informal {
2777
- list-style-type: korean-hanja-informal;
2778
- }
2779
-
2780
- .qti-list-style-type-lao {
2781
- list-style-type: lao;
2782
- }
2783
-
2784
- .qti-list-style-type-malayalam {
2785
- list-style-type: malayalam;
2786
- }
2787
-
2788
- .qti-list-style-type-mongolian {
2789
- list-style-type: mongolian;
2790
- }
2791
-
2792
- .qti-list-style-type-myanmar {
2793
- list-style-type: myanmar;
2794
- }
2795
-
2796
- .qti-list-style-type-oriya {
2797
- list-style-type: oriya;
2798
- }
2799
-
2800
- .qti-list-style-type-persian {
2801
- list-style-type: persian;
2802
- }
2803
-
2804
- .qti-list-style-type-thai {
2805
- list-style-type: thai;
2806
- }
2807
-
2808
- .qti-list-style-type-tibetan {
2809
- list-style-type: tibetan;
2810
- }
2811
-
2812
- .qti-list-style-type-telugu {
2813
- list-style-type: telugu;
2814
- }
2815
-
2816
- .qti-list-style-type-urdu {
2817
- list-style-type: urdu;
2818
- }
2819
-
2820
- /* =========================
2821
- Other QTI 3 Presentation Utilities
2822
- ========================= */
2823
-
2824
- .qti-bordered {
2825
- border: 1px solid var(--table-border-color);
2826
- }
2827
-
2828
- .qti-underline {
2829
- text-decoration: underline;
2830
- text-decoration-color: var(--foreground);
2831
- }
2832
-
2833
- .qti-italic {
2834
- font-style: italic;
2835
- }
2836
-
2837
- .qti-well {
2838
- min-height: 20px;
2839
- padding: 19px;
2840
- margin-bottom: 20px;
2841
- background-color: var(--well-bg);
2842
- border: var(--well-border);
2843
- border-radius: 4px;
2844
- box-shadow: var(--well-box-shadow);
2845
- }
2846
-
2847
- /* Set writing-mode to vertical-rl
2848
- Typical for CJK vertical text */
2849
-
2850
- .qti-writing-mode-vertical-rl {
2851
- writing-mode: vertical-rl;
2852
- }
2853
-
2854
- /* Set writing-mode to vertical-lr
2855
- Typical for Mongolian vertical text */
2856
-
2857
- .qti-writing-mode-vertical-lr {
2858
- writing-mode: vertical-lr;
2859
- }
2860
-
2861
- /* Set writing-mode to horizontal-tb
2862
- Browser default */
2863
-
2864
- .qti-writing-mode-horizontal-tb {
2865
- writing-mode: horizontal-tb;
2866
- }
2867
-
2868
- /* Float an element left */
2869
-
2870
- .qti-float-left {
2871
- float: left;
2872
- }
2873
-
2874
- /* Float an element right */
2875
-
2876
- .qti-float-right {
2877
- float: right;
2878
- }
2879
-
2880
- /* Remove a float */
2881
-
2882
- .qti-float-none {
2883
- float: none;
2884
- }
2885
-
2886
- /* Clearfix Hack to apply to a container of
2887
- floated content that overflows the container. */
2888
-
2889
- .qti-float-clearfix::after {
2890
- content: '';
2891
- clear: both;
2892
- display: table;
2893
- }
2894
-
2895
- .qti-float-clear-left
2896
- .qti-float-clear-right
2897
- .qti-float-clear-both
2898
-
2899
- /* Set text-orientation to upright */
2900
- .qti-text-orientation-upright {
2901
- text-orientation: upright;
2902
- }
2903
-
2904
- /* stylelint-disable number-max-precision */
2905
-
2906
- @layer qti-base {
2907
- .qti-layout-row {
2908
- display: flex;
2909
- flex-wrap: wrap;
2910
- width: 100%;
2911
- gap: 2.1276595745%;
2912
- }
2913
-
2914
- .qti-layout-row [class*='qti-layout-col']:not(:empty) {
2915
- box-sizing: border-box;
2916
- }
2917
-
2918
- .qti-layout-row [class*='qti-layout-col']:empty {
2919
- width: 0;
2920
- overflow: hidden; /* to fully collapse if there\u2019s padding or borders */
2921
- }
2922
-
2923
- .qti-layout-col1 {
2924
- width: 6.3829787234%;
2925
- }
2926
-
2927
- .qti-layout-col2 {
2928
- width: 14.8936170213%;
2929
- }
2930
-
2931
- .qti-layout-col3 {
2932
- width: 23.4042553191%;
2933
- }
2934
-
2935
- .qti-layout-col4 {
2936
- width: 31.914893617%;
2937
- }
2938
-
2939
- .qti-layout-col5 {
2940
- width: 40.4255319149%;
2941
- }
2942
-
2943
- .qti-layout-col6 {
2944
- width: 48.9361702128%;
2945
- }
2946
-
2947
- .qti-layout-col7 {
2948
- width: 57.4468085106%;
2949
- }
2950
-
2951
- .qti-layout-col8 {
2952
- width: 65.9574468085%;
2953
- }
2954
-
2955
- .qti-layout-col9 {
2956
- width: 74.4680851064%;
2957
- }
2958
-
2959
- .qti-layout-col10 {
2960
- width: 82.9787234043%;
2961
- }
2962
-
2963
- .qti-layout-col11 {
2964
- width: 91.4893617021%;
2965
- }
2966
-
2967
- .qti-layout-col12 {
2968
- width: 100%;
2969
- }
2970
-
2971
- .qti-layout-offset1 {
2972
- margin-left: 8.5106382979%;
2973
- }
2974
-
2975
- .qti-layout-offset2 {
2976
- margin-left: 17.0212765957%;
2977
- }
2978
-
2979
- .qti-layout-offset3 {
2980
- margin-left: 25.5319148936%;
2981
- }
2982
-
2983
- .qti-layout-offset4 {
2984
- margin-left: 34.0425531915%;
2985
- }
2986
-
2987
- .qti-layout-offset5 {
2988
- margin-left: 42.5531914894%;
2989
- }
2990
-
2991
- .qti-layout-offset6 {
2992
- margin-left: 51.0638297872%;
2993
- }
2994
-
2995
- .qti-layout-offset7 {
2996
- margin-left: 59.5744680851%;
2997
- }
2998
-
2999
- .qti-layout-offset8 {
3000
- margin-left: 68.085106383%;
3001
- }
3002
-
3003
- .qti-layout-offset9 {
3004
- margin-left: 76.5957446809%;
3005
- }
3006
-
3007
- .qti-layout-offset10 {
3008
- margin-left: 85.1063829787%;
3009
- }
3010
-
3011
- .qti-layout-offset11 {
3012
- margin-left: 93.6170212766%;
3013
- }
3014
-
3015
- .qti-layout-offset12 {
3016
- margin-left: 102.1276595745%;
3017
- }
3018
-
3019
- @media (width <= 767px) {
3020
- [class*='qti-layout-col'] {
3021
- width: 100%;
3022
- }
3023
- }
3024
- }
3025
-
3026
- [view],
3027
- qti-outcome-declaration,
3028
- qti-response-declaration {
3029
- display: none;
3030
- }
3031
-
3032
- [view].show {
3033
- display: block;
3034
- }
3035
-
3036
- :host {
3037
- box-sizing: border-box;
3038
- }
3039
-
3040
- *,
3041
- *::before,
3042
- *::after {
3043
- box-sizing: inherit;
3044
- }
3045
-
3046
- /* components */
3047
-
3048
- @layer qti-components {
3049
- qti-choice-interaction {
3050
- &.qti-input-control-hidden {
3051
- & qti-simple-choice {
3052
-
3053
- &:hover {
3054
- background-color: var(--qti-hover-bg);
3055
- }
3056
-
3057
- &:focus {
3058
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3059
- }
3060
-
3061
- &::part(ch) {
3062
- display: none;
3063
- }
3064
-
3065
- &:state(--checked),
3066
- &[aria-checked='true'] {
3067
- border-color: var(--qti-border-active);
3068
- background-color: var(--qti-bg-active);
3069
- }
3070
-
3071
- &:state(readonly),
3072
- &[aria-readonly='true'] {
3073
- cursor: pointer;
3074
- background-color: var(--qti-bg);
3075
- outline: 0;
3076
- border: none;
3077
- }
3078
-
3079
- &:state(disabled),
3080
- &[aria-disabled='true'] {
3081
- cursor: not-allowed;
3082
- background-color: var(--qti-disabled-bg);
3083
- color: var(--qti-disabled-color);
3084
- border-color: var(--qti-border-color);
3085
- outline: 4px solid var(--qti-disabled-bg);
3086
- }
3087
-
3088
- border-radius: var(--qti-border-radius);
3089
-
3090
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3091
-
3092
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3093
-
3094
- outline: none
3095
- }
3096
- }
3097
-
3098
- &:not(.qti-input-control-hidden) {
3099
- & qti-simple-choice {
3100
-
3101
- &:not([aria-disabled='true'], [aria-readonly='true'], :state(--checked)):hover {
3102
- background-color: var(--qti-hover-bg);
3103
- }
3104
-
3105
- &:focus {
3106
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3107
- }
3108
-
3109
- &:state(--checked),
3110
- &[aria-checked='true'] {
3111
- border-color: var(--qti-border-active);
3112
- background-color: var(--qti-bg-active);
3113
- }
3114
-
3115
- &:state(readonly),
3116
- &[aria-readonly='true'] {
3117
- cursor: pointer;
3118
- background-color: var(--qti-bg);
3119
- outline: 0;
3120
- border: none;
3121
- }
3122
-
3123
- &:state(disabled),
3124
- &[aria-disabled='true'] {
3125
- cursor: not-allowed;
3126
- background-color: var(--qti-disabled-bg);
3127
- color: var(--qti-disabled-color);
3128
- border-color: var(--qti-border-color);
3129
- outline: 4px solid var(--qti-disabled-bg);
3130
- }
3131
-
3132
- &::part(cha) {
3133
- width: calc(var(--qti-form-size) - 6px);
3134
- height: calc(var(--qti-form-size) - 6px);
3135
- }
3136
-
3137
- &:state(radio)::part(ch) {
3138
- border-radius: 100%;
3139
- display: grid;
3140
- place-content: center;
3141
- width: var(--qti-form-size);
3142
- height: var(--qti-form-size);
3143
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3144
- outline: none;
3145
- }
3146
-
3147
- &:state(radio):state(--checked)::part(cha) {
3148
- background-color: var(--qti-border-active);
3149
- border-radius: 100%;
3150
- }
3151
-
3152
- &:state(checkbox)::part(ch) {
3153
- display: flex;
3154
- place-items: center;
3155
- border-radius: var(--qti-border-radius);
3156
- display: grid;
3157
- place-content: center;
3158
- width: var(--qti-form-size);
3159
- height: var(--qti-form-size);
3160
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3161
- outline: none;
3162
- }
3163
-
3164
- &:state(checkbox):state(--checked)::part(cha) {
3165
- background-color: var(--qti-border-active);
3166
- -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");
3167
- 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");
3168
- }
3169
-
3170
- gap: 0.5rem;
3171
-
3172
- border-radius: var(--qti-border-radius);
3173
-
3174
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3175
-
3176
- outline: none;
3177
-
3178
- cursor: pointer
3179
- }
3180
- }
3181
-
3182
- & qti-simple-choice {
3183
- width: -moz-fit-content;
3184
- width: fit-content;
3185
- cursor: pointer;
3186
-
3187
- &:state(correct-response),
3188
- &[data-correct-response='true'] {
3189
- &::after {
3190
- content: '\\02714';
3191
- color: #16a34a; /* text-green-600 */
3192
- }
3193
- }
3194
- }
3195
-
3196
- & qti-simple-choice > p {
3197
- margin: 0 !important;
3198
- padding: 0 !important;
3199
- }
3200
- }
3201
-
3202
- qti-graphic-gap-match-interaction:state(--dragzone-active)::part(drags) {
3203
- border-color: var(--qti-border-active);
3204
- background-color: var(--qti-bg-active);
3205
- }
3206
-
3207
- qti-graphic-gap-match-interaction:state(--dragzone-enabled)::part(drags) {
3208
- background-color: var(--qti-bg-active);
3209
- }
3210
-
3211
- /* Active state */
3212
- qti-graphic-gap-match-interaction.qti-selections-light:state(--dragzone-active)::part(drags) {
3213
- background-color: var(--qti-light-bg-active);
3214
- border-color: var(--qti-light-border-active);
3215
- }
3216
-
3217
- qti-graphic-gap-match-interaction.qti-selections-dark:state(--dragzone-active)::part(drags) {
3218
- background-color: var(--qti-dark-bg-active);
3219
- border-color: var(--qti-dark-border-active);
3220
- }
3221
-
3222
- /* Enabled state */
3223
- qti-graphic-gap-match-interaction.qti-selections-light:state(--dragzone-enabled)::part(drags) {
3224
- background-color: var(--qti-light-bg-active);
3225
- }
3226
-
3227
- qti-graphic-gap-match-interaction.qti-selections-dark:state(--dragzone-enabled)::part(drags) {
3228
- background-color: var(--qti-dark-bg-active);
3229
- }
3230
-
3231
- qti-graphic-gap-match-interaction {
3232
- position: relative;
3233
-
3234
- & qti-gap-img,
3235
- qti-gap-text {
3236
- display: flex;
3237
- justify-content: center;
3238
- align-items: center;
3239
- cursor: grab;
3240
- }
3241
-
3242
- & qti-associable-hotspot {
3243
- display: flex;
3244
- justify-content: center;
3245
- align-items: center;
3246
- border: 2px solid transparent;
3247
-
3248
- &[enabled] {
3249
-
3250
- /* Light theme override */
3251
- .qti-selections-light & {
3252
- background-color: var(--qti-light-bg-active);
3253
- }
3254
-
3255
- /* Dark theme override */
3256
- .qti-selections-dark & {
3257
- background-color: var(--qti-dark-bg-active);
3258
- }
3259
- background-color: var(--qti-bg-active)
3260
- }
3261
-
3262
- &[active] {
3263
-
3264
- /* Light theme override */
3265
- .qti-selections-light & {
3266
- background-color: var(--qti-light-bg-active);
3267
- border-color: var(--qti-light-border-active);
3268
- }
3269
-
3270
- /* Dark theme override */
3271
- .qti-selections-dark & {
3272
- background-color: var(--qti-dark-bg-active);
3273
- border-color: var(--qti-dark-border-active);
3274
- }
3275
- border-color: var(--qti-border-active);
3276
- background-color: var(--qti-bg-active)
3277
- }
3278
-
3279
- &[disabled] {
3280
-
3281
- &:not(:empty) {
3282
- cursor: default !important;
3283
- }
3284
-
3285
- cursor: not-allowed;
3286
-
3287
- background-color: var(--qti-disabled-bg);
3288
-
3289
- color: var(--qti-disabled-color);
3290
-
3291
- border-color: var(--qti-border-color);
3292
-
3293
- outline: 4px solid var(--qti-disabled-bg)
3294
- }
3295
-
3296
- &:empty::after {
3297
- padding: var(--qti-padding-md) var(--qti-padding-lg); /* Padding shorthand */
3298
- content: '\\0000a0'; /* when empty, put a space in it */
3299
- }
3300
-
3301
- &:not(:empty) {
3302
- padding: 0;
3303
- width: auto;
3304
- }
3305
-
3306
- &:not(:empty) > * {
3307
- flex: 1;
3308
- transform: rotate(0); /* rotate-0 */
3309
- box-shadow: 0 0 0 1px #e5e7eb; /* ring-gray-200 */
3310
- }
3311
- }
3312
-
3313
- & img {
3314
- margin: 0;
3315
- padding: 0;
3316
- }
3317
- }
3318
-
3319
- qti-text-entry-interaction {
3320
- &::part(input) {
3321
- border-radius: 0;
3322
- cursor: text;
3323
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3324
- background: unset;
3325
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3326
- outline: none;
3327
- }
3328
-
3329
- &:hover {
3330
- background-color: var(--qti-hover-bg);
3331
- }
3332
-
3333
- &:focus-within {
3334
- &::part(input) {
3335
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3336
- border-color: var(--qti-border-active);
3337
- }
3338
- }
3339
- }
3340
-
3341
- qti-extended-text-interaction {
3342
- &::part(textarea) {
3343
- border-radius: 0;
3344
- cursor: text;
3345
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3346
- background: unset;
3347
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3348
- outline: none;
3349
- }
3350
-
3351
- &:hover {
3352
- background-color: var(--qti-hover-bg);
3353
- }
3354
-
3355
- &:focus-within {
3356
- &::part(textarea) {
3357
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3358
- border-color: var(--qti-border-active);
3359
- }
3360
- }
3361
- }
3362
-
3363
- qti-gap-match-interaction:state(--dragzone-active)::part(drags) {
3364
- border-color: var(--qti-border-active);
3365
- background-color: var(--qti-bg-active);
3366
- }
3367
-
3368
- qti-gap-match-interaction:state(--dragzone-enabled)::part(drags) {
3369
- background-color: var(--qti-bg-active);
3370
- }
3371
-
3372
- qti-gap-match-interaction {
3373
- & qti-gap-text {
3374
-
3375
- &[dragging] {
3376
- pointer-events: none;
3377
- rotate: -2deg;
3378
- box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
3379
- 0 4px 8px rgb(0 0 0 / 10%);
3380
- }
3381
-
3382
- &:hover {
3383
- background-color: var(--qti-hover-bg);
3384
- }
3385
-
3386
- &:focus {
3387
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3388
- }
3389
-
3390
- transition: transform 200ms ease-out,
3391
- box-shadow 200ms ease-out,
3392
- rotate 200ms ease-out;
3393
-
3394
- cursor: grab;
3395
-
3396
- background-color: var(--qti-bg);
3397
-
3398
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3399
-
3400
- border-radius: var(--qti-border-radius);
3401
-
3402
- padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
3403
-
3404
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3405
-
3406
- outline: none;
3407
-
3408
- background-image: radial-gradient(
3409
- circle at center,
3410
- rgb(0 0 0 / 10%) 0,
3411
- rgb(0 0 0 / 20%) 2px,
3412
- rgb(255 255 255 / 0%) 2px,
3413
- rgb(255 255 255 / 0%) 100%
3414
- );
3415
-
3416
- background-repeat: repeat-y;
3417
-
3418
- background-position: left center;
3419
-
3420
- background-size: 14px 8px
3421
- }
3422
-
3423
- & qti-gap {
3424
-
3425
- &[enabled] {
3426
-
3427
- /* Light theme override */
3428
- .qti-selections-light & {
3429
- border-color: var(--qti-light-border-active);
3430
- }
3431
-
3432
- /* Dark theme override */
3433
- .qti-selections-dark & {
3434
- border-color: var(--qti-dark-border-active);
3435
- }
3436
- background-color: var(--qti-bg-active)
3437
- }
3438
-
3439
- &[disabled] {
3440
-
3441
- &:not(:empty) {
3442
- cursor: default !important;
3443
- }
3444
-
3445
- cursor: not-allowed;
3446
-
3447
- background-color: var(--qti-disabled-bg);
3448
-
3449
- color: var(--qti-disabled-color);
3450
-
3451
- border-color: var(--qti-border-color);
3452
-
3453
- outline: 4px solid var(--qti-disabled-bg)
3454
- }
3455
-
3456
- &[active] {
3457
-
3458
- /* Light theme override */
3459
- .qti-selections-light & {
3460
- background-color: var(--qti-light-bg-active);
3461
- border-color: var(--qti-light-border-active);
3462
- }
3463
-
3464
- /* Dark theme override */
3465
- .qti-selections-dark & {
3466
- background-color: var(--qti-dark-bg-active);
3467
- border-color: var(--qti-dark-border-active);
3468
- }
3469
- border-color: var(--qti-border-active);
3470
- background-color: var(--qti-bg-active)
3471
- }
3472
-
3473
- display: inline-flex;
3474
- align-items: center;
3475
-
3476
- &:empty::after {
3477
- padding: var(--qti-padding-md) var(--qti-padding-lg); /* Padding shorthand */
3478
- content: '\\0000a0'; /* when empty, put a space in it */
3479
- }
3480
-
3481
- &:not(:empty) {
3482
- display: inline-flex;
3483
- padding: 0;
3484
- width: auto;
3485
- }
3486
-
3487
- &:not(:empty) > * {
3488
- flex: 1;
3489
- transform: rotate(0); /* rotate-0 */
3490
- box-shadow: 0 0 0 1px #e5e7eb; /* ring-gray-200 */
3491
- }
3492
-
3493
- background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
3494
- center no-repeat;
3495
-
3496
- border-radius: var(--qti-border-radius);
3497
-
3498
- position: relative;
3499
-
3500
- background-color: var(--qti-bg);
3501
-
3502
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3503
-
3504
- outline: none
3505
- }
3506
- }
3507
-
3508
- qti-hotspot-interaction {
3509
- & qti-hotspot-choice {
3510
- &[shape='circle'] {
3511
-
3512
- &:hover {
3513
- background-color: var(--qti-hover-bg);
3514
- }
3515
-
3516
- &:focus {
3517
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3518
- }
3519
-
3520
- &:state(--checked),
3521
- &[aria-checked='true'] {
3522
- border-color: var(--qti-border-active);
3523
- }
3524
-
3525
- &:state(--readonly),
3526
- &[aria-readonly='true'] {
3527
- cursor: pointer;
3528
- background-color: var(--qti-bg);
3529
- outline: 0;
3530
- border: none;
3531
- }
3532
-
3533
- &:state(--disabled),
3534
- &[aria-disabled='true'] {
3535
- cursor: not-allowed;
3536
- background-color: var(--qti-disabled-bg);
3537
- color: var(--qti-disabled-color);
3538
- border-color: var(--qti-border-color);
3539
- outline: 4px solid var(--qti-disabled-bg);
3540
- }
3541
-
3542
- width: 100%;
3543
-
3544
- height: 100%;
3545
-
3546
- background-color: transparent;
3547
-
3548
- padding: 0;
3549
-
3550
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3551
-
3552
- outline: none
3553
- }
3554
-
3555
- &[shape='rect'] {
3556
-
3557
- /* &:hover {
3558
- @apply hov;
3559
- } */
3560
-
3561
- &:focus {
3562
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3563
- }
3564
-
3565
- &:state(--checked),
3566
- &[aria-checked='true'] {
3567
- border-color: var(--qti-border-active);
3568
- }
3569
-
3570
- &[aria-readonly='true'] {
3571
- cursor: pointer;
3572
- background-color: var(--qti-bg);
3573
- outline: 0;
3574
- border: none;
3575
- }
3576
-
3577
- &[aria-disabled='true'] {
3578
- cursor: not-allowed;
3579
- background-color: var(--qti-disabled-bg);
3580
- color: var(--qti-disabled-color);
3581
- border-color: var(--qti-border-color);
3582
- outline: 4px solid var(--qti-disabled-bg);
3583
- }
3584
-
3585
- width: 100%;
3586
-
3587
- height: 100%;
3588
-
3589
- background-color: transparent;
3590
-
3591
- padding: 0;
3592
-
3593
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3594
-
3595
- outline: none
3596
- }
3597
-
3598
- &[shape='poly'] {
3599
- &:hover::after {
3600
- content: '';
3601
- width: 100%;
3602
- height: 100%;
3603
- background: repeating-linear-gradient(
3604
- 45deg,
3605
- var(--qti-border-active),
3606
- var(--qti-border-active) 5px,
3607
- transparent 5px,
3608
- transparent 10px
3609
- );
3610
- display: block;
3611
- }
3612
-
3613
- &:state(--checked)::after,
3614
- &[aria-checked='true']::after {
3615
- content: '';
3616
- width: 100%;
3617
- height: 100%;
3618
- background: repeating-linear-gradient(
3619
- 45deg,
3620
- transparent,
3621
- transparent 5px,
3622
- var(--qti-border-active) 5px,
3623
- var(--qti-border-active) 10px
3624
- );
3625
- display: block;
3626
- }
3627
-
3628
- &[aria-readonly='true'] {
3629
- cursor: pointer;
3630
- background-color: var(--qti-bg);
3631
- outline: 0;
3632
- border: none;
3633
- }
3634
-
3635
- &[aria-disabled='true'] {
3636
- cursor: not-allowed;
3637
- background-color: var(--qti-disabled-bg);
3638
- color: var(--qti-disabled-color);
3639
- border-color: var(--qti-border-color);
3640
- outline: 4px solid var(--qti-disabled-bg);
3641
- }
3642
- }
3643
- }
3644
- }
3645
-
3646
- qti-hottext-interaction {
3647
- /* &:not(.qti-input-control-hidden),
3648
- &:not(.qti-unselected-hidden) { */
3649
- qti-hottext {
3650
- display: inline-flex;
3651
- align-items: center;
3652
-
3653
- &:hover {
3654
- background-color: var(--qti-hover-bg);
3655
- }
3656
-
3657
- &:focus {
3658
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3659
- }
3660
-
3661
- &::part(cha) {
3662
- width: calc(var(--qti-form-size) - 6px);
3663
- height: calc(var(--qti-form-size) - 6px);
3664
- }
3665
-
3666
- &:state(radio)::part(ch) {
3667
- border-radius: 100%;
3668
- display: grid;
3669
- place-content: center;
3670
- width: var(--qti-form-size);
3671
- height: var(--qti-form-size);
3672
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3673
- outline: none;
3674
- }
3675
-
3676
- &:state(radio):state(--checked)::part(cha) {
3677
- background-color: var(--qti-border-active);
3678
- border-radius: 100%;
3679
- }
3680
-
3681
- &:state(checkbox)::part(ch) {
3682
- display: flex;
3683
- place-items: center;
3684
- border-radius: var(--qti-border-radius);
3685
- display: grid;
3686
- place-content: center;
3687
- width: var(--qti-form-size);
3688
- height: var(--qti-form-size);
3689
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3690
- outline: none;
3691
- }
3692
-
3693
- &:state(checkbox):state(--checked)::part(cha) {
3694
- background-color: var(--qti-border-active);
3695
- -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");
3696
- 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");
3697
- }
3698
-
3699
- gap: 0.5rem;
3700
-
3701
- border-radius: var(--qti-border-radius);
3702
-
3703
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3704
-
3705
- outline: none;
3706
-
3707
- cursor: pointer
3708
- }
3709
-
3710
- /* } */
3711
-
3712
- &.qti-input-control-hidden {
3713
- qti-hottext {
3714
- /* --qti-padding-md: 0.1rem;
3715
- --qti-padding-lg: 0.2rem;
3716
- --qti-border-radius-md: 0.3rem;
3717
- --qti-border-thickness: 1px;
3718
- --qti-font-weight-semibold: 400; */
3719
-
3720
- &:hover {
3721
- background-color: var(--qti-hover-bg);
3722
- }
3723
-
3724
- &:focus {
3725
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3726
- }
3727
-
3728
- /* @layer qti-variants { */
3729
- &::part(ch) {
3730
- display: none;
3731
- }
3732
-
3733
- &:state(--checked) {
3734
- border-color: var(--qti-border-active);
3735
- background-color: var(--qti-bg-active);
3736
- }
3737
-
3738
- &[aria-readonly='true'] {
3739
- cursor: pointer;
3740
- background-color: var(--qti-bg);
3741
- outline: 0;
3742
- border: none;
3743
- }
3744
-
3745
- &[aria-disabled='true'] {
3746
- cursor: not-allowed;
3747
- background-color: var(--qti-disabled-bg);
3748
- color: var(--qti-disabled-color);
3749
- border-color: var(--qti-border-color);
3750
- outline: 4px solid var(--qti-disabled-bg);
3751
- }
3752
-
3753
- border-radius: var(--qti-border-radius);
3754
-
3755
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3756
-
3757
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3758
-
3759
- outline: none
3760
- }
3761
-
3762
- /* } */
3763
- }
3764
-
3765
- &.qti-unselected-hidden {
3766
- qti-hottext {
3767
- &:hover {
3768
- background-color: var(--qti-hover-bg);
3769
- }
3770
-
3771
- &:focus {
3772
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3773
- }
3774
-
3775
- cursor: pointer;
3776
-
3777
- &::part(ch) {
3778
- display: none;
3779
- }
3780
-
3781
- &:state(--checked) {
3782
- background-color: var(--qti-bg-active);
3783
- }
3784
-
3785
- &[aria-readonly='true'] {
3786
- cursor: pointer;
3787
- background-color: var(--qti-bg);
3788
- outline: 0;
3789
- border: none;
3790
- }
3791
-
3792
- &[aria-disabled='true'] {
3793
- cursor: not-allowed;
3794
- background-color: var(--qti-disabled-bg);
3795
- color: var(--qti-disabled-color);
3796
- border-color: var(--qti-border-color);
3797
- outline: 4px solid var(--qti-disabled-bg);
3798
- }
3799
- }
3800
- }
3801
- }
3802
-
3803
- qti-inline-choice-interaction {
3804
- &::part(select) {
3805
-
3806
- &:hover {
3807
- background-color: var(--qti-hover-bg);
3808
- }
3809
-
3810
- &:focus {
3811
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3812
- }
3813
-
3814
- border-radius: var(--qti-border-radius);
3815
-
3816
- position: relative;
3817
-
3818
- -webkit-appearance: none;
3819
-
3820
- -moz-appearance: none;
3821
-
3822
- appearance: none;
3823
-
3824
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3825
-
3826
- padding-right: calc(var(--qti-padding-horizontal) + 1.5rem);
3827
-
3828
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3829
-
3830
- outline: none;
3831
-
3832
- 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")
3833
- no-repeat center right 6px
3834
- }
3835
- }
3836
-
3837
- qti-match-interaction:not(.qti-match-tabular) {
3838
- /* The draggables */
3839
- & qti-simple-match-set:first-of-type {
3840
- display: flex;
3841
- flex-wrap: wrap;
3842
- align-items: flex-start; /* Prevents children from stretching */
3843
- gap: var(--qti-gap-size);
3844
-
3845
- & qti-simple-associable-choice {
3846
-
3847
- &[dragging] {
3848
- pointer-events: none;
3849
- rotate: -2deg;
3850
- box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
3851
- 0 4px 8px rgb(0 0 0 / 10%);
3852
- }
3853
-
3854
- &:hover {
3855
- background-color: var(--qti-hover-bg);
3856
- }
3857
-
3858
- &:focus {
3859
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3860
- }
3861
-
3862
- transition: transform 200ms ease-out,
3863
- box-shadow 200ms ease-out,
3864
- rotate 200ms ease-out;
3865
-
3866
- cursor: grab;
3867
-
3868
- background-color: var(--qti-bg);
3869
-
3870
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3871
-
3872
- border-radius: var(--qti-border-radius);
3873
-
3874
- padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
3875
-
3876
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3877
-
3878
- outline: none;
3879
-
3880
- background-image: radial-gradient(
3881
- circle at center,
3882
- rgb(0 0 0 / 10%) 0,
3883
- rgb(0 0 0 / 20%) 2px,
3884
- rgb(255 255 255 / 0%) 2px,
3885
- rgb(255 255 255 / 0%) 100%
3886
- );
3887
-
3888
- background-repeat: repeat-y;
3889
-
3890
- background-position: left center;
3891
-
3892
- background-size: 14px 8px
3893
- }
3894
- }
3895
-
3896
- /* The droppables */
3897
- & qti-simple-match-set:last-of-type {
3898
- display: grid;
3899
- grid-auto-columns: 1fr; /* auto-cols-fr */
3900
- grid-auto-flow: column; /* grid-flow-col */
3901
- gap: var(--qti-gap-size); /* gap-2 */
3902
- width: 100%; /* w-full */
3903
-
3904
- & qti-simple-associable-choice {
3905
- display: flex;
3906
- flex-direction: column;
3907
- }
3908
-
3909
- & > qti-simple-associable-choice {
3910
- /* a droppable qti-simple-associable-choice */
3911
- box-sizing: border-box;
3912
- display: grid;
3913
- grid-row: 2 / 4;
3914
- grid-template-rows: subgrid;
3915
-
3916
- & img {
3917
- max-width: 100%;
3918
- height: auto;
3919
- }
3920
-
3921
- &[enabled] {
3922
- &::part(dropslot) {
3923
- background-color: var(--qti-bg-active);
3924
- }
3925
- }
3926
-
3927
- &[disabled] {
3928
- &::part(dropslot) {
3929
- cursor: not-allowed;
3930
- background-color: var(--qti-disabled-bg);
3931
- color: var(--qti-disabled-color);
3932
- border-color: var(--qti-border-color);
3933
- outline: 4px solid var(--qti-disabled-bg);
3934
- }
3935
- }
3936
-
3937
- &[active] {
3938
- &::part(dropslot) {
3939
- border-color: var(--qti-border-active);
3940
- background-color: var(--qti-bg-active);
3941
- }
3942
- }
3943
-
3944
- &::part(dropslot) {
3945
-
3946
- &[dragging] {
3947
- pointer-events: none;
3948
- rotate: -2deg;
3949
- box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
3950
- 0 4px 8px rgb(0 0 0 / 10%);
3951
- }
3952
-
3953
- &:focus {
3954
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3955
- }
3956
-
3957
- min-height: 6rem;
3958
- gap: var(--qti-gap-size);
3959
- box-sizing: border-box;
3960
- display: flex;
3961
- justify-content: center;
3962
- align-items: center;
3963
- background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
3964
- center no-repeat;
3965
- border-radius: var(--qti-border-radius);
3966
- position: relative;
3967
- background-color: var(--qti-bg);
3968
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3969
- outline: none;
3970
- }
3971
-
3972
- & > *:not(qti-simple-associable-choice) {
3973
- pointer-events: none;
3974
- }
3975
-
3976
- & > qti-simple-associable-choice {
3977
-
3978
- &::part(dropslot) {
3979
- display: none;
3980
- }
3981
-
3982
- &:hover {
3983
- background-color: var(--qti-hover-bg);
3984
- }
3985
-
3986
- &:focus {
3987
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3988
- }
3989
-
3990
- flex-basis: fit-content;
3991
-
3992
- transition: transform 200ms ease-out,
3993
- box-shadow 200ms ease-out,
3994
- rotate 200ms ease-out;
3995
-
3996
- cursor: grab;
3997
-
3998
- background-color: var(--qti-bg);
3999
-
4000
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
4001
-
4002
- border-radius: var(--qti-border-radius);
4003
-
4004
- padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
4005
-
4006
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4007
-
4008
- outline: none;
4009
-
4010
- background-image: radial-gradient(
4011
- circle at center,
4012
- rgb(0 0 0 / 10%) 0,
4013
- rgb(0 0 0 / 20%) 2px,
4014
- rgb(255 255 255 / 0%) 2px,
4015
- rgb(255 255 255 / 0%) 100%
4016
- );
4017
-
4018
- background-repeat: repeat-y;
4019
-
4020
- background-position: left center;
4021
-
4022
- background-size: 14px 8px;
4023
- }
4024
- }
4025
- }
4026
- }
4027
-
4028
- qti-order-interaction {
4029
- &::part(qti-simple-choice),
4030
- & qti-simple-choice {
4031
-
4032
- &[dragging] {
4033
- pointer-events: none;
4034
- rotate: -2deg;
4035
- box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
4036
- 0 4px 8px rgb(0 0 0 / 10%);
4037
- }
4038
-
4039
- &:hover {
4040
- background-color: var(--qti-hover-bg);
4041
- }
4042
-
4043
- &:focus {
4044
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
4045
- }
4046
-
4047
- transition: transform 200ms ease-out,
4048
- box-shadow 200ms ease-out,
4049
- rotate 200ms ease-out;
4050
-
4051
- cursor: grab;
4052
-
4053
- background-color: var(--qti-bg);
4054
-
4055
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
4056
-
4057
- border-radius: var(--qti-border-radius);
4058
-
4059
- padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
4060
-
4061
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4062
-
4063
- outline: none;
4064
-
4065
- background-image: radial-gradient(
4066
- circle at center,
4067
- rgb(0 0 0 / 10%) 0,
4068
- rgb(0 0 0 / 20%) 2px,
4069
- rgb(255 255 255 / 0%) 2px,
4070
- rgb(255 255 255 / 0%) 100%
4071
- );
4072
-
4073
- background-repeat: repeat-y;
4074
-
4075
- background-position: left center;
4076
-
4077
- background-size: 14px 8px
4078
- }
4079
-
4080
- &::part(qti-simple-choice) {
4081
- display: flex;
4082
- overflow: hidden;
4083
- align-items: center;
4084
- width: 100%;
4085
- text-overflow: ellipsis;
4086
- }
4087
-
4088
- &::part(drops) {
4089
- gap: 0.5rem; /* gap-2 */
4090
- }
4091
-
4092
- &::part(drags) {
4093
- gap: 0.5rem; /* gap-2 */
4094
- }
4095
-
4096
- &::part(drop-list) {
4097
-
4098
- &[enabled] {
4099
-
4100
- /* Light theme override */
4101
- .qti-selections-light & {
4102
- border-color: var(--qti-light-border-active);
4103
- }
4104
-
4105
- /* Dark theme override */
4106
- .qti-selections-dark & {
4107
- border-color: var(--qti-dark-border-active);
4108
- }
4109
- background-color: var(--qti-bg-active)
4110
- }
4111
-
4112
- &:hover {
4113
- background-color: var(--qti-hover-bg);
4114
- }
4115
-
4116
- &:focus {
4117
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
4118
- }
4119
-
4120
- display: flex;
4121
- min-height: 4rem;
4122
- background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
4123
- center no-repeat;
4124
- border-radius: var(--qti-border-radius);
4125
- position: relative;
4126
- background-color: var(--qti-bg);
4127
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4128
- outline: none;
4129
- }
4130
-
4131
- &::part(active) {
4132
- border-color: var(--qti-border-active);
4133
- background-color: var(--qti-bg-active);
4134
- }
4135
- }
4136
-
4137
- qti-associate-interaction {
4138
- & qti-simple-associable-choice, /* drags when in lightdom */
4139
- &::part(qti-simple-associable-choice) /* drags when in shadowdom */ {
4140
-
4141
- &:hover {
4142
- background-color: var(--qti-hover-bg);
4143
- }
4144
-
4145
- &:focus {
4146
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
4147
- }
4148
-
4149
- &[dragging] {
4150
- pointer-events: none;
4151
- rotate: -2deg;
4152
- box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
4153
- 0 4px 8px rgb(0 0 0 / 10%);
4154
- }
4155
-
4156
- transition: transform 200ms ease-out,
4157
- box-shadow 200ms ease-out,
4158
- rotate 200ms ease-out;
4159
-
4160
- cursor: grab;
4161
-
4162
- background-color: var(--qti-bg);
4163
-
4164
- padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
4165
-
4166
- border-radius: var(--qti-border-radius);
4167
-
4168
- padding-left: calc(var(--qti-padding-horizontal) + 0.5rem);
4169
-
4170
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4171
-
4172
- outline: none;
4173
-
4174
- background-image: radial-gradient(
4175
- circle at center,
4176
- rgb(0 0 0 / 10%) 0,
4177
- rgb(0 0 0 / 20%) 2px,
4178
- rgb(255 255 255 / 0%) 2px,
4179
- rgb(255 255 255 / 0%) 100%
4180
- );
4181
-
4182
- background-repeat: repeat-y;
4183
-
4184
- background-position: left center;
4185
-
4186
- background-size: 14px 8px
4187
- }
4188
-
4189
- /* display: flex;
4190
- overflow: hidden;
4191
- align-items: center; */
4192
-
4193
- /* &::part(drop-container) {
4194
- display: flex;
4195
- flex-direction: column;
4196
- gap: var(--qti-gap-size);
4197
- } */
4198
-
4199
- &::part(drop-list) {
4200
-
4201
- display: grid;
4202
- height: 3rem;
4203
- min-width: 10rem;
4204
- background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="7" stroke="%23CCCCCC" stroke-width="1" fill="transparent" /></svg>')
4205
- center no-repeat;
4206
- border-radius: var(--qti-border-radius);
4207
- position: relative;
4208
- background-color: var(--qti-bg);
4209
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4210
- outline: none;
4211
- }
4212
-
4213
- &::part(drop-list):focus {
4214
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
4215
- }
4216
-
4217
- &::part(drop-list)[dragging] {
4218
- border-color: var(--qti-border-active);
4219
- background-color: var(--qti-bg-active);
4220
- }
4221
-
4222
- /* &::part(drop-list) {
4223
- @apply act;
4224
- } */
4225
- }
4226
-
4227
- qti-graphic-order-interaction {
4228
- & qti-hotspot-choice {
4229
-
4230
- &:hover {
4231
- background-color: var(--qti-hover-bg);
4232
- }
4233
-
4234
- &:focus {
4235
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
4236
- }
4237
-
4238
- &:state(--checked),
4239
- &[aria-checked='true'] {
4240
- border-color: var(--qti-border-active);
4241
- background-color: var(--qti-bg-active);
4242
- }
4243
-
4244
- &[aria-readonly='true'] {
4245
- cursor: pointer;
4246
- background-color: var(--qti-bg);
4247
- outline: 0;
4248
- border: none;
4249
- }
4250
-
4251
- &[aria-disabled='true'] {
4252
- cursor: not-allowed;
4253
- background-color: var(--qti-disabled-bg);
4254
- color: var(--qti-disabled-color);
4255
- border-color: var(--qti-border-color);
4256
- outline: 4px solid var(--qti-disabled-bg);
4257
- }
4258
-
4259
- &[aria-ordervalue] {
4260
- display: grid;
4261
- place-content: center;
4262
- }
4263
-
4264
- &[aria-ordervalue]::after {
4265
- content: attr(aria-ordervalue) !important;
4266
- }
4267
-
4268
- width: 100%;
4269
-
4270
- height: 100%;
4271
-
4272
- background-color: transparent;
4273
-
4274
- padding: 0;
4275
-
4276
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4277
-
4278
- outline: none
4279
- }
4280
- }
4281
-
4282
- qti-graphic-associate-interaction {
4283
- position: relative;
4284
- display: block;
4285
-
4286
- & qti-associable-hotspot {
4287
- &[shape='circle'] {
4288
-
4289
- &:hover {
4290
- background-color: var(--qti-hover-bg);
4291
- }
4292
-
4293
- &:focus {
4294
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
4295
- }
4296
-
4297
- &[aria-checked='true'] {
4298
- border-color: var(--qti-border-active);
4299
- background-color: var(--qti-bg-active);
4300
- }
4301
-
4302
- &[aria-readonly='true'] {
4303
- cursor: pointer;
4304
- background-color: var(--qti-bg);
4305
- outline: 0;
4306
- border: none;
4307
- }
4308
-
4309
- &[aria-disabled='true'] {
4310
- cursor: not-allowed;
4311
- background-color: var(--qti-disabled-bg);
4312
- color: var(--qti-disabled-color);
4313
- border-color: var(--qti-border-color);
4314
- outline: 4px solid var(--qti-disabled-bg);
4315
- }
4316
-
4317
- width: 100%;
4318
-
4319
- height: 100%;
4320
-
4321
- background-color: transparent;
4322
-
4323
- padding: 0;
4324
-
4325
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4326
-
4327
- outline: none
4328
- }
4329
-
4330
- &[shape='square'] {
4331
-
4332
- &:hover {
4333
- background-color: var(--qti-hover-bg);
4334
- }
4335
-
4336
- &:focus {
4337
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
4338
- }
4339
-
4340
- &[aria-checked='true'] {
4341
- border-color: var(--qti-border-active);
4342
- background-color: var(--qti-bg-active);
4343
- }
4344
-
4345
- &[aria-readonly='true'] {
4346
- cursor: pointer;
4347
- background-color: var(--qti-bg);
4348
- outline: 0;
4349
- border: none;
4350
- }
4351
-
4352
- &[aria-disabled='true'] {
4353
- cursor: not-allowed;
4354
- background-color: var(--qti-disabled-bg);
4355
- color: var(--qti-disabled-color);
4356
- border-color: var(--qti-border-color);
4357
- outline: 4px solid var(--qti-disabled-bg);
4358
- }
4359
-
4360
- width: 100%;
4361
-
4362
- height: 100%;
4363
-
4364
- background-color: transparent;
4365
-
4366
- padding: 0;
4367
-
4368
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4369
-
4370
- outline: none
4371
- }
4372
- }
4373
- }
4374
-
4375
- qti-slider-interaction {
4376
- display: block;
4377
-
4378
- --qti-tick-color: rgb(229 231 235 / 100%);
4379
- --qti-tick-width: 1px;
4380
-
4381
- &::part(slider) {
4382
- margin-left: 2rem; /* mx-8 */
4383
- margin-right: 2rem;
4384
- padding-bottom: 1rem; /* pb-4 */
4385
- padding-top: 1.25rem; /* pt-5 */
4386
- }
4387
-
4388
- --show-bounds: true;
4389
-
4390
- &::part(bounds) {
4391
- display: flex;
4392
- width: 100%;
4393
- justify-content: space-between;
4394
- margin-bottom: 0.5rem; /* mb-2 */
4395
- }
4396
-
4397
- --show-ticks: true;
4398
-
4399
- &::part(ticks) {
4400
- margin-left: 0.125rem; /* mx-0.5 */
4401
- margin-right: 0.125rem;
4402
- margin-bottom: 0.25rem; /* mb-1 */
4403
- height: 0.5rem; /* h-2 */
4404
- background: linear-gradient(to right, var(--qti-tick-color) var(--qti-tick-width), transparent 1px) repeat-x 0
4405
- center / calc(calc(100% - var(--qti-tick-width)) / ((var(--max) - var(--min)) / var(--step))) 100%;
4406
- }
4407
-
4408
- &::part(rail) {
4409
- display: flex;
4410
- align-items: center;
4411
- box-sizing: border-box;
4412
- height: 0.375rem; /* h-1.5 */
4413
- width: 100%;
4414
- cursor: pointer;
4415
- border-radius: 9999px; /* rounded-full */
4416
- border: 1px solid #d1d5db; /* border-gray-300 */
4417
- background-color: #e5e7eb; /* bg-gray-200 */
4418
- }
4419
-
4420
- &::part(knob) {
4421
- background-color: var(--qti-primary);
4422
- position: relative;
4423
- height: 1rem; /* h-4 */
4424
- width: 1rem; /* w-4 */
4425
- transform-origin: center;
4426
- transform: translateX(-50%);
4427
- cursor: pointer;
4428
- border-radius: 9999px; /* rounded-full */
4429
- left: var(--value-percentage);
4430
- }
4431
-
4432
- --show-value: true;
4433
-
4434
- &::part(value) {
4435
- position: absolute;
4436
- bottom: 2rem; /* bottom-8 */
4437
- left: 0.5rem; /* left-2 */
4438
- transform: translateX(-50%);
4439
- cursor: pointer;
4440
- border-radius: 0.25rem; /* rounded */
4441
- background-color: #f3f4f6; /* bg-gray-100 */
4442
- padding: 0.25rem 0.5rem; /* px-2 py-1 */
4443
- text-align: center;
4444
- color: #6b7280; /* text-gray-500 */
4445
- }
4446
- }
4447
-
4448
- qti-select-point-interaction {
4449
- &::part(point) {
4450
- &:hover {
4451
- background-color: var(--qti-hover-bg);
4452
- }
4453
-
4454
- &:focus {
4455
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
4456
- }
4457
-
4458
- border-radius: 100%;
4459
-
4460
- width: var(--qti-point-size);
4461
-
4462
- height: var(--qti-point-size);
4463
-
4464
- background-color: transparent;
4465
-
4466
- padding: 0;
4467
-
4468
- border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
4469
-
4470
- outline: none;
4471
- }
4472
- }
4473
-
4474
- qti-position-object-stage {
4475
- & qti-position-object-interaction {
4476
- /* no styles necessary, only layout styles, defined in the component */
4477
- }
4478
- }
4479
-
4480
- qti-prompt {
4481
- margin: 0.5rem 0; /* my-2 */
4482
- display: block;
4483
- width: 100%;
4484
- }
4485
- }
4486
- `;
4487
-
4488
- // src/lib/qti-test/components/test-container.ts
4489
- var TestContainer = class extends import_lit13.LitElement {
4490
- constructor() {
4491
- super(...arguments);
4492
- this.testURL = "";
4493
- }
4494
- /**
4495
- * Lifecycle callback invoked when the element is added to the DOM.
4496
- * Handles template preloading and dispatches a `qti-load-test-request` event
4497
- * if no template is found.
4498
- */
4499
- async connectedCallback() {
4500
- super.connectedCallback();
4501
- const template = this.querySelector("template");
4502
- if (template) {
4503
- this.preContent = template.content;
4504
- } else {
4505
- this.preContent = import_lit13.html``;
4506
- const sheet = new CSSStyleSheet();
4507
- sheet.replaceSync(item_default);
4508
- this.shadowRoot.adoptedStyleSheets = [sheet];
4509
- await this.updateComplete;
4510
- const event = new CustomEvent("qti-load-test-request", {
4511
- bubbles: true,
4512
- composed: true,
4513
- detail: {
4514
- promise: null,
4515
- testURL: this.testURL
4516
- }
4517
- });
4518
- const preventDefault = this.dispatchEvent(event);
4519
- if (!preventDefault) {
4520
- console.warn("No qti-load-test-request listener found");
4521
- this.preContent = import_lit13.html`<span>qti-load-test-request was not catched</span>`;
4522
- } else {
4523
- this.content = (async () => {
4524
- return await event.detail.promise;
4525
- })();
4526
- }
4527
- }
4528
- }
4529
- /**
4530
- * Renders the component content.
4531
- * Preloaded template content is rendered first, followed by the default slot
4532
- * and dynamically loaded content.
4533
- */
4534
- render() {
4535
- return import_lit13.html`
4536
- ${this.preContent}
4537
- <slot></slot>
4538
- ${(0, import_until.until)(this.content, import_lit13.html`<span>Loading...</span>`)}
4539
- `;
4540
- }
4541
- };
4542
- __decorateClass([
4543
- (0, import_decorators14.state)()
4544
- ], TestContainer.prototype, "content", 2);
4545
- __decorateClass([
4546
- (0, import_decorators14.property)({ type: String, attribute: "test-url" })
4547
- ], TestContainer.prototype, "testURL", 2);
4548
- TestContainer = __decorateClass([
4549
- (0, import_decorators14.customElement)("test-container")
4550
- ], TestContainer);
4551
-
4552
- // src/lib/qti-test/components/test-paging-buttons-stamp.ts
4553
- var import_lit14 = require("lit");
4554
- var import_decorators15 = require("lit/decorators.js");
4555
- var import_stampino = require("stampino");
4556
- var TestPagingButtonsStamp = class extends TestComponent {
4557
- constructor() {
4558
- super();
4559
- this.maxDisplayedItems = 2;
4560
- this.skipOnCategory = "dep-informational";
4561
- this._internals.ariaLabel = "pagination";
4562
- }
4563
- createRenderRoot() {
4564
- return this;
4565
- }
4566
- render() {
4567
- const items = this._testContext.items.reduce(
4568
- (acc, item) => {
4569
- const isDepInfoItem = item.category?.split(" ").includes(this.skipOnCategory);
4570
- const newIndex = isDepInfoItem ? "i" : acc.counter++;
4571
- acc.result.push({
4572
- ...item,
4573
- newIndex
4574
- // Assign the new index, which only increments for non-info items
4575
- });
4576
- return acc;
4577
- },
4578
- { counter: 0, result: [] }
4579
- ).result;
4580
- const itemIndex = items.findIndex((item) => item.identifier === this._testContext.navItemId);
4581
- const start = Math.max(0, itemIndex - this.maxDisplayedItems);
4582
- const end = Math.min(items.length, itemIndex + this.maxDisplayedItems + 1);
4583
- const clampedItems = items.slice(start, end);
4584
- return import_lit14.html`
4585
- ${clampedItems.map((item) => {
4586
- const rawscore = item.variables.find((vr) => vr.identifier == "SCORE");
4587
- const score = parseInt(rawscore?.value?.toString());
4588
- const completionStatus = item.variables.find((v) => v.identifier === "completionStatus")?.value;
4589
- const type = item.category !== this.skipOnCategory ? "regular" : "info";
4590
- const active = this._testContext.navItemId === item.identifier;
4591
- const correct = this._testContext.view === "scorer" && type == "regular" && score !== void 0 && !isNaN(score) && score > 0;
4592
- const incorrect = this._testContext.view === "scorer" && type == "regular" && score !== void 0 && !isNaN(score) && score <= 0;
4593
- const answered = this._testContext.view === "candidate" && completionStatus === "completed" && item.category !== this.skipOnCategory;
4594
- const computedItem = {
4595
- ...item,
4596
- type,
4597
- active,
4598
- correct,
4599
- incorrect,
4600
- answered
4601
- };
4602
- const templateElement = this.firstElementChild;
4603
- const myTemplate = (0, import_stampino.prepareTemplate)(templateElement);
4604
- return myTemplate({ item: computedItem });
4605
- })}
4606
- `;
4607
- }
4608
- };
4609
- __decorateClass([
4610
- (0, import_decorators15.property)({ type: Number, attribute: "max-displayed-items" })
4611
- ], TestPagingButtonsStamp.prototype, "maxDisplayedItems", 2);
4612
- __decorateClass([
4613
- (0, import_decorators15.property)({ type: String, attribute: "skip-on-category" })
4614
- ], TestPagingButtonsStamp.prototype, "skipOnCategory", 2);
4615
- TestPagingButtonsStamp = __decorateClass([
4616
- (0, import_decorators15.customElement)("test-paging-buttons-stamp")
4617
- ], TestPagingButtonsStamp);
4618
- // Annotate the CommonJS export names for ESM import in node:
4619
- 0 && (module.exports = {
4620
- QtiAssessmentItemRef,
4621
- QtiAssessmentSection,
4622
- QtiAssessmentTest,
4623
- QtiTest,
4624
- QtiTestPart,
4625
- TestContainer,
4626
- TestItemLink,
4627
- TestNext,
4628
- TestPagingButtonsStamp,
4629
- TestPrev,
4630
- TestView
4631
- });
4632
- //# sourceMappingURL=index.cjs.map