@pie-element/ebsr 11.0.0 → 12.0.1-esmbeta.1
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/CHANGELOG.md +22 -0
- package/configure/CHANGELOG.md +8 -0
- package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.json +1972 -0
- package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.md +4186 -0
- package/configure/node_modules/@pie-element/multiple-choice/LICENSE.md +5 -0
- package/configure/node_modules/@pie-element/multiple-choice/PRINT.md +35 -0
- package/configure/node_modules/@pie-element/multiple-choice/README.md +56 -0
- package/configure/node_modules/@pie-element/multiple-choice/choice.png +0 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.json +1387 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.md +3332 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js +202 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js +248 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js +597 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js +18 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/package.json +20 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.json +527 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.md +2297 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js +34 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js +346 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js +28 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/controller/package.json +15 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json +2993 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json.md +2217 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/config.js +8 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/generate.js +61 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/index.html +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/session.js +7 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json +1332 -0
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json.md +1015 -0
- package/configure/node_modules/@pie-element/multiple-choice/esm/configure.css +847 -0
- package/configure/node_modules/@pie-element/multiple-choice/esm/configure.js +1218 -0
- package/configure/node_modules/@pie-element/multiple-choice/esm/configure.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/esm/controller.css +847 -0
- package/configure/node_modules/@pie-element/multiple-choice/esm/controller.js +324 -0
- package/configure/node_modules/@pie-element/multiple-choice/esm/controller.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/esm/element.css +847 -0
- package/configure/node_modules/@pie-element/multiple-choice/esm/element.js +3287 -0
- package/configure/node_modules/@pie-element/multiple-choice/esm/element.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/esm/print.css +847 -0
- package/configure/node_modules/@pie-element/multiple-choice/esm/print.js +3017 -0
- package/configure/node_modules/@pie-element/multiple-choice/esm/print.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js +427 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js +252 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js +174 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/index.js +388 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/main.js +108 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js +469 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/print.js +129 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/print.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js +48 -0
- package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js.map +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/configure.js +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/controller.js +3472 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/demo.js +86 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/element.js +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/index.html +21 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/index.js +2 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/manifest.json +10 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/print-demo.js +124 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/print.html +18 -0
- package/configure/node_modules/@pie-element/multiple-choice/module/print.js +1 -0
- package/configure/node_modules/@pie-element/multiple-choice/package.json +53 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/CHANGELOG.md +898 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/NEXT.CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/esm/index.js +262 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/esm/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js +88 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/expander.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js +181 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js +66 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/lib/styles.js.map +1 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/package.json +44 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/__tests__/index.test.jsx +99 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/expander.jsx +61 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/index.jsx +98 -0
- package/configure/node_modules/@pie-lib/correct-answer-toggle/src/styles.js +61 -0
- package/configure/node_modules/@pie-lib/icons/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-lib/icons/CHANGELOG.md +539 -0
- package/configure/node_modules/@pie-lib/icons/NEXT.CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-lib/icons/esm/index.js +1153 -0
- package/configure/node_modules/@pie-lib/icons/esm/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/icons/lib/correct-icon.js +89 -0
- package/configure/node_modules/@pie-lib/icons/lib/correct-icon.js.map +1 -0
- package/configure/node_modules/@pie-lib/icons/lib/correct-response-icon.js +153 -0
- package/configure/node_modules/@pie-lib/icons/lib/correct-response-icon.js.map +1 -0
- package/configure/node_modules/@pie-lib/icons/lib/icon-base.js +206 -0
- package/configure/node_modules/@pie-lib/icons/lib/icon-base.js.map +1 -0
- package/configure/node_modules/@pie-lib/icons/lib/icon-root.js +130 -0
- package/configure/node_modules/@pie-lib/icons/lib/icon-root.js.map +1 -0
- package/configure/node_modules/@pie-lib/icons/lib/incorrect-icon.js +92 -0
- package/configure/node_modules/@pie-lib/icons/lib/incorrect-icon.js.map +1 -0
- package/configure/node_modules/@pie-lib/icons/lib/index.js +72 -0
- package/configure/node_modules/@pie-lib/icons/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/icons/lib/instructions-icon.js +229 -0
- package/configure/node_modules/@pie-lib/icons/lib/instructions-icon.js.map +1 -0
- package/configure/node_modules/@pie-lib/icons/lib/learn-more-icon.js +145 -0
- package/configure/node_modules/@pie-lib/icons/lib/learn-more-icon.js.map +1 -0
- package/configure/node_modules/@pie-lib/icons/lib/nothing-submitted-icon.js +183 -0
- package/configure/node_modules/@pie-lib/icons/lib/nothing-submitted-icon.js.map +1 -0
- package/configure/node_modules/@pie-lib/icons/lib/partially-correct-icon.js +82 -0
- package/configure/node_modules/@pie-lib/icons/lib/partially-correct-icon.js.map +1 -0
- package/configure/node_modules/@pie-lib/icons/lib/show-rationale-icon.js +206 -0
- package/configure/node_modules/@pie-lib/icons/lib/show-rationale-icon.js.map +1 -0
- package/configure/node_modules/@pie-lib/icons/lib/sized.js +41 -0
- package/configure/node_modules/@pie-lib/icons/lib/sized.js.map +1 -0
- package/configure/node_modules/@pie-lib/icons/package.json +35 -0
- package/configure/node_modules/@pie-lib/icons/src/__tests__/index.test.js +3 -0
- package/configure/node_modules/@pie-lib/icons/src/correct-icon.jsx +64 -0
- package/configure/node_modules/@pie-lib/icons/src/correct-response-icon.jsx +121 -0
- package/configure/node_modules/@pie-lib/icons/src/icon-base.jsx +158 -0
- package/configure/node_modules/@pie-lib/icons/src/icon-root.jsx +76 -0
- package/configure/node_modules/@pie-lib/icons/src/incorrect-icon.jsx +61 -0
- package/configure/node_modules/@pie-lib/icons/src/index.js +19 -0
- package/configure/node_modules/@pie-lib/icons/src/instructions-icon.jsx +189 -0
- package/configure/node_modules/@pie-lib/icons/src/learn-more-icon.jsx +107 -0
- package/configure/node_modules/@pie-lib/icons/src/nothing-submitted-icon.jsx +130 -0
- package/configure/node_modules/@pie-lib/icons/src/partially-correct-icon.jsx +49 -0
- package/configure/node_modules/@pie-lib/icons/src/show-rationale-icon.jsx +152 -0
- package/configure/node_modules/@pie-lib/icons/src/sized.jsx +25 -0
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.md +775 -0
- package/configure/node_modules/@pie-lib/math-rendering/NEXT.CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/esm/index.js +690 -0
- package/configure/node_modules/@pie-lib/math-rendering/esm/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/index.js +38 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mml-to-latex.js +15 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mml-to-latex.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +296 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +23 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +109 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js +95 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js +438 -0
- package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +1 -0
- package/configure/node_modules/@pie-lib/math-rendering/package.json +28 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/__tests__/mml-to-latex.test.js +14 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/__tests__/normalization.test.js +50 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/__tests__/render-math.test.js +155 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/index.js +5 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/mml-to-latex.js +2 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/__tests__/__snapshots__/chtml.test.js.snap +9 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/__tests__/chtml.test.js +104 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +220 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/index.js +13 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +24 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/normalization.js +69 -0
- package/configure/node_modules/@pie-lib/math-rendering/src/render-math.js +387 -0
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.md +1026 -0
- package/configure/node_modules/@pie-lib/render-ui/NEXT.CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-lib/render-ui/esm/index.js +1616 -0
- package/configure/node_modules/@pie-lib/render-ui/esm/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/append-css-rules.js +88 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/append-css-rules.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/assets/enableAudioAutoplayImage.js +9 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/assets/enableAudioAutoplayImage.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +135 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/color.js +344 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/color.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js +150 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/has-media.js +27 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/has-media.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js +28 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js +74 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/index.js +136 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js +60 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js +145 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +321 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js +28 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/readable.js +28 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/readable.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js +151 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/ui-layout.js +122 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/ui-layout.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +181 -0
- package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +1 -0
- package/configure/node_modules/@pie-lib/render-ui/package.json +40 -0
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/__snapshots__/html-and-math.test.js.snap +11 -0
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/__snapshots__/preview-prompt.test.jsx.snap +37 -0
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/__snapshots__/purpose.test.jsx.snap +42 -0
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/__snapshots__/readable.test.jsx.snap +64 -0
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/__snapshots__/response-indicators.test.jsx.snap +27 -0
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/color.test.js +12 -0
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/has-media.test.js +20 -0
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/has-text.test.js +21 -0
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/html-and-math.test.js +24 -0
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/preview-prompt.test.jsx +56 -0
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/purpose.test.jsx +47 -0
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/readable.test.jsx +64 -0
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/response-indicators.test.jsx +16 -0
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/ui-layout.test.jsx +34 -0
- package/configure/node_modules/@pie-lib/render-ui/src/__tests__/withUndoReset.test.jsx +254 -0
- package/configure/node_modules/@pie-lib/render-ui/src/append-css-rules.js +51 -0
- package/configure/node_modules/@pie-lib/render-ui/src/assets/enableAudioAutoplayImage.js +1 -0
- package/configure/node_modules/@pie-lib/render-ui/src/collapsible/__tests__/__snapshots__/index.test.jsx.snap +18 -0
- package/configure/node_modules/@pie-lib/render-ui/src/collapsible/__tests__/index.test.jsx +13 -0
- package/configure/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +64 -0
- package/configure/node_modules/@pie-lib/render-ui/src/color.js +121 -0
- package/configure/node_modules/@pie-lib/render-ui/src/feedback.jsx +99 -0
- package/configure/node_modules/@pie-lib/render-ui/src/has-media.js +16 -0
- package/configure/node_modules/@pie-lib/render-ui/src/has-text.js +18 -0
- package/configure/node_modules/@pie-lib/render-ui/src/html-and-math.js +21 -0
- package/configure/node_modules/@pie-lib/render-ui/src/index.js +35 -0
- package/configure/node_modules/@pie-lib/render-ui/src/input-container.jsx +41 -0
- package/configure/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +95 -0
- package/configure/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +254 -0
- package/configure/node_modules/@pie-lib/render-ui/src/purpose.jsx +17 -0
- package/configure/node_modules/@pie-lib/render-ui/src/readable.jsx +19 -0
- package/configure/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +89 -0
- package/configure/node_modules/@pie-lib/render-ui/src/ui-layout.jsx +66 -0
- package/configure/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +116 -0
- package/configure/node_modules/@pie-lib/test-utils/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-lib/test-utils/CHANGELOG.md +410 -0
- package/configure/node_modules/@pie-lib/test-utils/NEXT.CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-lib/test-utils/esm/index.js +39 -0
- package/configure/node_modules/@pie-lib/test-utils/esm/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/test-utils/lib/index.js +40 -0
- package/configure/node_modules/@pie-lib/test-utils/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/test-utils/package.json +25 -0
- package/configure/node_modules/@pie-lib/test-utils/src/__tests__/index.test.js +45 -0
- package/configure/node_modules/@pie-lib/test-utils/src/index.js +18 -0
- package/configure/node_modules/@pie-lib/translator/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-lib/translator/CHANGELOG.md +282 -0
- package/configure/node_modules/@pie-lib/translator/NEXT.CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-lib/translator/esm/index.js +257 -0
- package/configure/node_modules/@pie-lib/translator/esm/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/translator/lib/en.js +102 -0
- package/configure/node_modules/@pie-lib/translator/lib/en.js.map +1 -0
- package/configure/node_modules/@pie-lib/translator/lib/es.js +102 -0
- package/configure/node_modules/@pie-lib/translator/lib/es.js.map +1 -0
- package/configure/node_modules/@pie-lib/translator/lib/index.js +69 -0
- package/configure/node_modules/@pie-lib/translator/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-lib/translator/package.json +25 -0
- package/configure/node_modules/@pie-lib/translator/src/en.js +99 -0
- package/configure/node_modules/@pie-lib/translator/src/es.js +99 -0
- package/configure/node_modules/@pie-lib/translator/src/index.js +43 -0
- package/configure/package.json +3 -3
- package/controller/CHANGELOG.md +8 -0
- package/controller/package.json +3 -3
- package/esm/configure.js +40550 -0
- package/esm/configure.js.map +1 -0
- package/esm/controller.js +3358 -0
- package/esm/controller.js.map +1 -0
- package/esm/element.js +2203 -0
- package/esm/element.js.map +1 -0
- package/esm/package.json +4 -0
- package/esm/print.js +4090 -0
- package/esm/print.js.map +1 -0
- package/module/controller.js +4973 -2252
- package/module/element.js +1 -1
- package/module/index.html +1 -1
- package/module/manifest.json +1 -1
- package/module/print.html +1 -1
- package/module/print.js +1 -1
- package/package.json +24 -6
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { withStyles } from '@material-ui/core/styles/index';
|
|
3
|
+
import Collapse from '@material-ui/core/Collapse/index';
|
|
4
|
+
import { renderMath } from '@pie-lib/math-rendering';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
|
|
7
|
+
export class Collapsible extends React.Component {
|
|
8
|
+
static propTypes = {
|
|
9
|
+
classes: PropTypes.object.isRequired,
|
|
10
|
+
className: PropTypes.string,
|
|
11
|
+
children: PropTypes.object,
|
|
12
|
+
labels: PropTypes.shape({
|
|
13
|
+
visible: PropTypes.string,
|
|
14
|
+
hidden: PropTypes.string,
|
|
15
|
+
}),
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
static defaultProps = {
|
|
19
|
+
labels: {},
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
state = {
|
|
23
|
+
expanded: false,
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
toggleExpanded = () => {
|
|
27
|
+
this.setState((state) => ({ expanded: !state.expanded }));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
componentDidMount() {
|
|
31
|
+
renderMath(this.root);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
componentDidUpdate() {
|
|
35
|
+
renderMath(this.root);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
render() {
|
|
39
|
+
const { classes, labels, children, className } = this.props;
|
|
40
|
+
const title = this.state.expanded ? labels.visible || 'Hide' : labels.hidden || 'Show';
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<div className={className} ref={(r) => (this.root = r)}>
|
|
44
|
+
<div onClick={this.toggleExpanded}>
|
|
45
|
+
<span className={classes.title}>{title}</span>
|
|
46
|
+
</div>
|
|
47
|
+
<Collapse in={this.state.expanded} timeout="auto" unmountOnExit className={classes.collapsible}>
|
|
48
|
+
{children}
|
|
49
|
+
</Collapse>
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export default withStyles((theme) => ({
|
|
56
|
+
title: {
|
|
57
|
+
color: theme.palette.primary.light,
|
|
58
|
+
borderBottom: `1px dotted ${theme.palette.primary.light}`,
|
|
59
|
+
cursor: 'pointer',
|
|
60
|
+
},
|
|
61
|
+
collapsible: {
|
|
62
|
+
paddingTop: theme.spacing.unit * 2,
|
|
63
|
+
},
|
|
64
|
+
}))(Collapsible);
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import green from '@material-ui/core/colors/green';
|
|
2
|
+
import orange from '@material-ui/core/colors/orange';
|
|
3
|
+
import pink from '@material-ui/core/colors/pink';
|
|
4
|
+
import indigo from '@material-ui/core/colors/indigo';
|
|
5
|
+
import red from '@material-ui/core/colors/red';
|
|
6
|
+
|
|
7
|
+
export const defaults = {
|
|
8
|
+
TEXT: 'black',
|
|
9
|
+
DISABLED: 'grey',
|
|
10
|
+
DISABLED_SECONDARY: '#ABABAB',
|
|
11
|
+
CORRECT: green[500],
|
|
12
|
+
CORRECT_SECONDARY: green[50],
|
|
13
|
+
CORRECT_TERTIARY: '#0EA449',
|
|
14
|
+
CORRECT_WITH_ICON: '#087D38',
|
|
15
|
+
INCORRECT: orange[500],
|
|
16
|
+
INCORRECT_SECONDARY: red[50],
|
|
17
|
+
INCORRECT_WITH_ICON: '#BF0D00',
|
|
18
|
+
MISSING: red[700],
|
|
19
|
+
MISSING_WITH_ICON: '#6A78A1',
|
|
20
|
+
PRIMARY: indigo[500],
|
|
21
|
+
PRIMARY_LIGHT: indigo[200],
|
|
22
|
+
PRIMARY_DARK: indigo[800],
|
|
23
|
+
SECONDARY: pink.A400,
|
|
24
|
+
SECONDARY_LIGHT: pink[200],
|
|
25
|
+
SECONDARY_DARK: pink[900],
|
|
26
|
+
TERTIARY: '#146EB3',
|
|
27
|
+
TERTIARY_LIGHT: '#D0E2F0',
|
|
28
|
+
BACKGROUND: 'rgba(255,255,255,0)',
|
|
29
|
+
BACKGROUND_DARK: '#ECEDF1',
|
|
30
|
+
DROPDOWN_BACKGROUND: '#E0E1E6', // this is used for inline-dropdown
|
|
31
|
+
// this is only used for multi-trait-rubric, we might want to use BACKGROUND_DARK instead
|
|
32
|
+
SECONDARY_BACKGROUND: 'rgba(241,241,241,1)',
|
|
33
|
+
BORDER: '#9A9A9A',
|
|
34
|
+
BORDER_LIGHT: '#D1D1D1',
|
|
35
|
+
BORDER_DARK: '#646464',
|
|
36
|
+
BORDER_GRAY: '#7E8494',
|
|
37
|
+
BLACK: '#000000',
|
|
38
|
+
WHITE: '#ffffff',
|
|
39
|
+
TRANSPARENT: 'transparent',
|
|
40
|
+
// this is used for multiple-choice accessibility
|
|
41
|
+
FOCUS_CHECKED: '#BBDEFB',
|
|
42
|
+
FOCUS_CHECKED_BORDER: '#1565C0',
|
|
43
|
+
FOCUS_UNCHECKED: '#E0E0E0',
|
|
44
|
+
FOCUS_UNCHECKED_BORDER: '#757575',
|
|
45
|
+
// this is used for select text tokens
|
|
46
|
+
BLUE_GREY100: '#F3F5F7',
|
|
47
|
+
BLUE_GREY300: '#C0C3CF',
|
|
48
|
+
BLUE_GREY600: '#7E8494',
|
|
49
|
+
BLUE_GREY900: '#152452',
|
|
50
|
+
// this is used for charting
|
|
51
|
+
FADED_PRIMARY: '#DCDAFB',
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
Object.freeze(defaults);
|
|
55
|
+
|
|
56
|
+
export const v = (prefix) => (...args) => {
|
|
57
|
+
const fallback = args.pop();
|
|
58
|
+
return args.reduceRight((acc, v) => {
|
|
59
|
+
return `var(--${prefix}-${v}, ${acc})`;
|
|
60
|
+
}, fallback);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const pv = v('pie');
|
|
64
|
+
|
|
65
|
+
export const text = () => pv('text', defaults.TEXT);
|
|
66
|
+
export const disabled = () => pv('disabled', defaults.DISABLED);
|
|
67
|
+
export const disabledSecondary = () => pv('disabled-secondary', defaults.DISABLED_SECONDARY);
|
|
68
|
+
export const correct = () => pv('correct', defaults.CORRECT);
|
|
69
|
+
export const correctSecondary = () => pv('correct-secondary', defaults.CORRECT_SECONDARY);
|
|
70
|
+
export const correctTertiary = () => pv('correct-tertiary', defaults.CORRECT_TERTIARY);
|
|
71
|
+
export const correctWithIcon = () => pv('correct-icon', defaults.CORRECT_WITH_ICON);
|
|
72
|
+
export const incorrect = () => pv('incorrect', defaults.INCORRECT);
|
|
73
|
+
export const incorrectWithIcon = () => pv('incorrect-icon', defaults.INCORRECT_WITH_ICON);
|
|
74
|
+
export const incorrectSecondary = () => pv('incorrect-secondary', defaults.INCORRECT_SECONDARY);
|
|
75
|
+
export const missing = () => pv('missing', defaults.MISSING);
|
|
76
|
+
export const missingWithIcon = () => pv('missing-icon', defaults.MISSING_WITH_ICON);
|
|
77
|
+
|
|
78
|
+
export const primary = () => pv('primary', defaults.PRIMARY);
|
|
79
|
+
export const primaryLight = () => pv('primary-light', defaults.PRIMARY_LIGHT);
|
|
80
|
+
export const primaryDark = () => pv('primary-dark', defaults.PRIMARY_DARK);
|
|
81
|
+
export const primaryText = () => pv('primary-text', 'text', defaults.TEXT);
|
|
82
|
+
export const fadedPrimary = () => pv('faded-primary', defaults.FADED_PRIMARY);
|
|
83
|
+
|
|
84
|
+
export const secondary = () => pv('secondary', defaults.SECONDARY);
|
|
85
|
+
export const secondaryLight = () => pv('secondary-light', defaults.SECONDARY_LIGHT);
|
|
86
|
+
export const secondaryDark = () => pv('secondary-dark', defaults.SECONDARY_DARK);
|
|
87
|
+
|
|
88
|
+
export const secondaryText = () => pv('secondary-text', 'text', defaults.TEXT);
|
|
89
|
+
export const background = () => pv('background', defaults.BACKGROUND);
|
|
90
|
+
export const backgroundDark = () => pv('background-dark', defaults.BACKGROUND_DARK);
|
|
91
|
+
export const secondaryBackground = () => pv('secondary-background', defaults.SECONDARY_BACKGROUND);
|
|
92
|
+
export const dropdownBackground = () => pv('dropdown-background', defaults.DROPDOWN_BACKGROUND);
|
|
93
|
+
|
|
94
|
+
export const tertiary = () => pv('tertiary', defaults.TERTIARY);
|
|
95
|
+
export const tertiaryLight = () => pv('tertiary-light', defaults.TERTIARY_LIGHT);
|
|
96
|
+
|
|
97
|
+
export const border = () => pv('border', defaults.BORDER);
|
|
98
|
+
export const borderLight = () => pv('border-light', defaults.BORDER_LIGHT);
|
|
99
|
+
export const borderDark = () => pv('border-dark', defaults.BORDER_DARK);
|
|
100
|
+
export const borderGray = () => pv('border-gray', defaults.BORDER_GRAY);
|
|
101
|
+
|
|
102
|
+
export const black = () => pv('black', defaults.BLACK);
|
|
103
|
+
export const white = () => pv('white', defaults.WHITE);
|
|
104
|
+
export const transparent = () => defaults.TRANSPARENT;
|
|
105
|
+
|
|
106
|
+
export const focusChecked = () => pv('focus-checked', defaults.FOCUS_CHECKED);
|
|
107
|
+
export const focusCheckedBorder = () => pv('focus-checked-border', defaults.FOCUS_CHECKED_BORDER);
|
|
108
|
+
export const focusUnchecked = () => pv('focus-unchecked', defaults.FOCUS_UNCHECKED);
|
|
109
|
+
export const focusUncheckedBorder = () => pv('focus-unchecked-border', defaults.FOCUS_UNCHECKED_BORDER);
|
|
110
|
+
|
|
111
|
+
export const blueGrey100 = () => pv('blue-grey-100', defaults.BLUE_GREY100);
|
|
112
|
+
export const blueGrey300 = () => pv('blue-grey-300', defaults.BLUE_GREY300);
|
|
113
|
+
export const blueGrey600 = () => pv('blue-grey-600', defaults.BLUE_GREY600);
|
|
114
|
+
export const blueGrey900 = () => pv('blue-grey-900', defaults.BLUE_GREY900);
|
|
115
|
+
|
|
116
|
+
export const visualElementsColors = {
|
|
117
|
+
AXIS_LINE_COLOR: '#5A53C9',
|
|
118
|
+
ROLLOVER_FILL_BAR_COLOR: '#050F2D',
|
|
119
|
+
GRIDLINES_COLOR: '#8E88EA',
|
|
120
|
+
PLOT_FILL_COLOR: '#1463B3',
|
|
121
|
+
};
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lifted from multiple-choice - TODO: create a shared package for it.
|
|
3
|
+
*/
|
|
4
|
+
import { withStyles } from '@material-ui/core/styles';
|
|
5
|
+
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { TransitionGroup, CSSTransition } from 'react-transition-group';
|
|
8
|
+
import classNames from 'classnames';
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
10
|
+
import * as color from './color';
|
|
11
|
+
|
|
12
|
+
const styleSheet = {
|
|
13
|
+
corespringFeedback: {
|
|
14
|
+
transformOrigin: '0% 0px 0px',
|
|
15
|
+
width: '100%',
|
|
16
|
+
display: 'block',
|
|
17
|
+
overflow: 'hidden',
|
|
18
|
+
'&:.incorrect': {
|
|
19
|
+
color: '#946202',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
content: {
|
|
23
|
+
'-webkit-font-smoothing': 'antialiased',
|
|
24
|
+
backgroundColor: `var(--feedback-bg-color, ${color.disabled()})`,
|
|
25
|
+
borderRadius: '4px',
|
|
26
|
+
fontFamily: '"Roboto", "Noto", sans-serif',
|
|
27
|
+
lineHeight: '25px',
|
|
28
|
+
margin: '0px',
|
|
29
|
+
padding: '10px',
|
|
30
|
+
verticalAlign: 'middle',
|
|
31
|
+
color: 'var(--feedback-color, white)',
|
|
32
|
+
},
|
|
33
|
+
correct: {
|
|
34
|
+
backgroundColor: `var(--feedback-correct-bg-color, ${color.correct()})`,
|
|
35
|
+
},
|
|
36
|
+
incorrect: {
|
|
37
|
+
backgroundColor: `var(--feedback-incorrect-bg-color, ${color.incorrect()})`,
|
|
38
|
+
},
|
|
39
|
+
feedbackEnter: {
|
|
40
|
+
height: '1px',
|
|
41
|
+
},
|
|
42
|
+
feedbackEnterActive: {
|
|
43
|
+
height: '45px',
|
|
44
|
+
transition: 'height 500ms',
|
|
45
|
+
},
|
|
46
|
+
feedbackLeave: {
|
|
47
|
+
height: '45px',
|
|
48
|
+
},
|
|
49
|
+
feedbackLeaveActive: {
|
|
50
|
+
height: '1px',
|
|
51
|
+
transition: 'height 200ms',
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export class Feedback extends React.Component {
|
|
56
|
+
static propTypes = {
|
|
57
|
+
correctness: PropTypes.string,
|
|
58
|
+
feedback: PropTypes.string,
|
|
59
|
+
classes: PropTypes.object.isRequired,
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
render() {
|
|
63
|
+
const { correctness, feedback, classes } = this.props;
|
|
64
|
+
|
|
65
|
+
function chooseFeedback(correctness) {
|
|
66
|
+
if (correctness && feedback) {
|
|
67
|
+
return (
|
|
68
|
+
<CSSTransition
|
|
69
|
+
classNames={{
|
|
70
|
+
enter: classes.feedbackEnter,
|
|
71
|
+
enterActive: classes.feedbackEnterActive,
|
|
72
|
+
leave: classes.feedbackLeave,
|
|
73
|
+
leaveActive: classes.feedbackLeaveActive,
|
|
74
|
+
}}
|
|
75
|
+
key="hasFeedback"
|
|
76
|
+
timeout={{ enter: 500, exit: 300 }}
|
|
77
|
+
>
|
|
78
|
+
<div className={classes.corespringFeedback}>
|
|
79
|
+
<div
|
|
80
|
+
className={classNames(classes.content, classes[correctness])}
|
|
81
|
+
dangerouslySetInnerHTML={{ __html: feedback }}
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
</CSSTransition>
|
|
85
|
+
);
|
|
86
|
+
} else {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<div>
|
|
93
|
+
<TransitionGroup>{chooseFeedback(correctness)}</TransitionGroup>
|
|
94
|
+
</div>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export default withStyles(styleSheet, { name: 'Feedback' })(Feedback);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
let parser;
|
|
2
|
+
|
|
3
|
+
if (typeof window !== 'undefined') {
|
|
4
|
+
parser = new DOMParser();
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
* Check if the string contains at least one media element.
|
|
9
|
+
*/
|
|
10
|
+
export const hasMedia = (s) => {
|
|
11
|
+
if (!s) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
const root = parser.parseFromString(s, 'text/html');
|
|
15
|
+
return !!root.body.querySelector('img') || !!root.body.querySelector('video') || !!root.body.querySelector('audio');
|
|
16
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
let parser;
|
|
2
|
+
|
|
3
|
+
if (typeof window !== 'undefined') {
|
|
4
|
+
parser = new DOMParser();
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
const markupToText = (s) => {
|
|
8
|
+
const root = parser.parseFromString(s, 'text/html');
|
|
9
|
+
return root.body.textContent;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const hasText = (s) => {
|
|
13
|
+
if (!s) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
const tc = markupToText(s);
|
|
17
|
+
return !!(tc && tc.trim());
|
|
18
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
export default class HtmlAndMath extends React.Component {
|
|
5
|
+
static propTypes = {
|
|
6
|
+
tag: PropTypes.string,
|
|
7
|
+
className: PropTypes.string,
|
|
8
|
+
html: PropTypes.string,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
static defaultProps = {
|
|
12
|
+
tag: 'div',
|
|
13
|
+
html: '',
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
render() {
|
|
17
|
+
const { tag, className, html } = this.props;
|
|
18
|
+
const Tag = tag || 'div';
|
|
19
|
+
return <Tag ref={(r) => (this.node = r)} className={className} dangerouslySetInnerHTML={{ __html: html }} />;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import * as indicators from './response-indicators';
|
|
2
|
+
import Feedback from './feedback';
|
|
3
|
+
import Collapsible from './collapsible';
|
|
4
|
+
import withUndoReset from './withUndoReset';
|
|
5
|
+
import PreviewLayout from './preview-layout';
|
|
6
|
+
import UiLayout from './ui-layout';
|
|
7
|
+
import HtmlAndMath from './html-and-math';
|
|
8
|
+
import InputContainer from './input-container';
|
|
9
|
+
import PreviewPrompt from './preview-prompt';
|
|
10
|
+
import Readable from './readable';
|
|
11
|
+
import Purpose from './purpose';
|
|
12
|
+
import * as color from './color';
|
|
13
|
+
import { hasText } from './has-text';
|
|
14
|
+
import { hasMedia } from './has-media';
|
|
15
|
+
import EnableAudioAutoplayImage from './assets/enableAudioAutoplayImage';
|
|
16
|
+
import AppendCSSRules from './append-css-rules';
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
AppendCSSRules,
|
|
20
|
+
HtmlAndMath,
|
|
21
|
+
indicators,
|
|
22
|
+
withUndoReset,
|
|
23
|
+
Feedback,
|
|
24
|
+
UiLayout,
|
|
25
|
+
PreviewLayout,
|
|
26
|
+
Collapsible,
|
|
27
|
+
InputContainer,
|
|
28
|
+
PreviewPrompt,
|
|
29
|
+
color,
|
|
30
|
+
Readable,
|
|
31
|
+
Purpose,
|
|
32
|
+
hasText,
|
|
33
|
+
hasMedia,
|
|
34
|
+
EnableAudioAutoplayImage,
|
|
35
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import InputLabel from '@material-ui/core/InputLabel';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import classNames from 'classnames';
|
|
5
|
+
import { withStyles } from '@material-ui/core/styles';
|
|
6
|
+
import FormControl from '@material-ui/core/FormControl';
|
|
7
|
+
|
|
8
|
+
const RawInputContainer = (props) => {
|
|
9
|
+
const { label, className, children, classes } = props;
|
|
10
|
+
const names = classNames(classes.formControl, className);
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<FormControl className={names}>
|
|
14
|
+
<InputLabel className={classes.label} shrink={true}>
|
|
15
|
+
{label}
|
|
16
|
+
</InputLabel>
|
|
17
|
+
{children}
|
|
18
|
+
</FormControl>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
RawInputContainer.propTypes = {
|
|
23
|
+
label: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,
|
|
24
|
+
className: PropTypes.string,
|
|
25
|
+
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,
|
|
26
|
+
classes: PropTypes.object.isRequired,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default withStyles((theme) => ({
|
|
30
|
+
formControl: {
|
|
31
|
+
marginLeft: 0,
|
|
32
|
+
marginRight: 0,
|
|
33
|
+
paddingBottom: theme.spacing.unit,
|
|
34
|
+
flex: '1 0 auto',
|
|
35
|
+
minWidth: theme.spacing.unit * 4,
|
|
36
|
+
},
|
|
37
|
+
label: {
|
|
38
|
+
fontSize: 'inherit',
|
|
39
|
+
whiteSpace: 'nowrap',
|
|
40
|
+
},
|
|
41
|
+
}))(RawInputContainer);
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { withStyles, createMuiTheme, MuiThemeProvider } from '@material-ui/core/styles';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import UiLayout from './ui-layout';
|
|
5
|
+
|
|
6
|
+
class PreviewLayout extends React.Component {
|
|
7
|
+
static propTypes = {
|
|
8
|
+
ariaLabel: PropTypes.string,
|
|
9
|
+
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,
|
|
10
|
+
classes: PropTypes.object,
|
|
11
|
+
role: PropTypes.string,
|
|
12
|
+
extraCSSRules: PropTypes.shape({
|
|
13
|
+
names: PropTypes.arrayOf(PropTypes.string),
|
|
14
|
+
rules: PropTypes.string,
|
|
15
|
+
}),
|
|
16
|
+
fontSizeFactor: PropTypes.number,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
render() {
|
|
20
|
+
const { children, classes, ariaLabel, role, extraCSSRules, fontSizeFactor } = this.props;
|
|
21
|
+
const accessibility = ariaLabel ? { 'aria-label': ariaLabel, role } : {};
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<UiLayout
|
|
25
|
+
className={classes.container}
|
|
26
|
+
{...accessibility}
|
|
27
|
+
extraCSSRules={extraCSSRules}
|
|
28
|
+
fontSizeFactor={fontSizeFactor}
|
|
29
|
+
>
|
|
30
|
+
{children}
|
|
31
|
+
</UiLayout>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const styles = () => ({
|
|
37
|
+
container: {
|
|
38
|
+
display: 'flex',
|
|
39
|
+
flexDirection: 'column',
|
|
40
|
+
position: 'relative',
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const theme = createMuiTheme({
|
|
45
|
+
typography: {
|
|
46
|
+
useNextVariants: true,
|
|
47
|
+
},
|
|
48
|
+
palette: {
|
|
49
|
+
action: {
|
|
50
|
+
disabled: 'rgba(0, 0, 0, 0.54);',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
overrides: {
|
|
54
|
+
MuiRadio: {
|
|
55
|
+
root: {
|
|
56
|
+
'&$checked': {
|
|
57
|
+
color: '#3f51b5 !important',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
MuiCheckbox: {
|
|
62
|
+
root: {
|
|
63
|
+
'&$checked': {
|
|
64
|
+
color: '#3f51b5 !important',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
MuiTabs: {
|
|
69
|
+
root: {
|
|
70
|
+
borderBottom: '1px solid #eee',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
MuiSwitch: {
|
|
74
|
+
root: {
|
|
75
|
+
'&$checked': {
|
|
76
|
+
color: '#3f51b5 !important',
|
|
77
|
+
'& + $bar': {
|
|
78
|
+
backgroundColor: '#3f51b5 !important',
|
|
79
|
+
opacity: 0.5,
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
const Styled = withStyles(styles)(PreviewLayout);
|
|
88
|
+
|
|
89
|
+
const RootElem = (props) => (
|
|
90
|
+
<MuiThemeProvider theme={theme}>
|
|
91
|
+
<Styled {...props} />
|
|
92
|
+
</MuiThemeProvider>
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
export default RootElem;
|