@citolab/qti-components 7.23.0 → 7.25.0

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 (32) hide show
  1. package/cdn/index.global.js +1 -1
  2. package/cdn/index.js +176 -554
  3. package/custom-elements.json +122 -9
  4. package/dist/base.js +1 -1
  5. package/dist/{chunk-ULXR5TWK.js → chunk-4A7ZMQKU.js} +3 -3
  6. package/dist/{chunk-EGLWHNOX.js → chunk-BHB6PYJG.js} +4 -4
  7. package/dist/{chunk-EGLWHNOX.js.map → chunk-BHB6PYJG.js.map} +1 -1
  8. package/dist/{chunk-5WZZMNCU.js → chunk-ES2FREAP.js} +4 -4
  9. package/dist/{chunk-DDKFUQ22.js → chunk-FEO7D54Z.js} +3 -3
  10. package/dist/{chunk-2EVAV2SS.js → chunk-I4NHZ6D6.js} +89 -10
  11. package/dist/chunk-I4NHZ6D6.js.map +1 -0
  12. package/dist/{chunk-AIS537EU.js → chunk-IKBPPSNQ.js} +57 -487
  13. package/dist/{chunk-AIS537EU.js.map → chunk-IKBPPSNQ.js.map} +1 -1
  14. package/dist/{chunk-SVCFKO4U.js → chunk-RKXUA6D6.js} +4 -8
  15. package/dist/{chunk-SVCFKO4U.js.map → chunk-RKXUA6D6.js.map} +1 -1
  16. package/dist/{chunk-QZLVYJDX.js → chunk-VQAG7NSK.js} +2 -2
  17. package/dist/elements.js +3 -3
  18. package/dist/index.js +8 -8
  19. package/dist/interactions.js +3 -3
  20. package/dist/item.css +55 -485
  21. package/dist/item.js +3 -3
  22. package/dist/processing.d.ts +0 -2
  23. package/dist/processing.js +2 -2
  24. package/dist/qti-components-jsx.d.ts +64 -64
  25. package/dist/test.js +5 -5
  26. package/package.json +17 -16
  27. package/LICENSE.md +0 -674
  28. package/dist/chunk-2EVAV2SS.js.map +0 -1
  29. /package/dist/{chunk-ULXR5TWK.js.map → chunk-4A7ZMQKU.js.map} +0 -0
  30. /package/dist/{chunk-5WZZMNCU.js.map → chunk-ES2FREAP.js.map} +0 -0
  31. /package/dist/{chunk-DDKFUQ22.js.map → chunk-FEO7D54Z.js.map} +0 -0
  32. /package/dist/{chunk-QZLVYJDX.js.map → chunk-VQAG7NSK.js.map} +0 -0
package/dist/item.css CHANGED
@@ -2030,25 +2030,20 @@
2030
2030
 
2031
2031
  &.qti-input-control-hidden {
2032
2032
  & qti-simple-choice {
2033
- position: relative; /* Add position relative here instead of a separate rule */
2034
-
2033
+ position: relative;
2035
2034
  &:hover {
2036
2035
  }
2037
-
2038
2036
  &:focus {
2039
2037
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2040
2038
  }
2041
-
2042
2039
  &::part(ch) {
2043
2040
  display: none;
2044
2041
  }
2045
-
2046
2042
  &:state(--checked),
2047
2043
  &[aria-checked='true'] {
2048
2044
  border-color: var(--qti-border-active);
2049
2045
  background-color: var(--qti-bg-active);
2050
2046
  }
2051
-
2052
2047
  &:state(readonly),
2053
2048
  &[aria-readonly='true'] {
2054
2049
  cursor: pointer;
@@ -2056,7 +2051,6 @@
2056
2051
  outline: 0;
2057
2052
  border: none;
2058
2053
  }
2059
-
2060
2054
  &:state(disabled),
2061
2055
  &[aria-disabled='true'] {
2062
2056
  cursor: not-allowed;
@@ -2065,13 +2059,10 @@
2065
2059
  border-color: var(--qti-border-color);
2066
2060
  outline: 4px solid var(--qti-disabled-bg);
2067
2061
  }
2068
-
2069
- /* Add styling for correct responses with border instead of checkmark */
2070
2062
  &:state(correct-response),
2071
2063
  &[data-correct-response='true'] {
2072
2064
  border: 3px solid var(--qti-correct) !important;
2073
2065
  padding-right: 30px;
2074
-
2075
2066
  &::after {
2076
2067
  content: '\02714';
2077
2068
  color: var(--qti-correct);
@@ -2092,28 +2083,22 @@
2092
2083
 
2093
2084
  &:not(.qti-input-control-hidden) {
2094
2085
  & qti-simple-choice {
2095
-
2096
2086
  &:not([aria-disabled='true'], [aria-readonly='true'], :state(--checked)):hover {
2097
2087
  }
2098
-
2099
2088
  &:focus {
2100
2089
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2101
2090
  }
2102
-
2103
2091
  &:state(--checked),
2104
2092
  &[aria-checked='true'] {
2105
2093
  border-color: var(--qti-border-active);
2106
2094
  background-color: var(--qti-bg-active);
2107
2095
  }
2108
-
2109
2096
  &:state(candidate-correct) {
2110
2097
  background-color: var(--qti-correct);
2111
2098
  }
2112
-
2113
2099
  &:state(candidate-incorrect) {
2114
2100
  background-color: var(--qti-incorrect);
2115
2101
  }
2116
-
2117
2102
  &:state(readonly),
2118
2103
  &[aria-readonly='true'] {
2119
2104
  cursor: pointer;
@@ -2121,7 +2106,6 @@
2121
2106
  outline: 0;
2122
2107
  border: none;
2123
2108
  }
2124
-
2125
2109
  &:state(disabled),
2126
2110
  &[aria-disabled='true'] {
2127
2111
  cursor: not-allowed;
@@ -2130,12 +2114,10 @@
2130
2114
  border-color: var(--qti-border-color);
2131
2115
  outline: 4px solid var(--qti-disabled-bg);
2132
2116
  }
2133
-
2134
2117
  &::part(cha) {
2135
2118
  width: calc(var(--qti-form-size) - 6px);
2136
2119
  height: calc(var(--qti-form-size) - 6px);
2137
2120
  }
2138
-
2139
2121
  &:state(radio)::part(ch) {
2140
2122
  border-radius: 100%;
2141
2123
  display: grid;
@@ -2145,12 +2127,10 @@
2145
2127
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2146
2128
  outline: none;
2147
2129
  }
2148
-
2149
2130
  &:state(radio):state(--checked)::part(cha) {
2150
2131
  background-color: var(--qti-border-active);
2151
2132
  border-radius: 100%;
2152
2133
  }
2153
-
2154
2134
  &:state(checkbox)::part(ch) {
2155
2135
  display: flex;
2156
2136
  place-items: center;
@@ -2162,23 +2142,16 @@
2162
2142
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2163
2143
  outline: none;
2164
2144
  }
2165
-
2166
2145
  &:state(checkbox):state(--checked)::part(cha) {
2167
2146
  background-color: var(--qti-border-active);
2168
2147
  -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");
2169
2148
  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");
2170
2149
  }
2171
-
2172
2150
  gap: 0.5rem;
2173
-
2174
2151
  background-color: var(--qti-bg);
2175
-
2176
2152
  border-radius: var(--qti-border-radius);
2177
-
2178
2153
  padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
2179
-
2180
2154
  outline: none;
2181
-
2182
2155
  cursor: pointer
2183
2156
  }
2184
2157
  }
@@ -2187,8 +2160,6 @@
2187
2160
  width: -moz-fit-content;
2188
2161
  width: fit-content;
2189
2162
  cursor: pointer;
2190
-
2191
- /* Keep the checkmark for non-hidden input controls */
2192
2163
  &:state(correct-response),
2193
2164
  &[data-correct-response='true'] {
2194
2165
  &::after {
@@ -2203,11 +2174,9 @@
2203
2174
  padding: 0 !important;
2204
2175
  }
2205
2176
  }
2177
+ }
2206
2178
 
2207
- .hover-border {
2208
- border: 2px solid #000; /* Adjust the border style and color as needed */
2209
- }
2210
-
2179
+ @layer qti-components {
2211
2180
  qti-graphic-gap-match-interaction {
2212
2181
  &::part(message) {
2213
2182
  display: none;
@@ -2218,41 +2187,32 @@
2218
2187
  border-radius: 4px;
2219
2188
  margin-top: 8px;
2220
2189
  }
2221
-
2222
2190
  position: relative;
2223
-
2224
2191
  &.qti-selections-light {
2225
2192
  &:state(--dragzone-active)::part(drags) {
2226
2193
  background-color: var(--qti-light-bg-active);
2227
2194
  border-color: var(--qti-light-border-active);
2228
2195
  }
2229
-
2230
2196
  &:state(--dragzone-enabled)::part(drags) {
2231
2197
  background-color: var(--qti-light-bg-active);
2232
2198
  }
2233
2199
  }
2234
-
2235
2200
  &.qti-selections-dark {
2236
2201
  &:state(--dragzone-active)::part(drags) {
2237
2202
  background-color: var(--qti-dark-bg-active);
2238
2203
  border-color: var(--qti-dark-border-active);
2239
2204
  }
2240
-
2241
2205
  &:state(--dragzone-enabled)::part(drags) {
2242
2206
  background-color: var(--qti-dark-bg-active);
2243
2207
  }
2244
2208
  }
2245
-
2246
- /* General styles for active and enabled states */
2247
2209
  &:state(--dragzone-active)::part(drags) {
2248
2210
  border-color: var(--qti-border-active);
2249
2211
  background-color: var(--qti-bg-active);
2250
2212
  }
2251
-
2252
2213
  &:state(--dragzone-enabled)::part(drags) {
2253
2214
  background-color: var(--qti-bg-active);
2254
2215
  }
2255
-
2256
2216
  & qti-gap-img,
2257
2217
  qti-gap-text {
2258
2218
  display: flex;
@@ -2260,36 +2220,25 @@
2260
2220
  align-items: center;
2261
2221
  cursor: grab;
2262
2222
  }
2263
-
2264
2223
  & qti-associable-hotspot {
2265
2224
  display: flex;
2266
2225
  justify-content: center;
2267
2226
  align-items: center;
2268
2227
  border: 2px solid transparent;
2269
-
2270
2228
  &[enabled] {
2271
-
2272
- /* Light theme override */
2273
2229
  .qti-selections-light {
2274
2230
  background-color: var(--qti-light-bg-active);
2275
2231
  }
2276
-
2277
- /* Dark theme override */
2278
2232
  .qti-selections-dark {
2279
2233
  background-color: var(--qti-dark-bg-active);
2280
2234
  }
2281
2235
  background-color: var(--qti-bg-active)
2282
2236
  }
2283
-
2284
2237
  &[active] {
2285
-
2286
- /* Light theme override */
2287
2238
  .qti-selections-light {
2288
2239
  background-color: var(--qti-light-bg-active);
2289
2240
  border-color: var(--qti-light-border-active);
2290
2241
  }
2291
-
2292
- /* Dark theme override */
2293
2242
  .qti-selections-dark {
2294
2243
  background-color: var(--qti-dark-bg-active);
2295
2244
  border-color: var(--qti-dark-border-active);
@@ -2297,66 +2246,54 @@
2297
2246
  border-color: var(--qti-border-active);
2298
2247
  background-color: var(--qti-bg-active)
2299
2248
  }
2300
-
2301
2249
  &[disabled] {
2302
-
2303
2250
  &:not(:empty) {
2304
2251
  cursor: default !important;
2305
2252
  }
2306
-
2307
2253
  cursor: not-allowed;
2308
-
2309
2254
  background-color: var(--qti-disabled-bg);
2310
-
2311
2255
  color: var(--qti-disabled-color);
2312
-
2313
2256
  border-color: var(--qti-border-color);
2314
-
2315
2257
  outline: 4px solid var(--qti-disabled-bg)
2316
2258
  }
2317
-
2318
2259
  &:empty::after {
2319
- padding: var(--qti-padding-md) var(--qti-padding-lg); /* Padding shorthand */
2320
- content: '\0000a0'; /* when empty, put a space in it */
2260
+ padding: var(--qti-padding-md) var(--qti-padding-lg);
2261
+ content: '\0000a0';
2321
2262
  }
2322
-
2323
2263
  &:not(:empty) {
2324
2264
  padding: 0;
2325
2265
  width: auto;
2326
2266
  }
2327
-
2328
2267
  &:not(:empty) > * {
2329
2268
  flex: 1;
2330
- transform: rotate(0); /* rotate-0 */
2331
- box-shadow: 0 0 0 1px #e5e7eb; /* ring-gray-200 */
2269
+ transform: rotate(0);
2270
+ box-shadow: 0 0 0 1px #e5e7eb;
2332
2271
  }
2333
2272
  }
2334
-
2335
2273
  & img {
2336
2274
  margin: 0;
2337
2275
  padding: 0;
2338
2276
  }
2339
2277
  }
2278
+ }
2340
2279
 
2280
+ @layer qti-components {
2341
2281
  qti-text-entry-interaction {
2342
2282
  &:state(candidate-correct) {
2343
2283
  &::part(input) {
2344
2284
  background-color: var(--qti-correct);
2345
2285
  }
2346
2286
  }
2347
-
2348
2287
  &:state(candidate-partially-correct) {
2349
2288
  &::part(input) {
2350
2289
  background-color: var(--qti-partially-correct);
2351
2290
  }
2352
2291
  }
2353
-
2354
2292
  &:state(candidate-incorrect) {
2355
2293
  &::part(input) {
2356
2294
  background-color: var(--qti-incorrect);
2357
2295
  }
2358
2296
  }
2359
-
2360
2297
  &::part(input) {
2361
2298
  border-radius: 0;
2362
2299
  cursor: text;
@@ -2365,10 +2302,8 @@
2365
2302
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2366
2303
  outline: none;
2367
2304
  }
2368
-
2369
2305
  &:hover {
2370
2306
  }
2371
-
2372
2307
  &:focus-within {
2373
2308
  &::part(input) {
2374
2309
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
@@ -2376,7 +2311,9 @@
2376
2311
  }
2377
2312
  }
2378
2313
  }
2314
+ }
2379
2315
 
2316
+ @layer qti-components {
2380
2317
  qti-extended-text-interaction {
2381
2318
  &::part(textarea) {
2382
2319
  border-radius: 0;
@@ -2386,10 +2323,8 @@
2386
2323
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2387
2324
  outline: none;
2388
2325
  }
2389
-
2390
2326
  &:hover {
2391
2327
  }
2392
-
2393
2328
  &:focus-within {
2394
2329
  &::part(textarea) {
2395
2330
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
@@ -2397,125 +2332,89 @@
2397
2332
  }
2398
2333
  }
2399
2334
  }
2335
+ }
2400
2336
 
2337
+ @layer qti-components {
2401
2338
  qti-gap-match-interaction {
2402
2339
  &.qti-selections-light {
2403
2340
  &:state(--dragzone-active)::part(drags) {
2404
2341
  background-color: var(--qti-light-bg-active);
2405
2342
  border-color: var(--qti-light-border-active);
2406
2343
  }
2407
-
2408
2344
  &:state(--dragzone-enabled)::part(drags) {
2409
2345
  background-color: var(--qti-light-bg-active);
2410
2346
  }
2411
2347
  }
2412
-
2413
2348
  &.qti-selections-dark {
2414
2349
  &:state(--dragzone-active)::part(drags) {
2415
2350
  background-color: var(--qti-dark-bg-active);
2416
2351
  border-color: var(--qti-dark-border-active);
2417
2352
  }
2418
-
2419
2353
  &:state(--dragzone-enabled)::part(drags) {
2420
2354
  background-color: var(--qti-dark-bg-active);
2421
2355
  }
2422
2356
  }
2423
-
2424
- /* General styles for active and enabled states */
2425
2357
  &:state(--dragzone-active)::part(drags) {
2426
2358
  border-color: var(--qti-border-active);
2427
2359
  background-color: var(--qti-bg-active);
2428
2360
  }
2429
-
2430
2361
  &:state(--dragzone-enabled)::part(drags) {
2431
2362
  background-color: var(--qti-bg-active);
2432
2363
  }
2433
-
2434
2364
  & qti-gap-text {
2435
-
2436
2365
  &[dragging] {
2437
2366
  pointer-events: none;
2438
2367
  rotate: -2deg;
2439
2368
  box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
2440
2369
  0 4px 8px rgb(0 0 0 / 10%);
2441
2370
  }
2442
-
2443
2371
  &:hover {
2444
2372
  }
2445
-
2446
2373
  &:focus {
2447
2374
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2448
2375
  }
2449
-
2450
2376
  &:state(candidate-correct) {
2451
2377
  background-color: var(--qti-correct);
2452
2378
  }
2453
-
2454
2379
  &:state(candidate-incorrect) {
2455
2380
  background-color: var(--qti-incorrect);
2456
2381
  }
2457
-
2458
2382
  box-sizing: border-box;
2459
-
2460
2383
  transition: transform 200ms ease-out,
2461
2384
  box-shadow 200ms ease-out,
2462
2385
  rotate 200ms ease-out;
2463
-
2464
2386
  cursor: grab;
2465
-
2466
2387
  background-color: var(--qti-bg);
2467
-
2468
2388
  padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
2469
-
2470
2389
  border-radius: var(--qti-border-radius);
2471
-
2472
2390
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2473
-
2474
2391
  outline: none
2475
2392
  }
2476
-
2477
2393
  & qti-gap {
2478
-
2479
2394
  &[disabled] {
2480
-
2481
2395
  &:not(:empty) {
2482
2396
  cursor: default !important;
2483
2397
  }
2484
-
2485
2398
  cursor: not-allowed;
2486
-
2487
2399
  background-color: var(--qti-disabled-bg);
2488
-
2489
2400
  color: var(--qti-disabled-color);
2490
-
2491
2401
  border-color: var(--qti-border-color);
2492
-
2493
2402
  outline: 4px solid var(--qti-disabled-bg)
2494
2403
  }
2495
-
2496
2404
  &[enabled] {
2497
-
2498
- /* Light theme override */
2499
2405
  .qti-selections-light {
2500
2406
  border-color: var(--qti-light-border-active);
2501
2407
  }
2502
-
2503
- /* Dark theme override */
2504
2408
  .qti-selections-dark {
2505
2409
  border-color: var(--qti-dark-border-active);
2506
2410
  }
2507
2411
  background-color: var(--qti-bg-active)
2508
2412
  }
2509
-
2510
2413
  &[active] {
2511
-
2512
- /* Light theme override */
2513
2414
  .qti-selections-light {
2514
2415
  background-color: var(--qti-light-bg-active);
2515
2416
  border-color: var(--qti-light-border-active);
2516
2417
  }
2517
-
2518
- /* Dark theme override */
2519
2418
  .qti-selections-dark {
2520
2419
  background-color: var(--qti-dark-bg-active);
2521
2420
  border-color: var(--qti-dark-border-active);
@@ -2523,56 +2422,45 @@
2523
2422
  border-color: var(--qti-border-active);
2524
2423
  background-color: var(--qti-bg-active)
2525
2424
  }
2526
-
2527
2425
  display: inline-flex;
2528
2426
  align-items: center;
2529
-
2530
2427
  &:empty::after {
2531
- padding: var(--qti-padding-md) var(--qti-padding-lg); /* Padding shorthand */
2532
- content: '\0000a0'; /* when empty, put a space in it */
2428
+ padding: var(--qti-padding-md) var(--qti-padding-lg);
2429
+ content: '\0000a0';
2533
2430
  }
2534
-
2535
2431
  &:not(:empty) {
2536
2432
  display: inline-flex;
2537
2433
  padding: 0;
2538
2434
  width: auto;
2539
2435
  }
2540
-
2541
2436
  &:not(:empty) > * {
2542
2437
  flex: 1;
2543
- transform: rotate(0); /* rotate-0 */
2544
- box-shadow: 0 0 0 1px #e5e7eb; /* ring-gray-200 */
2438
+ transform: rotate(0);
2439
+ box-shadow: 0 0 0 1px #e5e7eb;
2545
2440
  }
2546
-
2547
2441
  border: var(--qti-border-thickness) dashed var(--qti-border-color);
2548
-
2549
2442
  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>')
2550
2443
  center no-repeat;
2551
-
2552
2444
  border-radius: var(--qti-border-radius);
2553
-
2554
2445
  position: relative;
2555
-
2556
2446
  background-color: var(--qti-bg)
2557
2447
  }
2558
2448
  }
2449
+ }
2559
2450
 
2451
+ @layer qti-components {
2560
2452
  qti-hotspot-interaction {
2561
2453
  & qti-hotspot-choice {
2562
2454
  &[shape='circle'] {
2563
-
2564
2455
  &:hover {
2565
2456
  }
2566
-
2567
2457
  &:focus {
2568
2458
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2569
2459
  }
2570
-
2571
2460
  &:state(--checked),
2572
2461
  &[aria-checked='true'] {
2573
2462
  border-color: var(--qti-border-active);
2574
2463
  }
2575
-
2576
2464
  &:state(--readonly),
2577
2465
  &[aria-readonly='true'] {
2578
2466
  cursor: pointer;
@@ -2580,7 +2468,6 @@
2580
2468
  outline: 0;
2581
2469
  border: none;
2582
2470
  }
2583
-
2584
2471
  &:state(--disabled),
2585
2472
  &[aria-disabled='true'] {
2586
2473
  cursor: not-allowed;
@@ -2589,48 +2476,30 @@
2589
2476
  border-color: var(--qti-border-color);
2590
2477
  outline: 4px solid var(--qti-disabled-bg);
2591
2478
  }
2592
-
2593
2479
  width: 100%;
2594
-
2595
2480
  height: 100%;
2596
-
2597
2481
  background-color: transparent;
2598
-
2599
2482
  margin: 0;
2600
-
2601
2483
  padding: 0;
2602
-
2603
2484
  border: 0;
2604
-
2605
2485
  box-sizing: border-box;
2606
-
2607
2486
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2608
-
2609
2487
  outline: none
2610
2488
  }
2611
-
2612
2489
  &[shape='rect'] {
2613
-
2614
- /* &:hover {
2615
- @apply hov;
2616
- } */
2617
-
2618
2490
  &:focus {
2619
2491
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2620
2492
  }
2621
-
2622
2493
  &:state(--checked),
2623
2494
  &[aria-checked='true'] {
2624
2495
  border-color: var(--qti-border-active);
2625
2496
  }
2626
-
2627
2497
  &[aria-readonly='true'] {
2628
2498
  cursor: pointer;
2629
2499
  background-color: var(--qti-bg);
2630
2500
  outline: 0;
2631
2501
  border: none;
2632
2502
  }
2633
-
2634
2503
  &[aria-disabled='true'] {
2635
2504
  cursor: not-allowed;
2636
2505
  background-color: var(--qti-disabled-bg);
@@ -2638,26 +2507,16 @@
2638
2507
  border-color: var(--qti-border-color);
2639
2508
  outline: 4px solid var(--qti-disabled-bg);
2640
2509
  }
2641
-
2642
2510
  width: 100%;
2643
-
2644
2511
  height: 100%;
2645
-
2646
2512
  background-color: transparent;
2647
-
2648
2513
  margin: 0;
2649
-
2650
2514
  padding: 0;
2651
-
2652
2515
  border: 0;
2653
-
2654
2516
  box-sizing: border-box;
2655
-
2656
2517
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2657
-
2658
2518
  outline: none
2659
2519
  }
2660
-
2661
2520
  &[shape='poly'] {
2662
2521
  &:hover::after {
2663
2522
  content: '';
@@ -2672,7 +2531,6 @@
2672
2531
  );
2673
2532
  display: block;
2674
2533
  }
2675
-
2676
2534
  &:state(--checked)::after,
2677
2535
  &[aria-checked='true']::after {
2678
2536
  content: '';
@@ -2687,14 +2545,12 @@
2687
2545
  );
2688
2546
  display: block;
2689
2547
  }
2690
-
2691
2548
  &[aria-readonly='true'] {
2692
2549
  cursor: pointer;
2693
2550
  background-color: var(--qti-bg);
2694
2551
  outline: 0;
2695
2552
  border: none;
2696
2553
  }
2697
-
2698
2554
  &[aria-disabled='true'] {
2699
2555
  cursor: not-allowed;
2700
2556
  background-color: var(--qti-disabled-bg);
@@ -2705,10 +2561,10 @@
2705
2561
  }
2706
2562
  }
2707
2563
  }
2564
+ }
2708
2565
 
2566
+ @layer qti-components {
2709
2567
  qti-hottext-interaction {
2710
- /* &:not(.qti-input-control-hidden),
2711
- &:not(.qti-unselected-hidden) { */
2712
2568
  &::part(message) {
2713
2569
  display: none;
2714
2570
  color: var(--qti-validation-text, #000);
@@ -2718,23 +2574,18 @@
2718
2574
  border-radius: 4px;
2719
2575
  margin-top: 8px;
2720
2576
  }
2721
-
2722
2577
  qti-hottext {
2723
2578
  display: inline-flex;
2724
2579
  align-items: center;
2725
-
2726
2580
  &:hover {
2727
2581
  }
2728
-
2729
2582
  &:focus {
2730
2583
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2731
2584
  }
2732
-
2733
2585
  &::part(cha) {
2734
2586
  width: calc(var(--qti-form-size) - 6px);
2735
2587
  height: calc(var(--qti-form-size) - 6px);
2736
2588
  }
2737
-
2738
2589
  &:state(radio)::part(ch) {
2739
2590
  border-radius: 100%;
2740
2591
  display: grid;
@@ -2744,12 +2595,10 @@
2744
2595
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2745
2596
  outline: none;
2746
2597
  }
2747
-
2748
2598
  &:state(radio):state(--checked)::part(cha) {
2749
2599
  background-color: var(--qti-border-active);
2750
2600
  border-radius: 100%;
2751
2601
  }
2752
-
2753
2602
  &:state(checkbox)::part(ch) {
2754
2603
  display: flex;
2755
2604
  place-items: center;
@@ -2761,66 +2610,45 @@
2761
2610
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2762
2611
  outline: none;
2763
2612
  }
2764
-
2765
2613
  &:state(checkbox):state(--checked)::part(cha) {
2766
2614
  background-color: var(--qti-border-active);
2767
2615
  -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");
2768
2616
  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");
2769
2617
  }
2770
-
2771
2618
  &:state(correct-response),
2772
2619
  &[data-correct-response='true'] {
2773
2620
  &::after {
2774
2621
  content: '\02714';
2775
- color: #16a34a; /* text-green-600 */
2622
+ color: #16a34a;
2776
2623
  }
2777
2624
  }
2778
-
2779
2625
  gap: 0.5rem;
2780
-
2781
2626
  background-color: var(--qti-bg);
2782
-
2783
2627
  border-radius: var(--qti-border-radius);
2784
-
2785
2628
  padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
2786
-
2787
2629
  outline: none;
2788
-
2789
2630
  cursor: pointer
2790
2631
  }
2791
-
2792
2632
  &.qti-input-control-hidden {
2793
2633
  qti-hottext {
2794
- /* --qti-padding-md: 0.1rem;
2795
- --qti-padding-lg: 0.2rem;
2796
- --qti-border-radius-md: 0.3rem;
2797
- --qti-border-thickness: 1px;
2798
- --qti-font-weight-semibold: 400; */
2799
-
2800
2634
  &:hover {
2801
2635
  }
2802
-
2803
2636
  &:focus {
2804
2637
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2805
2638
  }
2806
-
2807
- /* @layer qti-variants { */
2808
2639
  &::part(ch) {
2809
2640
  display: none;
2810
2641
  }
2811
-
2812
2642
  &:state(--checked) {
2813
2643
  border-color: var(--qti-border-active);
2814
2644
  background-color: var(--qti-bg-active);
2815
2645
  }
2816
-
2817
2646
  &[aria-readonly='true'] {
2818
2647
  cursor: pointer;
2819
2648
  background-color: var(--qti-bg);
2820
2649
  outline: 0;
2821
2650
  border: none;
2822
2651
  }
2823
-
2824
2652
  &[aria-disabled='true'] {
2825
2653
  cursor: not-allowed;
2826
2654
  background-color: var(--qti-disabled-bg);
@@ -2828,47 +2656,33 @@
2828
2656
  border-color: var(--qti-border-color);
2829
2657
  outline: 4px solid var(--qti-disabled-bg);
2830
2658
  }
2831
-
2832
2659
  border-radius: var(--qti-border-radius);
2833
-
2834
2660
  padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
2835
-
2836
2661
  background: var(--qti-bg);
2837
-
2838
2662
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2839
-
2840
2663
  outline: none
2841
2664
  }
2842
-
2843
- /* } */
2844
2665
  }
2845
-
2846
2666
  &.qti-unselected-hidden {
2847
2667
  qti-hottext {
2848
2668
  &:hover {
2849
2669
  }
2850
-
2851
2670
  &:focus {
2852
2671
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2853
2672
  }
2854
-
2855
2673
  cursor: pointer;
2856
-
2857
2674
  &::part(ch) {
2858
2675
  display: none;
2859
2676
  }
2860
-
2861
2677
  &:state(--checked) {
2862
2678
  background-color: var(--qti-bg-active);
2863
2679
  }
2864
-
2865
2680
  &[aria-readonly='true'] {
2866
2681
  cursor: pointer;
2867
2682
  background-color: var(--qti-bg);
2868
2683
  outline: 0;
2869
2684
  border: none;
2870
2685
  }
2871
-
2872
2686
  &[aria-disabled='true'] {
2873
2687
  cursor: not-allowed;
2874
2688
  background-color: var(--qti-disabled-bg);
@@ -2879,52 +2693,39 @@
2879
2693
  }
2880
2694
  }
2881
2695
  }
2696
+ }
2882
2697
 
2698
+ @layer qti-components {
2883
2699
  qti-inline-choice-interaction {
2884
2700
  &:state(candidate-correct) {
2885
2701
  &::part(trigger) {
2886
2702
  background-color: var(--qti-correct);
2887
2703
  }
2888
2704
  }
2889
-
2890
2705
  &:state(candidate-incorrect) {
2891
2706
  &::part(trigger) {
2892
2707
  background-color: var(--qti-incorrect);
2893
2708
  }
2894
2709
  }
2895
-
2896
2710
  &::part(trigger) {
2897
-
2898
2711
  font-size: inherit;
2899
2712
  vertical-align: baseline;
2900
2713
  min-width: var(--qti-calculated-min-width, auto);
2901
-
2902
2714
  &:focus-visible {
2903
2715
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
2904
2716
  }
2905
-
2906
2717
  display: inline-flex;
2907
-
2908
2718
  align-items: center;
2909
-
2910
2719
  justify-content: space-between;
2911
-
2912
2720
  gap: 0.5rem;
2913
-
2914
2721
  border-radius: var(--qti-border-radius);
2915
-
2916
2722
  padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
2917
-
2918
2723
  background: var(--qti-bg);
2919
-
2920
2724
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2921
-
2922
2725
  outline: none
2923
2726
  }
2924
-
2925
2727
  &:not(:state(readonly)):not([readonly])::part(trigger):hover {
2926
2728
  }
2927
-
2928
2729
  &:state(disabled)::part(trigger),
2929
2730
  &[disabled]::part(trigger) {
2930
2731
  cursor: not-allowed;
@@ -2933,7 +2734,6 @@
2933
2734
  border-color: var(--qti-border-color);
2934
2735
  outline: 4px solid var(--qti-disabled-bg);
2935
2736
  }
2936
-
2937
2737
  &:state(readonly)::part(trigger),
2938
2738
  &[readonly]::part(trigger) {
2939
2739
  cursor: pointer;
@@ -2946,33 +2746,21 @@
2946
2746
  border-color: var(--qti-border-color);
2947
2747
  outline: 4px solid var(--qti-disabled-bg);
2948
2748
  }
2949
-
2950
2749
  &::part(dropdown-icon) {
2951
-
2952
2750
  font-size: 1.75em;
2953
-
2954
2751
  display: inline-flex;
2955
-
2956
2752
  align-items: center;
2957
-
2958
2753
  justify-content: center;
2959
-
2960
2754
  flex: 0 0 auto;
2961
-
2962
2755
  transition: transform 150ms ease;
2963
-
2964
2756
  transform-origin: 50% 50%;
2965
-
2966
2757
  color: var(--qti-border-color);
2967
-
2968
2758
  line-height: 1;
2969
2759
  }
2970
-
2971
2760
  &::part(dropdown-icon-open) {
2972
2761
  transform: rotate(180deg);
2973
2762
  color: var(--qti-border-active);
2974
2763
  }
2975
-
2976
2764
  &::part(menu) {
2977
2765
  background: var(--qti-bg);
2978
2766
  border-radius: var(--qti-border-radius);
@@ -2982,7 +2770,6 @@
2982
2770
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
2983
2771
  outline: none;
2984
2772
  }
2985
-
2986
2773
  &::part(option) {
2987
2774
  display: flex;
2988
2775
  align-items: center;
@@ -3001,18 +2788,14 @@
3001
2788
  overflow: hidden;
3002
2789
  text-overflow: ellipsis;
3003
2790
  }
3004
-
3005
2791
  &::part(option):hover {
3006
2792
  }
3007
-
3008
2793
  &::part(option):focus-visible {
3009
2794
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3010
2795
  }
3011
-
3012
2796
  &::part(option-selected) {
3013
2797
  background-color: var(--qti-bg-active);
3014
2798
  }
3015
-
3016
2799
  & qti-inline-choice {
3017
2800
  display: flex;
3018
2801
  align-items: center;
@@ -3031,19 +2814,18 @@
3031
2814
  overflow: hidden;
3032
2815
  text-overflow: ellipsis;
3033
2816
  }
3034
-
3035
2817
  & qti-inline-choice:hover {
3036
2818
  }
3037
-
3038
2819
  & qti-inline-choice:focus-visible {
3039
2820
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3040
2821
  }
3041
-
3042
2822
  & qti-inline-choice:state(--checked) {
3043
2823
  background-color: var(--qti-bg-active);
3044
2824
  }
3045
2825
  }
2826
+ }
3046
2827
 
2828
+ @layer qti-components {
3047
2829
  qti-match-interaction.qti-match-tabular {
3048
2830
  &::part(message) {
3049
2831
  display: none;
@@ -3054,52 +2836,41 @@
3054
2836
  border-radius: 4px;
3055
2837
  margin-top: 8px;
3056
2838
  }
3057
- /* Table element */
3058
2839
  &::part(table) {
3059
2840
  border-collapse: collapse;
3060
2841
  width: 100%;
3061
2842
  }
3062
-
3063
- /* Row headers - take up remaining space */
3064
2843
  &::part(r-header) {
3065
2844
  background-color: var(--qti-bg-active, #f8f8f8);
3066
2845
  font-weight: 500;
3067
2846
  text-align: center;
3068
2847
  padding: 8px 15px;
3069
2848
  border: 1px solid #ddd;
3070
- width: auto; /* Let it expand naturally */
3071
- word-wrap: break-word; /* Allow long words to break */
3072
- white-space: wrap; /* Allow text to wrap to multiple lines */
3073
- min-width: 4rem; /* Allow column to shrink below content width */
2849
+ width: auto;
2850
+ word-wrap: break-word;
2851
+ white-space: wrap;
2852
+ min-width: 4rem;
3074
2853
  }
3075
-
3076
- /* Column headers - minimal width */
3077
2854
  &::part(c-header) {
3078
2855
  background-color: var(--qti-bg-active, #f8f8f8);
3079
2856
  font-weight: 500;
3080
2857
  text-align: left;
3081
2858
  padding: 8px;
3082
2859
  border: 1px solid #ddd;
3083
- width: 8rem; /* Force minimal width */
3084
- white-space: normal; /* Prevent wrapping */
2860
+ width: 8rem;
2861
+ white-space: normal;
3085
2862
  }
3086
-
3087
- /* Table rows */
3088
2863
  &::part(row) {
3089
2864
  border-bottom: 1px solid #ddd;
3090
2865
  }
3091
-
3092
- /* Input cells - minimal width */
3093
2866
  &::part(input-cell) {
3094
2867
  text-align: center;
3095
2868
  vertical-align: middle;
3096
2869
  height: 48px;
3097
2870
  border: 1px solid #ddd;
3098
2871
  padding: 8px;
3099
- width: 1%; /* Force minimal width */
2872
+ width: 1%;
3100
2873
  }
3101
-
3102
- /* Radio button styling */
3103
2874
  &::part(rb) {
3104
2875
  -webkit-appearance: none;
3105
2876
  -moz-appearance: none;
@@ -3113,13 +2884,9 @@
3113
2884
  cursor: pointer;
3114
2885
  display: block;
3115
2886
  }
3116
-
3117
- /* Radio button checked state */
3118
2887
  &::part(rb-checked) {
3119
2888
  box-shadow: inset 0 0 0 6px var(--qti-border-active, #2196f3);
3120
2889
  }
3121
-
3122
- /* Checkbox styling */
3123
2890
  &::part(cb) {
3124
2891
  -webkit-appearance: none;
3125
2892
  -moz-appearance: none;
@@ -3133,12 +2900,9 @@
3133
2900
  cursor: pointer;
3134
2901
  display: block;
3135
2902
  }
3136
-
3137
- /* Checkbox checked state - only change border if we're adding an SVG checkmark */
3138
2903
  &::part(cb-checked) {
3139
2904
  background-color: var(--qti-border-active, #2196f3) !important;
3140
2905
  }
3141
-
3142
2906
  &::part(checkmark) {
3143
2907
  position: absolute;
3144
2908
  width: 18px;
@@ -3147,123 +2911,90 @@
3147
2911
  left: 3px;
3148
2912
  pointer-events: none;
3149
2913
  }
3150
-
3151
- /* Correct answers for both types */
3152
2914
  &::part(rb-correct) {
3153
2915
  border-color: var(--qti-correct, #4caf50);
3154
2916
  }
3155
-
3156
2917
  &::part(rb-checked rb-correct) {
3157
2918
  box-shadow: inset 0 0 0 6px var(--qti-correct, #4caf50);
3158
2919
  }
3159
-
3160
2920
  &::part(cb-correct) {
3161
2921
  border-color: var(--qti-correct, #4caf50);
3162
2922
  }
3163
-
3164
2923
  &::part(cb-checked cb-correct) {
3165
2924
  background-color: var(--qti-correct, #4caf50) !important;
3166
2925
  }
3167
-
3168
- /* Incorrect answers for both types */
3169
2926
  &::part(rb-incorrect) {
3170
2927
  border-color: var(--qti-incorrect, #f44336);
3171
2928
  }
3172
-
3173
2929
  &::part(rb-checked rb-incorrect) {
3174
2930
  box-shadow: inset 0 0 0 6px var(--qti-incorrect, #f44336);
3175
2931
  }
3176
-
3177
2932
  &::part(cb-incorrect) {
3178
2933
  border-color: var(--qti-incorrect, #f44336);
3179
2934
  }
3180
-
3181
2935
  &::part(cb-checked cb-incorrect) {
3182
2936
  background-color: var(--qti-incorrect, #f44336) !important;
3183
2937
  }
3184
2938
  }
3185
-
3186
2939
  qti-match-interaction:not(.qti-match-tabular) {
3187
2940
  &:state(--dragzone-enabled) qti-simple-match-set:first-of-type {
3188
2941
  background-color: var(--qti-bg-active);
3189
2942
  }
3190
-
3191
2943
  &:state(--dragzone-active) qti-simple-match-set:first-of-type {
3192
2944
  border-color: var(--qti-border-active);
3193
2945
  background-color: var(--qti-bg-active);
3194
2946
  }
3195
-
3196
- /* The draggables */
3197
2947
  & qti-simple-match-set:first-of-type {
3198
2948
  display: flex;
3199
2949
  flex-wrap: wrap;
3200
- align-items: flex-start; /* Prevents children from stretching */
2950
+ align-items: flex-start;
3201
2951
  gap: var(--qti-gap-size);
3202
2952
  border: 2px solid transparent;
3203
-
3204
2953
  & qti-simple-associable-choice {
3205
-
3206
2954
  &[dragging] {
3207
2955
  pointer-events: none;
3208
2956
  rotate: -2deg;
3209
2957
  box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
3210
2958
  0 4px 8px rgb(0 0 0 / 10%);
3211
2959
  }
3212
-
3213
2960
  &:hover {
3214
2961
  }
3215
-
3216
2962
  &:focus {
3217
2963
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3218
2964
  }
3219
-
3220
2965
  box-sizing: border-box;
3221
-
3222
2966
  transition: transform 200ms ease-out,
3223
2967
  box-shadow 200ms ease-out,
3224
2968
  rotate 200ms ease-out;
3225
-
3226
2969
  cursor: grab;
3227
-
3228
2970
  background-color: var(--qti-bg);
3229
-
3230
2971
  padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3231
-
3232
2972
  border-radius: var(--qti-border-radius);
3233
-
3234
2973
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3235
-
3236
2974
  outline: none
3237
2975
  }
3238
2976
  }
3239
-
3240
- /* The droppables */
3241
2977
  & qti-simple-match-set:last-of-type {
3242
2978
  display: grid;
3243
2979
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
3244
2980
  grid-auto-flow: unset;
3245
2981
  grid-auto-columns: unset;
3246
2982
  gap: var(--qti-gap-size);
3247
-
3248
2983
  & > qti-simple-associable-choice {
3249
- /* a droppable qti-simple-associable-choice */
3250
2984
  display: flex;
3251
2985
  flex-direction: column;
3252
2986
  justify-content: space-between;
3253
2987
  grid-row: unset;
3254
2988
  box-sizing: border-box;
3255
-
3256
2989
  & img {
3257
2990
  max-width: 100%;
3258
2991
  height: auto;
3259
2992
  }
3260
-
3261
2993
  &[enabled] {
3262
2994
  &::part(dropslot) {
3263
2995
  background-color: var(--qti-bg-active);
3264
2996
  }
3265
2997
  }
3266
-
3267
2998
  &[disabled] {
3268
2999
  &::part(dropslot) {
3269
3000
  cursor: not-allowed;
@@ -3273,27 +3004,22 @@
3273
3004
  outline: 4px solid var(--qti-disabled-bg);
3274
3005
  }
3275
3006
  }
3276
-
3277
3007
  &[active] {
3278
3008
  &::part(dropslot) {
3279
3009
  border-color: var(--qti-border-active);
3280
3010
  background-color: var(--qti-bg-active);
3281
3011
  }
3282
3012
  }
3283
-
3284
3013
  &::part(dropslot) {
3285
-
3286
3014
  &[dragging] {
3287
3015
  pointer-events: none;
3288
3016
  rotate: -2deg;
3289
3017
  box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
3290
3018
  0 4px 8px rgb(0 0 0 / 10%);
3291
3019
  }
3292
-
3293
3020
  &:focus {
3294
3021
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3295
3022
  }
3296
-
3297
3023
  padding: var(--qti-dropzone-padding);
3298
3024
  margin-top: 0.5rem;
3299
3025
  gap: 0.5rem;
@@ -3308,102 +3034,74 @@
3308
3034
  position: relative;
3309
3035
  background-color: var(--qti-bg);
3310
3036
  }
3311
-
3312
3037
  & > *:not(qti-simple-associable-choice) {
3313
3038
  pointer-events: none;
3314
3039
  }
3315
-
3316
3040
  & > qti-simple-associable-choice {
3317
-
3318
3041
  &:state(candidate-correct) {
3319
3042
  background-color: var(--qti-correct);
3320
3043
  }
3321
-
3322
3044
  &:state(candidate-incorrect) {
3323
3045
  background-color: var(--qti-incorrect);
3324
3046
  }
3325
-
3326
3047
  &::part(dropslot) {
3327
3048
  display: none;
3328
3049
  }
3329
-
3330
3050
  &:hover {
3331
3051
  }
3332
-
3333
3052
  &:focus {
3334
3053
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3335
3054
  }
3336
-
3337
3055
  flex-basis: fit-content;
3338
-
3339
3056
  box-sizing: border-box;
3340
-
3341
3057
  transition: transform 200ms ease-out,
3342
3058
  box-shadow 200ms ease-out,
3343
3059
  rotate 200ms ease-out;
3344
-
3345
3060
  cursor: grab;
3346
-
3347
3061
  background-color: var(--qti-bg);
3348
-
3349
3062
  padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3350
-
3351
3063
  border-radius: var(--qti-border-radius);
3352
-
3353
3064
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3354
-
3355
3065
  outline: none;
3356
3066
  }
3357
3067
  }
3358
3068
  }
3359
3069
  }
3070
+ }
3360
3071
 
3072
+ @layer qti-components {
3361
3073
  qti-order-interaction {
3362
3074
  &:state(--dragzone-active)::part(drags) {
3363
3075
  border-color: var(--qti-border-active);
3364
3076
  background-color: var(--qti-bg-active);
3365
3077
  }
3366
-
3367
3078
  &:state(--dragzone-enabled)::part(drags) {
3368
3079
  background-color: var(--qti-bg-active);
3369
3080
  }
3370
-
3371
3081
  &::part(qti-simple-choice),
3372
3082
  & qti-simple-choice {
3373
-
3374
3083
  &[dragging] {
3375
3084
  pointer-events: none;
3376
3085
  rotate: -2deg;
3377
3086
  box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
3378
3087
  0 4px 8px rgb(0 0 0 / 10%);
3379
3088
  }
3380
-
3381
3089
  &:hover {
3382
3090
  }
3383
-
3384
3091
  &:focus {
3385
3092
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3386
3093
  }
3387
-
3388
3094
  box-sizing: border-box;
3389
-
3390
3095
  transition: transform 200ms ease-out,
3391
3096
  box-shadow 200ms ease-out,
3392
3097
  rotate 200ms ease-out;
3393
-
3394
3098
  cursor: grab;
3395
-
3396
3099
  background-color: var(--qti-bg);
3397
-
3398
3100
  padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3399
-
3400
3101
  border-radius: var(--qti-border-radius);
3401
-
3402
3102
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3403
-
3404
3103
  outline: none
3405
3104
  }
3406
-
3407
3105
  &::part(qti-simple-choice) {
3408
3106
  display: flex;
3409
3107
  overflow: hidden;
@@ -3411,38 +3109,27 @@
3411
3109
  width: 100%;
3412
3110
  text-overflow: ellipsis;
3413
3111
  }
3414
-
3415
3112
  &::part(drops) {
3416
- gap: 0.5rem; /* gap-2 */
3113
+ gap: 0.5rem;
3417
3114
  }
3418
-
3419
3115
  &::part(drags) {
3420
- gap: 0.5rem; /* gap-2 */
3116
+ gap: 0.5rem;
3421
3117
  }
3422
-
3423
3118
  &::part(drop-list) {
3424
-
3425
3119
  &[enabled] {
3426
-
3427
- /* Light theme override */
3428
3120
  .qti-selections-light {
3429
3121
  border-color: var(--qti-light-border-active);
3430
3122
  }
3431
-
3432
- /* Dark theme override */
3433
3123
  .qti-selections-dark {
3434
3124
  border-color: var(--qti-dark-border-active);
3435
3125
  }
3436
3126
  background-color: var(--qti-bg-active)
3437
3127
  }
3438
-
3439
3128
  &:hover {
3440
3129
  }
3441
-
3442
3130
  &:focus {
3443
3131
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3444
3132
  }
3445
-
3446
3133
  display: flex;
3447
3134
  min-height: 4rem;
3448
3135
  border: var(--qti-border-thickness) dashed var(--qti-border-color);
@@ -3452,34 +3139,27 @@
3452
3139
  position: relative;
3453
3140
  background-color: var(--qti-bg);
3454
3141
  }
3455
-
3456
3142
  &::part(active) {
3457
3143
  border-color: var(--qti-border-active);
3458
3144
  background-color: var(--qti-bg-active);
3459
3145
  }
3460
-
3461
3146
  & drop-list {
3462
3147
  &[shape='circle'] {
3463
-
3464
3148
  &:hover {
3465
3149
  }
3466
-
3467
3150
  &:focus {
3468
3151
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3469
3152
  }
3470
-
3471
3153
  &[aria-checked='true'] {
3472
3154
  border-color: var(--qti-border-active);
3473
3155
  background-color: var(--qti-bg-active);
3474
3156
  }
3475
-
3476
3157
  &[aria-readonly='true'] {
3477
3158
  cursor: pointer;
3478
3159
  background-color: var(--qti-bg);
3479
3160
  outline: 0;
3480
3161
  border: none;
3481
3162
  }
3482
-
3483
3163
  &[aria-disabled='true'] {
3484
3164
  cursor: not-allowed;
3485
3165
  background-color: var(--qti-disabled-bg);
@@ -3487,47 +3167,32 @@
3487
3167
  border-color: var(--qti-border-color);
3488
3168
  outline: 4px solid var(--qti-disabled-bg);
3489
3169
  }
3490
-
3491
3170
  width: 100%;
3492
-
3493
3171
  height: 100%;
3494
-
3495
3172
  background-color: transparent;
3496
-
3497
3173
  margin: 0;
3498
-
3499
3174
  padding: 0;
3500
-
3501
3175
  border: 0;
3502
-
3503
3176
  box-sizing: border-box;
3504
-
3505
3177
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3506
-
3507
3178
  outline: none
3508
3179
  }
3509
-
3510
3180
  &[shape='square'] {
3511
-
3512
3181
  &:hover {
3513
3182
  }
3514
-
3515
3183
  &:focus {
3516
3184
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3517
3185
  }
3518
-
3519
3186
  &[aria-checked='true'] {
3520
3187
  border-color: var(--qti-border-active);
3521
3188
  background-color: var(--qti-bg-active);
3522
3189
  }
3523
-
3524
3190
  &[aria-readonly='true'] {
3525
3191
  cursor: pointer;
3526
3192
  background-color: var(--qti-bg);
3527
3193
  outline: 0;
3528
3194
  border: none;
3529
3195
  }
3530
-
3531
3196
  &[aria-disabled='true'] {
3532
3197
  cursor: not-allowed;
3533
3198
  background-color: var(--qti-disabled-bg);
@@ -3535,28 +3200,21 @@
3535
3200
  border-color: var(--qti-border-color);
3536
3201
  outline: 4px solid var(--qti-disabled-bg);
3537
3202
  }
3538
-
3539
3203
  width: 100%;
3540
-
3541
3204
  height: 100%;
3542
-
3543
3205
  background-color: transparent;
3544
-
3545
3206
  margin: 0;
3546
-
3547
3207
  padding: 0;
3548
-
3549
3208
  border: 0;
3550
-
3551
3209
  box-sizing: border-box;
3552
-
3553
3210
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3554
-
3555
3211
  outline: none
3556
3212
  }
3557
3213
  }
3558
3214
  }
3215
+ }
3559
3216
 
3217
+ @layer qti-components {
3560
3218
  qti-associate-interaction {
3561
3219
  &::part(message) {
3562
3220
  display: none;
@@ -3567,64 +3225,38 @@
3567
3225
  border-radius: 4px;
3568
3226
  margin-top: 8px;
3569
3227
  }
3570
- /* General styles for active and enabled states */
3571
3228
  &:state(--dragzone-active) slot[name='qti-simple-associable-choice'] {
3572
3229
  border-color: var(--qti-border-active);
3573
3230
  background-color: var(--qti-bg-active);
3574
3231
  }
3575
-
3576
3232
  &:state(--dragzone-enabled) slot[name='qti-simple-associable-choice'] {
3577
3233
  background-color: var(--qti-bg-active);
3578
3234
  }
3579
-
3580
- & qti-simple-associable-choice, /* drags when in lightdom */
3581
- &::part(qti-simple-associable-choice) /* drags when in shadowdom */ {
3582
-
3235
+ & qti-simple-associable-choice,
3236
+ &::part(qti-simple-associable-choice) {
3583
3237
  &:hover {
3584
3238
  }
3585
-
3586
3239
  &:focus {
3587
3240
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3588
3241
  }
3589
-
3590
3242
  &[dragging] {
3591
3243
  pointer-events: none;
3592
3244
  rotate: -2deg;
3593
3245
  box-shadow: 0 8px 12px rgb(0 0 0 / 20%),
3594
3246
  0 4px 8px rgb(0 0 0 / 10%);
3595
3247
  }
3596
-
3597
3248
  box-sizing: border-box;
3598
-
3599
3249
  transition: transform 200ms ease-out,
3600
3250
  box-shadow 200ms ease-out,
3601
3251
  rotate 200ms ease-out;
3602
-
3603
3252
  cursor: grab;
3604
-
3605
3253
  background-color: var(--qti-bg);
3606
-
3607
3254
  padding: var(--qti-padding-vertical) var(--qti-padding-horizontal);
3608
-
3609
3255
  border-radius: var(--qti-border-radius);
3610
-
3611
3256
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3612
-
3613
3257
  outline: none
3614
3258
  }
3615
-
3616
- /* display: flex;
3617
- overflow: hidden;
3618
- align-items: center; */
3619
-
3620
- /* &::part(drop-container) {
3621
- display: flex;
3622
- flex-direction: column;
3623
- gap: var(--qti-gap-size);
3624
- } */
3625
-
3626
3259
  &::part(drop-list) {
3627
-
3628
3260
  display: grid;
3629
3261
  height: 3rem;
3630
3262
  min-width: 10rem;
@@ -3635,21 +3267,17 @@
3635
3267
  position: relative;
3636
3268
  background-color: var(--qti-bg);
3637
3269
  }
3638
-
3639
3270
  &::part(drop-list):focus {
3640
3271
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3641
3272
  }
3642
-
3643
3273
  &::part(drop-list)[dragging] {
3644
3274
  border-color: var(--qti-border-active);
3645
3275
  background-color: var(--qti-bg-active);
3646
3276
  }
3647
-
3648
- /* &::part(drop-list) {
3649
- @apply act;
3650
- } */
3651
3277
  }
3278
+ }
3652
3279
 
3280
+ @layer qti-components {
3653
3281
  qti-graphic-order-interaction {
3654
3282
  &::part(message) {
3655
3283
  display: none;
@@ -3660,33 +3288,27 @@
3660
3288
  border-radius: 4px;
3661
3289
  margin-top: 8px;
3662
3290
  }
3663
-
3664
3291
  & qti-hotspot-choice {
3665
3292
  width: 100%;
3666
3293
  height: 100%;
3667
3294
  background-color: rgb(128 128 128 / 30%);
3668
3295
  padding: 0;
3669
-
3670
3296
  &:hover {
3671
3297
  background-color: rgb(128 128 128 / 70%);
3672
3298
  }
3673
-
3674
3299
  &:focus {
3675
3300
  background-color: rgb(128 128 128 / 70%);
3676
3301
  }
3677
-
3678
3302
  &:state(--checked),
3679
3303
  &[aria-checked='true'] {
3680
3304
  background-color: rgb(128 128 128 / 70%);
3681
3305
  }
3682
-
3683
3306
  &[aria-readonly='true'] {
3684
3307
  cursor: pointer;
3685
3308
  background-color: var(--qti-bg);
3686
3309
  outline: 0;
3687
3310
  border: none;
3688
3311
  }
3689
-
3690
3312
  &[aria-disabled='true'] {
3691
3313
  cursor: not-allowed;
3692
3314
  background-color: var(--qti-disabled-bg);
@@ -3694,67 +3316,55 @@
3694
3316
  border-color: var(--qti-border-color);
3695
3317
  outline: 4px solid var(--qti-disabled-bg);
3696
3318
  }
3697
-
3698
3319
  &[aria-ordervalue] {
3699
3320
  display: grid;
3700
3321
  place-content: center;
3701
3322
  }
3702
-
3703
3323
  &[aria-ordervalue]::after {
3704
3324
  content: attr(aria-ordervalue) !important;
3705
3325
  }
3706
-
3707
3326
  &[aria-ordercorrectvalue] {
3708
3327
  display: grid;
3709
3328
  place-content: center;
3710
3329
  }
3711
-
3712
- /* When both attributes are present */
3713
3330
  &[aria-ordercorrectvalue][aria-ordervalue]::after {
3714
3331
  content: 'C=' attr(aria-ordercorrectvalue) ' R=' attr(aria-ordervalue) !important;
3715
3332
  color: var(--qti-correct);
3716
3333
  }
3717
-
3718
- /* When only aria-ordercorrectvalue is present */
3719
3334
  &[aria-ordercorrectvalue]:not([aria-ordervalue])::after {
3720
3335
  content: 'C=' attr(aria-ordercorrectvalue) !important;
3721
3336
  color: var(--qti-correct);
3722
3337
  }
3723
3338
  }
3724
-
3725
3339
  &.qti-selections-light {
3726
3340
  &:state(--dragzone-active)::part(drags) {
3727
3341
  background-color: var(--qti-light-bg-active);
3728
3342
  border-color: var(--qti-light-border-active);
3729
3343
  }
3730
-
3731
3344
  &:state(--dragzone-enabled)::part(drags) {
3732
3345
  background-color: var(--qti-light-bg-active);
3733
3346
  }
3734
3347
  }
3735
-
3736
3348
  &.qti-selections-dark {
3737
3349
  &:state(--dragzone-active)::part(drags) {
3738
3350
  background-color: var(--qti-dark-bg-active);
3739
3351
  border-color: var(--qti-dark-border-active);
3740
3352
  }
3741
-
3742
3353
  &:state(--dragzone-enabled)::part(drags) {
3743
3354
  background-color: var(--qti-dark-bg-active);
3744
3355
  }
3745
3356
  }
3746
-
3747
- /* General styles for active and enabled states */
3748
3357
  &:state(--dragzone-active)::part(drags) {
3749
3358
  border-color: var(--qti-border-active);
3750
3359
  background-color: var(--qti-bg-active);
3751
3360
  }
3752
-
3753
3361
  &:state(--dragzone-enabled)::part(drags) {
3754
3362
  background-color: var(--qti-bg-active);
3755
3363
  }
3756
3364
  }
3365
+ }
3757
3366
 
3367
+ @layer qti-components {
3758
3368
  qti-graphic-associate-interaction {
3759
3369
  &::part(message) {
3760
3370
  display: none;
@@ -3767,29 +3377,23 @@
3767
3377
  }
3768
3378
  position: relative;
3769
3379
  display: block;
3770
-
3771
3380
  & qti-associable-hotspot {
3772
3381
  &[shape='circle'] {
3773
-
3774
3382
  &:hover {
3775
3383
  }
3776
-
3777
3384
  &:focus {
3778
3385
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3779
3386
  }
3780
-
3781
3387
  &[aria-checked='true'] {
3782
3388
  border-color: var(--qti-border-active);
3783
3389
  background-color: var(--qti-bg-active);
3784
3390
  }
3785
-
3786
3391
  &[aria-readonly='true'] {
3787
3392
  cursor: pointer;
3788
3393
  background-color: var(--qti-bg);
3789
3394
  outline: 0;
3790
3395
  border: none;
3791
3396
  }
3792
-
3793
3397
  &[aria-disabled='true'] {
3794
3398
  cursor: not-allowed;
3795
3399
  background-color: var(--qti-disabled-bg);
@@ -3797,47 +3401,32 @@
3797
3401
  border-color: var(--qti-border-color);
3798
3402
  outline: 4px solid var(--qti-disabled-bg);
3799
3403
  }
3800
-
3801
3404
  width: 100%;
3802
-
3803
3405
  height: 100%;
3804
-
3805
3406
  background-color: transparent;
3806
-
3807
3407
  margin: 0;
3808
-
3809
3408
  padding: 0;
3810
-
3811
3409
  border: 0;
3812
-
3813
3410
  box-sizing: border-box;
3814
-
3815
3411
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3816
-
3817
3412
  outline: none
3818
3413
  }
3819
-
3820
3414
  &[shape='square'] {
3821
-
3822
3415
  &:hover {
3823
3416
  }
3824
-
3825
3417
  &:focus {
3826
3418
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3827
3419
  }
3828
-
3829
3420
  &[aria-checked='true'] {
3830
3421
  border-color: var(--qti-border-active);
3831
3422
  background-color: var(--qti-bg-active);
3832
3423
  }
3833
-
3834
3424
  &[aria-readonly='true'] {
3835
3425
  cursor: pointer;
3836
3426
  background-color: var(--qti-bg);
3837
3427
  outline: 0;
3838
3428
  border: none;
3839
3429
  }
3840
-
3841
3430
  &[aria-disabled='true'] {
3842
3431
  cursor: not-allowed;
3843
3432
  background-color: var(--qti-disabled-bg);
@@ -3845,108 +3434,89 @@
3845
3434
  border-color: var(--qti-border-color);
3846
3435
  outline: 4px solid var(--qti-disabled-bg);
3847
3436
  }
3848
-
3849
3437
  width: 100%;
3850
-
3851
3438
  height: 100%;
3852
-
3853
3439
  background-color: transparent;
3854
-
3855
3440
  margin: 0;
3856
-
3857
3441
  padding: 0;
3858
-
3859
3442
  border: 0;
3860
-
3861
3443
  box-sizing: border-box;
3862
-
3863
3444
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3864
-
3865
3445
  outline: none
3866
3446
  }
3867
3447
  }
3868
-
3869
3448
  &.qti-selections-light {
3870
3449
  &:state(--dragzone-active)::part(drags) {
3871
3450
  background-color: var(--qti-light-bg-active);
3872
3451
  border-color: var(--qti-light-border-active);
3873
3452
  }
3874
-
3875
3453
  &:state(--dragzone-enabled)::part(drags) {
3876
3454
  background-color: var(--qti-light-bg-active);
3877
3455
  }
3878
3456
  }
3879
-
3880
3457
  &.qti-selections-dark {
3881
3458
  &:state(--dragzone-active)::part(drags) {
3882
3459
  background-color: var(--qti-dark-bg-active);
3883
3460
  border-color: var(--qti-dark-border-active);
3884
3461
  }
3885
-
3886
3462
  &:state(--dragzone-enabled)::part(drags) {
3887
3463
  background-color: var(--qti-dark-bg-active);
3888
3464
  }
3889
3465
  }
3890
-
3891
- /* General styles for active and enabled states */
3892
3466
  &:state(--dragzone-active)::part(drags) {
3893
3467
  border-color: var(--qti-border-active);
3894
3468
  background-color: var(--qti-bg-active);
3895
3469
  }
3896
-
3897
3470
  &:state(--dragzone-enabled)::part(drags) {
3898
3471
  background-color: var(--qti-bg-active);
3899
3472
  }
3900
3473
  }
3474
+ }
3901
3475
 
3476
+ @layer qti-components {
3902
3477
  qti-slider-interaction {
3903
3478
  --qti-tick-color: rgb(229 231 235 / 100%);
3904
3479
  --qti-tick-width: 1px;
3905
3480
  }
3481
+ }
3906
3482
 
3483
+ @layer qti-components {
3907
3484
  qti-select-point-interaction {
3908
3485
  &::part(point) {
3909
3486
  &:hover {
3910
3487
  }
3911
-
3912
3488
  &:focus {
3913
3489
  box-shadow: 0 0 0 var(--qti-focus-border-width) var(--qti-focus-color);
3914
3490
  }
3915
-
3916
3491
  box-sizing: border-box;
3917
-
3918
3492
  border-radius: 100%;
3919
-
3920
3493
  border: 1px solid white;
3921
-
3922
3494
  background-color: black;
3923
-
3924
3495
  opacity: 0.5;
3925
-
3926
3496
  padding: 0;
3927
-
3928
3497
  border: var(--qti-border-thickness) var(--qti-border-style) var(--qti-border-color);
3929
-
3930
3498
  outline: none;
3931
3499
  }
3932
-
3933
3500
  &::part(correct) {
3934
3501
  background-color: var(--qti-correct);
3935
3502
  }
3936
-
3937
3503
  &::part(incorrect) {
3938
3504
  background-color: var(--qti-incorrect);
3939
3505
  }
3940
3506
  }
3507
+ }
3941
3508
 
3509
+ @layer qti-components {
3942
3510
  qti-position-object-stage {
3943
3511
  & qti-position-object-interaction {
3944
3512
  /* no styles necessary, only layout styles, defined in the component */
3945
3513
  }
3946
3514
  }
3515
+ }
3947
3516
 
3517
+ @layer qti-components {
3948
3518
  qti-prompt {
3949
- margin: 0.5rem 0; /* my-2 */
3519
+ margin: 0.5rem 0;
3950
3520
  display: block;
3951
3521
  width: 100%;
3952
3522
  }