@citolab/qti-components 6.9.1-beta.71 → 6.9.1-beta.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.min.js CHANGED
@@ -23,7 +23,7 @@ Make sure to test your application with a production build as repeat registratio
23
23
  <xsl:apply-templates/>
24
24
  </xsl:element>
25
25
  </xsl:template>
26
- </xsl:stylesheet>`;function mi(s,t,e){s.querySelectorAll(t).forEach(r=>{let i=`${t}-${e}`,o=gi(r,i);r.replaceWith(o)})}function fi(s,t){s.querySelectorAll("*").forEach(e=>{let r=e.classList;r&&r.forEach(i=>{if(i.startsWith(`${t}:`)){let o=i.slice(`${t}:`.length),n=`${e.nodeName}-${o}`,a=gi(e,n);e.replaceWith(a)}})})}function gi(s,t){let e=document.createElement(t);for(let r of s.attributes)e.setAttribute(r.name,r.value);for(;s.firstChild;)e.appendChild(s.firstChild);return e}function bi(s){let t=[];return s.querySelectorAll("qti-assessment-item-ref").forEach(e=>{let r=e.getAttribute("identifier"),i=e.getAttribute("href"),o=e.getAttribute("category");t.push({identifier:r,href:i,category:o})}),t}var lr=null;function qe(s,t=!1){return t&&lr!==null&&lr.abort(),new Promise((e,r)=>{let i=new XMLHttpRequest;lr=i,i.open("GET",s,!0),i.responseType="document",i.onload=()=>{i.status>=200&&i.status<300?e(i.responseXML):r(i.statusText)},i.onerror=()=>{r(i.statusText)},i.send()})}function Ae(s){return new DOMParser().parseFromString(s,"text/xml")}function Te(s){let t=new XSLTProcessor,e=new DOMParser().parseFromString(hs,"text/xml");return t.importStylesheet(e),t.transformToFragment(s,document)}function vi(s,t){t.endsWith("/")||(t+="/"),s.querySelectorAll("[src],[href],[primary-path]").forEach(e=>{var o;let r="";e.getAttribute("src")&&(r="src"),e.getAttribute("href")&&(r="href"),e.getAttribute("primary-path")&&(r="primary-path");let i=(o=e.getAttribute(r))==null?void 0:o.trim();if(!i.startsWith("data:")&&!i.startsWith("http")){let n=t+encodeURI(i);e.setAttribute(r,n)}})}function yi(s){s.querySelectorAll('qti-custom-operator[class="js.org"] > qti-base-value').forEach(e=>{let r=document.createComment(e.textContent);e.replaceChild(r,e.firstChild)})}function xi(s){s.querySelectorAll("qti-stylesheet").forEach(t=>t.remove())}var St=()=>{let s,t={async load(e,r=!1){return new Promise((i,o)=>{qe(e,r).then(n=>(s=n,t.path(e.substring(0,e.lastIndexOf("/"))),i(t)))})},parse(e){return s=Ae(e),t},path:e=>(vi(s,e),t),fn(e){return e(s),t},pciHooks(e){let r=["hook","module"],i=e.substring(0,e.lastIndexOf("/"));for(let o of r)s.querySelectorAll("["+o+"]").forEach(a=>{let c=a.getAttribute(o);!c.startsWith("data:")&&!c.startsWith("http")&&(a.setAttribute("base-url",e),a.setAttribute("module",i+"/"+encodeURI(c+(c.endsWith(".js")?"":".js"))))});return t},extendElementName:(e,r)=>(mi(s,e,r),t),extendElementsWithClass:(e="extend")=>(fi(s,e),t),customInteraction(e,r){let i=s.querySelector("qti-custom-interaction"),o=i.querySelector("object");return i.setAttribute("data-base-ref",e),i.setAttribute("data-base-item",e+r),i.setAttribute("data",o.getAttribute("data")),i.setAttribute("width",o.getAttribute("width")),i.setAttribute("height",o.getAttribute("height")),i.removeChild(o),t},convertCDATAtoComment(){return yi(s),t},stripStyleSheets(){return xi(s),t},html(){return new XMLSerializer().serializeToString(Te(s))},xml(){return new XMLSerializer().serializeToString(s)},htmlDoc(){return Te(s)},xmlDoc(){return s}};return t};var Ei=()=>{let s,t={async load(e){return new Promise((r,i)=>{qe(e).then(o=>(s=o,r(t)))})},parse(e){s=Ae(e)},assessmentTest(){let e=s.querySelector('resource[type="imsqti_test_xmlv3p0"]');return{href:e.getAttribute("href"),identifier:e.getAttribute("identifier")}}};return t};var cr=()=>{let s,t={async load(e){return new Promise((r,i)=>{qe(e).then(o=>(s=o,r(t)))})},parse(e){return s=Ae(e),t},fn(e){return e(s),t},items(){return bi(s)},html(){return new XMLSerializer().serializeToString(Te(s))},xml(){return new XMLSerializer().serializeToString(s)},htmlDoc(){return Te(s)},xmlDoc(){return s}};return t};var Se=class extends v{constructor(){super(...arguments);this.identifier="";this.href=""}async connectedCallback(){super.connectedCallback();let e=new Event("qti-assessment-stimulus-ref-connected",{cancelable:!0,bubbles:!0});if(this.dispatchEvent(e)){let o=this.closest("qti-assessment-item").querySelector(`[data-stimulus-idref=${this.identifier}]`);o?await this.updateStimulusRef(o):console.warn(`Stimulus with data-stimulus-idref ${this.identifier} not found`)}}async updateStimulusRef(e){let r=this.href.substring(0,this.href.lastIndexOf("/")),i=await St().load(this.href).then(o=>o.path(r).htmlDoc());if(i){let o=i.querySelectorAll("qti-stimulus-body, qti-stylesheet");e.innerHTML="",e.append(...o)}}};l([d({type:String})],Se.prototype,"identifier",2),l([d({type:String})],Se.prototype,"href",2),Se=l([h("qti-assessment-stimulus-ref")],Se);var Ci={toAttribute:s=>s?"true":"false",fromAttribute:s=>s==="true"};function O(s,t){class e extends s{constructor(...o){super(...o);this.identifier="";this.tabIndex=0;this.disabled=!1;this.readonly=!1;this.internals=this.attachInternals()}handleDisabledChange(o,n){this.tabIndex=n?-1:0,n&&this.blur()}connectedCallback(){super.connectedCallback(),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("click",this._onClick),this.dispatchEvent(new CustomEvent(`register-${t}`,{bubbles:!0,composed:!0}))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keyup",this._onKeyUp),this.removeEventListener("click",this._onClick),this.dispatchEvent(new CustomEvent(`unregister-${t}`,{bubbles:!0,composed:!0}))}_onKeyUp(o){o.altKey||o.code==="Space"&&(o.preventDefault(),this._activate())}_onClick(){this.disabled||this.readonly||(this.focus(),this._activate())}_activate(){this.disabled||this.readonly||this.dispatchEvent(new CustomEvent(`activate-${t}`,{bubbles:!0,composed:!0,detail:{identifier:this.identifier}}))}render(){return u`<slot></slot>`}}return l([d({type:String})],e.prototype,"identifier",2),l([d({type:Number,reflect:!0,attribute:"tabindex"})],e.prototype,"tabIndex",2),l([d({type:Boolean,reflect:!0,attribute:"aria-disabled",converter:Ci})],e.prototype,"disabled",2),l([d({type:Boolean,reflect:!0,attribute:"aria-readonly",converter:Ci})],e.prototype,"readonly",2),l([M("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),e}var _i=g`
26
+ </xsl:stylesheet>`;function mi(s,t,e){s.querySelectorAll(t).forEach(r=>{let i=`${t}-${e}`,o=gi(r,i);r.replaceWith(o)})}function fi(s,t){s.querySelectorAll("*").forEach(e=>{let r=e.classList;r&&r.forEach(i=>{if(i.startsWith(`${t}:`)){let o=i.slice(`${t}:`.length),n=`${e.nodeName}-${o}`,a=gi(e,n);e.replaceWith(a)}})})}function gi(s,t){let e=document.createElement(t);for(let r of s.attributes)e.setAttribute(r.name,r.value);for(;s.firstChild;)e.appendChild(s.firstChild);return e}function bi(s){let t=[];return s.querySelectorAll("qti-assessment-item-ref").forEach(e=>{let r=e.getAttribute("identifier"),i=e.getAttribute("href"),o=e.getAttribute("category");t.push({identifier:r,href:i,category:o})}),t}var lr=null;function qe(s,t=!1){return t&&lr!==null&&lr.abort(),new Promise((e,r)=>{let i=new XMLHttpRequest;lr=i,i.open("GET",s,!0),i.responseType="document",i.onload=()=>{i.status>=200&&i.status<300?e(i.responseXML):r(i.statusText)},i.onerror=()=>{r(i.statusText)},i.send()})}function Ae(s){return new DOMParser().parseFromString(s,"text/xml")}function Te(s){let t=new XSLTProcessor,e=new DOMParser().parseFromString(hs,"text/xml");return t.importStylesheet(e),t.transformToFragment(s,document)}function vi(s,t){t.endsWith("/")||(t+="/"),s.querySelectorAll("[src],[href],[primary-path]").forEach(e=>{var o;let r="";e.getAttribute("src")&&(r="src"),e.getAttribute("href")&&(r="href"),e.getAttribute("primary-path")&&(r="primary-path");let i=(o=e.getAttribute(r))==null?void 0:o.trim();if(!i.startsWith("data:")&&!i.startsWith("http")){let n=t+encodeURI(i);e.setAttribute(r,n)}})}function yi(s){s.querySelectorAll('qti-custom-operator[class="js.org"] > qti-base-value').forEach(e=>{let r=document.createComment(e.textContent);e.replaceChild(r,e.firstChild)})}function xi(s){s.querySelectorAll("qti-stylesheet").forEach(t=>t.remove())}var St=()=>{let s,t={async load(e,r=!1){return new Promise((i,o)=>{qe(e,r).then(n=>(s=n,t.path(e.substring(0,e.lastIndexOf("/"))),i(t)))})},parse(e){return s=Ae(e),t},path:e=>(vi(s,e),t),fn(e){return e(s),t},pciHooks(e){let r=["hook","module"],i=e.substring(0,e.lastIndexOf("/"));for(let o of r)s.querySelectorAll("["+o+"]").forEach(a=>{let c=a.getAttribute(o);!c.startsWith("data:")&&!c.startsWith("http")&&(a.setAttribute("base-url",e),a.setAttribute("module",i+"/"+encodeURI(c+(c.endsWith(".js")?"":".js"))))});return t},extendElementName:(e,r)=>(mi(s,e,r),t),extendElementsWithClass:(e="extend")=>(fi(s,e),t),customInteraction(e,r){let i=s.querySelector("qti-custom-interaction"),o=i.querySelector("object");return i.setAttribute("data-base-ref",e),i.setAttribute("data-base-item",e+r),i.setAttribute("data",o.getAttribute("data")),i.setAttribute("width",o.getAttribute("width")),i.setAttribute("height",o.getAttribute("height")),i.removeChild(o),t},convertCDATAtoComment(){return yi(s),t},stripStyleSheets(){return xi(s),t},html(){return new XMLSerializer().serializeToString(Te(s))},xml(){return new XMLSerializer().serializeToString(s)},htmlDoc(){return Te(s)},xmlDoc(){return s}};return t};var Ei=()=>{let s,t={async load(e){return new Promise((r,i)=>{qe(e).then(o=>(s=o,r(t)))})},parse(e){s=Ae(e)},assessmentTest(){let e=s.querySelector('resource[type="imsqti_test_xmlv3p0"]');return{href:e.getAttribute("href"),identifier:e.getAttribute("identifier")}}};return t};var cr=()=>{let s,t={async load(e){return new Promise((r,i)=>{qe(e).then(o=>(s=o,r(t)))})},parse(e){return s=Ae(e),t},fn(e){return e(s),t},items(){return bi(s)},html(){return new XMLSerializer().serializeToString(Te(s))},xml(){return new XMLSerializer().serializeToString(s)},htmlDoc(){return Te(s)},xmlDoc(){return s}};return t};var Se=class extends v{constructor(){super(...arguments);this.identifier="";this.href=""}async connectedCallback(){super.connectedCallback();let e=new Event("qti-assessment-stimulus-ref-connected",{cancelable:!0,bubbles:!0});if(this.dispatchEvent(e)){let o=this.closest("qti-assessment-item").querySelector(`[data-stimulus-idref=${this.identifier}]`);o?await this.updateStimulusRef(o):console.warn(`Stimulus with data-stimulus-idref ${this.identifier} not found`)}}async updateStimulusRef(e){let r=this.href.substring(0,this.href.lastIndexOf("/")),i=await St().load(this.href).then(o=>o.htmlDoc());if(i){let o=i.querySelectorAll("qti-stimulus-body, qti-stylesheet");e.innerHTML="",e.append(...o)}}};l([d({type:String})],Se.prototype,"identifier",2),l([d({type:String})],Se.prototype,"href",2),Se=l([h("qti-assessment-stimulus-ref")],Se);var Ci={toAttribute:s=>s?"true":"false",fromAttribute:s=>s==="true"};function O(s,t){class e extends s{constructor(...o){super(...o);this.identifier="";this.tabIndex=0;this.disabled=!1;this.readonly=!1;this.internals=this.attachInternals()}handleDisabledChange(o,n){this.tabIndex=n?-1:0,n&&this.blur()}connectedCallback(){super.connectedCallback(),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("click",this._onClick),this.dispatchEvent(new CustomEvent(`register-${t}`,{bubbles:!0,composed:!0}))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keyup",this._onKeyUp),this.removeEventListener("click",this._onClick),this.dispatchEvent(new CustomEvent(`unregister-${t}`,{bubbles:!0,composed:!0}))}_onKeyUp(o){o.altKey||o.code==="Space"&&(o.preventDefault(),this._activate())}_onClick(){this.disabled||this.readonly||(this.focus(),this._activate())}_activate(){this.disabled||this.readonly||this.dispatchEvent(new CustomEvent(`activate-${t}`,{bubbles:!0,composed:!0,detail:{identifier:this.identifier}}))}render(){return u`<slot></slot>`}}return l([d({type:String})],e.prototype,"identifier",2),l([d({type:Number,reflect:!0,attribute:"tabindex"})],e.prototype,"tabIndex",2),l([d({type:Boolean,reflect:!0,attribute:"aria-disabled",converter:Ci})],e.prototype,"disabled",2),l([d({type:Boolean,reflect:!0,attribute:"aria-readonly",converter:Ci})],e.prototype,"readonly",2),l([M("disabled",{waitUntilFirstUpdate:!0})],e.prototype,"handleDisabledChange",1),e}var _i=g`
27
27
  :host {
28
28
  display: block;
29
29
  }
@@ -485,7 +485,7 @@ Make sure to test your application with a production build as repeat registratio
485
485
  <!-- slot for the prompt -->
486
486
  <slot></slot>
487
487
  <!-- slot for the image and hotspots -->
488
- `}positionHotspotOnRegister(t){let e=this.querySelector("img"),r=t.target,i=r.getAttribute("coords"),o=r.getAttribute("shape"),n=i.split(",").map(a=>parseInt(a));De(o,n,e,r)}connectedCallback(){super.connectedCallback(),this.addEventListener("qti-register-choice",this.positionHotspotOnRegister)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("qti-register-choice",this.positionHotspotOnRegister)}};pt.styles=[g`
488
+ `}positionHotspotOnRegister(t){let e=this.querySelector("img"),r=t.target,i=r.getAttribute("coords"),o=r.getAttribute("shape"),n=i.split(",").map(a=>parseInt(a));De(o,n,e,r)}connectedCallback(){super.connectedCallback(),this.addEventListener("register-qti-hotspot-choice",this.positionHotspotOnRegister)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("unregister-qti-hotspot-choice",this.positionHotspotOnRegister)}};pt.styles=[g`
489
489
  slot:not([name='prompt']) {
490
490
  position: relative; /* qti-hotspot-choice relative to the slot */
491
491
  display: block;
package/dist/item.css CHANGED
@@ -304,6 +304,14 @@
304
304
  background-color: var(--qti-bg-active);
305
305
  }
306
306
 
307
+ .act-bg {
308
+ background-color: var(--qti-bg-active);
309
+ }
310
+
311
+ .act-bor {
312
+ border-color: var(--qti-border-active);
313
+ }
314
+
307
315
  /* Apply .rdo for readonly state */
308
316
 
309
317
  .rdo {
@@ -1075,11 +1083,11 @@
1075
1083
  }
1076
1084
 
1077
1085
  .qti-height-1-3 {
1078
- height: 33.333333%;
1086
+ height: 33.3333%;
1079
1087
  }
1080
1088
 
1081
1089
  .qti-height-2-3 {
1082
- height: 66.666667%;
1090
+ height: 66.6667%;
1083
1091
  }
1084
1092
 
1085
1093
  .qti-height-1-4 {
@@ -1111,11 +1119,11 @@
1111
1119
  }
1112
1120
 
1113
1121
  .qti-height-1-6 {
1114
- height: 16.666667%;
1122
+ height: 16.6667%;
1115
1123
  }
1116
1124
 
1117
1125
  .qti-height-2-6 {
1118
- height: 33.333333%;
1126
+ height: 33.3333%;
1119
1127
  }
1120
1128
 
1121
1129
  .qti-height-3-6 {
@@ -1123,11 +1131,11 @@
1123
1131
  }
1124
1132
 
1125
1133
  .qti-height-4-6 {
1126
- height: 66.666667%;
1134
+ height: 66.6667%;
1127
1135
  }
1128
1136
 
1129
1137
  .qti-height-5-6 {
1130
- height: 83.333333%;
1138
+ height: 83.3333%;
1131
1139
  }
1132
1140
 
1133
1141
  .qti-height-auto {
@@ -1291,11 +1299,11 @@
1291
1299
  }
1292
1300
 
1293
1301
  .qti-width-1-3 {
1294
- width: 33.333333%;
1302
+ width: 33.3333%;
1295
1303
  }
1296
1304
 
1297
1305
  .qti-width-2-3 {
1298
- width: 66.666667%;
1306
+ width: 66.6667%;
1299
1307
  }
1300
1308
 
1301
1309
  .qti-width-1-4 {
@@ -1327,11 +1335,11 @@
1327
1335
  }
1328
1336
 
1329
1337
  .qti-width-1-6 {
1330
- width: 16.666667%;
1338
+ width: 16.6667%;
1331
1339
  }
1332
1340
 
1333
1341
  .qti-width-2-6 {
1334
- width: 33.333333%;
1342
+ width: 33.3333%;
1335
1343
  }
1336
1344
 
1337
1345
  .qti-width-3-6 {
@@ -1339,19 +1347,19 @@
1339
1347
  }
1340
1348
 
1341
1349
  .qti-width-4-6 {
1342
- width: 66.666667%;
1350
+ width: 66.6667%;
1343
1351
  }
1344
1352
 
1345
1353
  .qti-width-5-6 {
1346
- width: 83.333333%;
1354
+ width: 83.3333%;
1347
1355
  }
1348
1356
 
1349
1357
  .qti-width-1-12 {
1350
- width: 8.333333%;
1358
+ width: 8.3333%;
1351
1359
  }
1352
1360
 
1353
1361
  .qti-width-2-12 {
1354
- width: 16.666667%;
1362
+ width: 16.6667%;
1355
1363
  }
1356
1364
 
1357
1365
  .qti-width-3-12 {
@@ -1359,11 +1367,11 @@
1359
1367
  }
1360
1368
 
1361
1369
  .qti-width-4-12 {
1362
- width: 33.333333%;
1370
+ width: 33.3333%;
1363
1371
  }
1364
1372
 
1365
1373
  .qti-width-5-12 {
1366
- width: 41.666667%;
1374
+ width: 41.6667%;
1367
1375
  }
1368
1376
 
1369
1377
  .qti-width-6-12 {
@@ -1371,11 +1379,11 @@
1371
1379
  }
1372
1380
 
1373
1381
  .qti-width-7-12 {
1374
- width: 58.333333%;
1382
+ width: 58.3333%;
1375
1383
  }
1376
1384
 
1377
1385
  .qti-width-8-12 {
1378
- width: 66.666667%;
1386
+ width: 66.6667%;
1379
1387
  }
1380
1388
 
1381
1389
  .qti-width-9-12 {
@@ -1383,11 +1391,11 @@
1383
1391
  }
1384
1392
 
1385
1393
  .qti-width-10-12 {
1386
- width: 83.333333%;
1394
+ width: 83.3333%;
1387
1395
  }
1388
1396
 
1389
1397
  .qti-width-11-12 {
1390
- width: 91.666667%;
1398
+ width: 91.6667%;
1391
1399
  }
1392
1400
 
1393
1401
  .qti-width-full,
@@ -2078,6 +2086,7 @@ qti-response-declaration {
2078
2086
  width: fit-content;
2079
2087
  cursor: pointer;
2080
2088
 
2089
+ &:state(correct-response),
2081
2090
  &[data-correct-response='true'] {
2082
2091
  &::after {
2083
2092
  content: '\02714';
@@ -2093,14 +2102,6 @@ qti-response-declaration {
2093
2102
  }
2094
2103
 
2095
2104
  qti-text-entry-interaction {
2096
- &:hover {
2097
- background-color: var(--qti-hover-bg);
2098
- }
2099
-
2100
- &:focus-within {
2101
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2102
- }
2103
-
2104
2105
  &::part(input) {
2105
2106
  border-radius: 0;
2106
2107
  cursor: text;
@@ -2109,6 +2110,17 @@ qti-response-declaration {
2109
2110
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2110
2111
  outline: none;
2111
2112
  }
2113
+
2114
+ &:hover {
2115
+ background-color: var(--qti-hover-bg);
2116
+ }
2117
+
2118
+ &:focus-within {
2119
+ &::part(input) {
2120
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2121
+ border-color: var(--qti-border-active);
2122
+ }
2123
+ }
2112
2124
  }
2113
2125
 
2114
2126
  qti-extended-text-interaction {
@@ -2126,7 +2138,10 @@ qti-response-declaration {
2126
2138
  }
2127
2139
 
2128
2140
  &:focus-within {
2129
- box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2141
+ &::part(textarea) {
2142
+ box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2143
+ border-color: var(--qti-border-active);
2144
+ }
2130
2145
  }
2131
2146
  }
2132
2147
 
@@ -2246,11 +2261,12 @@ qti-response-declaration {
2246
2261
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2247
2262
  }
2248
2263
 
2264
+ &:state(--checked),
2249
2265
  &[aria-checked='true'] {
2250
2266
  border-color: var(--qti-border-active);
2251
- background-color: var(--qti-bg-active);
2252
2267
  }
2253
2268
 
2269
+ &:state(--readonly),
2254
2270
  &[aria-readonly='true'] {
2255
2271
  cursor: pointer;
2256
2272
  background-color: var(--qti-bg);
@@ -2258,6 +2274,7 @@ qti-response-declaration {
2258
2274
  border: none;
2259
2275
  }
2260
2276
 
2277
+ &:state(--disabled),
2261
2278
  &[aria-disabled='true'] {
2262
2279
  cursor: not-allowed;
2263
2280
  background-color: var(--qti-disabled-bg);
@@ -2281,17 +2298,17 @@ qti-response-declaration {
2281
2298
 
2282
2299
  &[shape='rect'] {
2283
2300
 
2284
- &:hover {
2285
- background-color: var(--qti-hover-bg);
2286
- }
2301
+ /* &:hover {
2302
+ @apply hov;
2303
+ } */
2287
2304
 
2288
2305
  &:focus {
2289
2306
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2290
2307
  }
2291
2308
 
2309
+ &:state(--checked),
2292
2310
  &[aria-checked='true'] {
2293
2311
  border-color: var(--qti-border-active);
2294
- background-color: var(--qti-bg-active);
2295
2312
  }
2296
2313
 
2297
2314
  &[aria-readonly='true'] {
@@ -2324,24 +2341,21 @@ qti-response-declaration {
2324
2341
 
2325
2342
  &[shape='poly'] {
2326
2343
  &:hover::after {
2327
-
2328
2344
  content: '';
2329
2345
  width: 100%;
2330
2346
  height: 100%;
2331
2347
  background: repeating-linear-gradient(
2332
2348
  45deg,
2333
- var(--qti-primary),
2334
- var(--qti-primary) 5px,
2349
+ var(--qti-border-active),
2350
+ var(--qti-border-active) 5px,
2335
2351
  transparent 5px,
2336
2352
  transparent 10px
2337
2353
  );
2338
2354
  display: block;
2339
- border-color: var(--qti-border-active);
2340
- background-color: var(--qti-bg-active);
2341
2355
  }
2342
2356
 
2357
+ &:state(--checked)::after,
2343
2358
  &[aria-checked='true']::after {
2344
-
2345
2359
  content: '';
2346
2360
  width: 100%;
2347
2361
  height: 100%;
@@ -2349,17 +2363,10 @@ qti-response-declaration {
2349
2363
  45deg,
2350
2364
  transparent,
2351
2365
  transparent 5px,
2352
- var(--qti-primary) 5px,
2353
- var(--qti-primary) 10px
2366
+ var(--qti-border-active) 5px,
2367
+ var(--qti-border-active) 10px
2354
2368
  );
2355
2369
  display: block;
2356
- border-color: var(--qti-border-active);
2357
- background-color: var(--qti-bg-active);
2358
- }
2359
-
2360
- &[aria-checked='true'] {
2361
- border-color: var(--qti-border-active);
2362
- background-color: var(--qti-bg-active);
2363
2370
  }
2364
2371
 
2365
2372
  &[aria-readonly='true'] {
@@ -2516,7 +2523,7 @@ qti-response-declaration {
2516
2523
  }
2517
2524
 
2518
2525
  &:state(--checked) {
2519
- background-color: var(--qti-primary-light); /* bg-blue-200 */
2526
+ background-color: var(--qti-bg-active);
2520
2527
  }
2521
2528
 
2522
2529
  &[aria-readonly='true'] {
@@ -2772,7 +2779,7 @@ qti-response-declaration {
2772
2779
  box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
2773
2780
  0 4px 8px rgb(0 0 0 / 10%);
2774
2781
  }
2775
-
2782
+
2776
2783
  &:hover {
2777
2784
  background-color: var(--qti-hover-bg);
2778
2785
  }
@@ -2830,8 +2837,6 @@ qti-response-declaration {
2830
2837
  gap: 0.5rem; /* gap-2 */
2831
2838
  }
2832
2839
 
2833
-
2834
-
2835
2840
  &::part(drop-list) {
2836
2841
 
2837
2842
  &[enabled] {
@@ -3104,7 +3109,7 @@ qti-response-declaration {
3104
3109
  qti-graphic-gap-match-interaction {
3105
3110
  position: relative;
3106
3111
 
3107
- & img {
3112
+ &img {
3108
3113
  margin: 0;
3109
3114
  padding: 0;
3110
3115
  }
@@ -3139,9 +3144,8 @@ qti-response-declaration {
3139
3144
  margin-right: 0.125rem;
3140
3145
  margin-bottom: 0.25rem; /* mb-1 */
3141
3146
  height: 0.5rem; /* h-2 */
3142
- background-position: 0 center;
3143
- background: linear-gradient(to right, var(--qti-tick-color) var(--qti-tick-width), transparent 1px) repeat-x;
3144
- background-size: calc(calc(100% - var(--qti-tick-width)) / ((var(--max) - var(--min)) / var(--step))) 100%;
3147
+ background: linear-gradient(to right, var(--qti-tick-color) var(--qti-tick-width), transparent 1px) repeat-x 0
3148
+ center / calc(calc(100% - var(--qti-tick-width)) / ((var(--max) - var(--min)) / var(--step))) 100%;
3145
3149
  }
3146
3150
 
3147
3151
  &::part(rail) {