@citolab/qti-components 6.0.6 → 6.0.8
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/{chunk-OIQME3LC.js → chunk-YDZUFMBB.js} +15 -23
- package/dist/custom-elements.json +394 -471
- package/dist/index.css +11 -7
- package/dist/index.d.ts +2 -6
- package/dist/index.js +40 -48
- package/dist/qti-item/index.d.ts +4 -34
- package/dist/qti-item/index.js +1 -1
- package/dist/qti-item-8c26fa9e.d.ts +30 -0
- package/dist/qti-item-react/index.d.ts +3 -4
- package/dist/qti-item-react/index.js +1 -1
- package/package.json +5 -4
- package/dist/chunk-67UY4OJW.js +0 -2121
- package/dist/chunk-7RTSAPMF.js +0 -2135
- package/dist/chunk-E7DMNXUW.js +0 -2127
- package/dist/chunk-K2XJ4SA2.js +0 -2211
- package/dist/chunk-MGEP4U4L.js +0 -2139
- package/dist/chunk-QH4IMEWP.js +0 -2175
- package/dist/chunk-TI6G3PT6.js +0 -2172
- package/dist/qti-simple-choice-4df32b16.d.ts +0 -352
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as n,b as s}from"./chunk-DLLHO3W2.js";import{c as i}from"./chunk-NMCIOGD2.js";import{css as g,html as h,LitElement as l}from"lit";import{customElement as p,property as w}from"lit/decorators.js";import{unsafeHTML as f}from"lit/directives/unsafe-html.js";import{ContextProvider as v}from"@lit-labs/context";var c=`/* PK: Tailwind theming file for all qti-components
|
|
2
2
|
Uses tailwind components and utilities from the other files
|
|
3
3
|
|
|
4
4
|
https://play.tailwindcss.com/OFThGk8CbR
|
|
@@ -626,9 +626,11 @@ qti-choice-interaction:not(.qti-input-control-hidden) qti-simple-choice[role='ch
|
|
|
626
626
|
--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity));
|
|
627
627
|
}
|
|
628
628
|
|
|
629
|
-
qti-choice-interaction:not(.qti-input-control-hidden) qti-simple-choice[role='checkbox'][aria-checked='true']::part(cha)
|
|
630
|
-
|
|
631
|
-
|
|
629
|
+
qti-choice-interaction:not(.qti-input-control-hidden) qti-simple-choice[role='checkbox'][aria-checked='true']::part(cha){
|
|
630
|
+
--tw-bg-opacity: 1;
|
|
631
|
+
background-color: rgb(59 130 246 / var(--tw-bg-opacity));
|
|
632
|
+
-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");
|
|
633
|
+
}
|
|
632
634
|
|
|
633
635
|
qti-choice-interaction:not(.qti-input-control-hidden) qti-simple-choice:hover{
|
|
634
636
|
--tw-bg-opacity: 1;
|
|
@@ -1252,9 +1254,11 @@ qti-hottext-interaction:not(.qti-input-control-hidden) qti-hottext[role='checkbo
|
|
|
1252
1254
|
--tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity));
|
|
1253
1255
|
}
|
|
1254
1256
|
|
|
1255
|
-
qti-hottext-interaction:not(.qti-input-control-hidden) qti-hottext[role='checkbox'][aria-checked='true']::part(cha)
|
|
1256
|
-
|
|
1257
|
-
|
|
1257
|
+
qti-hottext-interaction:not(.qti-input-control-hidden) qti-hottext[role='checkbox'][aria-checked='true']::part(cha){
|
|
1258
|
+
--tw-bg-opacity: 1;
|
|
1259
|
+
background-color: rgb(59 130 246 / var(--tw-bg-opacity));
|
|
1260
|
+
-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");
|
|
1261
|
+
}
|
|
1258
1262
|
|
|
1259
1263
|
qti-hottext-interaction:not(.qti-input-control-hidden) qti-hottext{
|
|
1260
1264
|
display: inline-flex;
|
|
@@ -1698,7 +1702,7 @@ qti-associate-interaction::part(associables-container){
|
|
|
1698
1702
|
background: linear-gradient(
|
|
1699
1703
|
180deg,
|
|
1700
1704
|
rgb(0 0 0 / 0%) calc(50% - 1px),
|
|
1701
|
-
#
|
|
1705
|
+
#000000 calc(50%),
|
|
1702
1706
|
rgb(0 0 0 / 0%) calc(50% + 1px)
|
|
1703
1707
|
);
|
|
1704
1708
|
}
|
|
@@ -2193,20 +2197,8 @@ video {
|
|
|
2193
2197
|
max-width: 100%;
|
|
2194
2198
|
height: auto;
|
|
2195
2199
|
}
|
|
2196
|
-
`;var
|
|
2200
|
+
`;var o=class extends l{constructor(){super(...arguments);this.disabled=!1;this.readonly=!1;this.provider=new v(this,s,{log:t=>console.log(`[my-app] ${t}`),view:"candidate"});this.processResponse=()=>{var t;return(t=this._item)==null?void 0:t.processResponse()};this.showCorrectResponse=()=>{var t;return(t=this._item)==null?void 0:t.showCorrectResponse()};this.validateResponses=()=>this._item?this._item.validateResponses():!1;this.resetInteractions=()=>{var t;return(t=this._item)==null?void 0:t.resetInteractions()};this.render=()=>h`${f(this._xml)}`}handleDisabledChange(t,r){var a,e;r&&((a=this._item)==null||a.setAttribute("disabled","")),!r&&((e=this._item)==null||e.removeAttribute("disabled"))}handleReadonlyChange(t,r){var a,e;r&&((a=this._item)==null||a.setAttribute("readonly","")),!r&&((e=this._item)==null||e.removeAttribute("readonly"))}handleResponsesChange(t,r){this._item&&(this._item.responses=r)}set qtiContext(t){this.provider.value.view=t.view,this.provider.updateObservers()}get _item(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("qti-assessment-item")}set xml(t){let r=this._xml;this._xml=t,this.requestUpdate("xml",r)}get xml(){return this._xml}connectedCallback(){super.connectedCallback();let t=new CSSStyleSheet;t.replaceSync(c),this.shadowRoot.adoptedStyleSheets.push(t)}};o.styles=g`
|
|
2197
2201
|
:host {
|
|
2198
|
-
display: block;
|
|
2199
|
-
width: 100%;
|
|
2200
|
-
height: 100%;
|
|
2201
|
-
overflow: auto;
|
|
2202
|
-
}
|
|
2203
|
-
qti-assessment-item {
|
|
2204
|
-
display: block; /* necessary to calculate scaling position */
|
|
2205
|
-
width: 100%;
|
|
2206
|
-
}
|
|
2207
|
-
:host([scales]) qti-assessment-item {
|
|
2208
|
-
aspect-ratio: 4 / 3;
|
|
2209
|
-
width: 800px;
|
|
2210
|
-
transform-origin: 0 0;
|
|
2202
|
+
display: block;
|
|
2211
2203
|
}
|
|
2212
|
-
`,
|
|
2204
|
+
`,i([w({type:Boolean})],o.prototype,"disabled",2),i([n("disabled",{waitUntilFirstUpdate:!0})],o.prototype,"handleDisabledChange",1),i([w({type:Boolean})],o.prototype,"readonly",2),i([n("readonly",{waitUntilFirstUpdate:!0})],o.prototype,"handleReadonlyChange",1),i([w({type:Object,attribute:!1})],o.prototype,"responses",2),i([n("responses",{waitUntilFirstUpdate:!0})],o.prototype,"handleResponsesChange",1),i([w({type:String})],o.prototype,"xml",1),o=i([p("qti-item")],o);export{o as a};
|