From 638de2feaf251c28e92a6a69f2b644e9d84cd616 Mon Sep 17 00:00:00 2001 From: btopro Date: Fri, 10 May 2024 16:50:41 -0400 Subject: [PATCH] https://github.com/elmsln/issues/issues/1334 https://github.com/elmsln/issues/issues/1326 --- elements/d-d-d/lib/DDDStyles.js | 44 +++++++++--------- .../hax-cloud/demo/dist/dev/appstore.json | 1 + elements/hax-cloud/lib/appstore.json | 1 + .../demo/dist/dev/appstore.json | 1 + .../lib/core/haxcms-site-builder.js | 9 ++-- .../multiple-choice/lib/QuestionElement.js | 45 +++++++++++-------- elements/tagging-question/demo/index.html | 16 ++++++- .../lib/tagging-question.haxProperties.json | 22 +++++---- .../tagging-question/src/tagging-question.js | 38 ++++++++-------- elements/tagging-question/tagging-question.js | 38 ++++++++-------- 10 files changed, 123 insertions(+), 92 deletions(-) diff --git a/elements/d-d-d/lib/DDDStyles.js b/elements/d-d-d/lib/DDDStyles.js index 56e717bafc..54d96dd2b8 100644 --- a/elements/d-d-d/lib/DDDStyles.js +++ b/elements/d-d-d/lib/DDDStyles.js @@ -1483,6 +1483,20 @@ export const DDDReset = css` p { margin: var(--ddd-spacing-6) 0; } + dl { + padding: var(--ddd-spacing-6); + margin: 0; + border: var(--ddd-border-sm); + } + dt { + font-weight: var(--ddd-font-weight-bold); + font-size: var(--ddd-theme-h6-font-size); + } + dd { + margin-bottom: var(--ddd-spacing-4); + margin-inline-start: var(--ddd-spacing-8); + } + p[data-accent], blockquote[data-accent], ol[data-accent], @@ -1979,10 +1993,7 @@ export const DDDReset = css` display: flex; font-size: var(--ddd-theme-h4-font-size); font-weight: var(--ddd-font-weight-bold); - color: light-dark( - var(--ddd-theme-default-nittanyNavy), - var(--ddd-theme-default-linkLight) - ); + color: light-dark(var(--lowContrast-override, var(--ddd-theme-primary,var(--ddd-theme-default-nittanyNavy))), var(--ddd-theme-default-linkLight)); cursor: pointer; text-wrap: wrap; align-items: center; @@ -1997,10 +2008,7 @@ export const DDDReset = css` content: "+"; margin-left: auto; text-align: right; - color: light-dark( - var(--ddd-theme-default-link), - var(--ddd-theme-default-linkLight) - ); + color: light-dark(var(--lowContrast-override, var(--ddd-theme-primary, var(--ddd-theme-default-nittanyNavy))), var(--ddd-theme-default-linkLight)); font-weight: var(--ddd-font-weight-regular); font-size: var(--ddd-font-size-m); line-height: 1; @@ -2020,23 +2028,17 @@ export const DDDReset = css` opacity: 0.5; } details[open] > summary { - color: light-dark( - var(--ddd-theme-default-link), - var(--ddd-theme-default-linkLight) - ); + color: light-dark(var(--lowContrast-override, var(--ddd-theme-primary, var(--ddd-theme-default-nittanyNavy))), var(--ddd-theme-default-linkLight)); + filter: saturate(1.5); } - summary:focus, - summary:hover, details[open] > summary { - background-color: light-dark(var(--ddd-theme-default-limestoneMaxLight), var(--ddd-theme-default-nittanyNavy)); + background-color: light-dark(var(--ddd-theme-default-limestoneMaxLight), var(--ddd-theme-default-potentialMidnight)); } - details[open] > summary::after { - content: "--"; - text-wrap: nowrap; - font-size: var(--ddd-font-size-m); - letter-spacing: -1.8px; - padding-right: 2px; + details summary:focus, + details summary:hover { + background-color: light-dark(var(--ddd-theme-default-limestoneLight), var(--ddd-theme-default-nittanyNavy)); } + code { transition: all 0.3s ease 0s; display: inline-block; diff --git a/elements/hax-cloud/demo/dist/dev/appstore.json b/elements/hax-cloud/demo/dist/dev/appstore.json index 860efb8e62..00cb6a30c5 100644 --- a/elements/hax-cloud/demo/dist/dev/appstore.json +++ b/elements/hax-cloud/demo/dist/dev/appstore.json @@ -639,6 +639,7 @@ "simple-tags": "@lrnwebcomponents/simple-fields/lib/simple-tags.js", "flash-card": "@lrnwebcomponents/flash-card/flash-card.js", "sorting-question": "@lrnwebcomponents/sorting-question/sorting-question.js", + "tagging-question": "@lrnwebcomponents/tagging-question/tagging-question.js", "twitter-embed": "@lrnwebcomponents/twitter-embed/twitter-embed.js", "self-check": "@lrnwebcomponents/self-check/self-check.js", "course-model": "@lrnwebcomponents/course-model/course-model.js", diff --git a/elements/hax-cloud/lib/appstore.json b/elements/hax-cloud/lib/appstore.json index 860efb8e62..00cb6a30c5 100644 --- a/elements/hax-cloud/lib/appstore.json +++ b/elements/hax-cloud/lib/appstore.json @@ -639,6 +639,7 @@ "simple-tags": "@lrnwebcomponents/simple-fields/lib/simple-tags.js", "flash-card": "@lrnwebcomponents/flash-card/flash-card.js", "sorting-question": "@lrnwebcomponents/sorting-question/sorting-question.js", + "tagging-question": "@lrnwebcomponents/tagging-question/tagging-question.js", "twitter-embed": "@lrnwebcomponents/twitter-embed/twitter-embed.js", "self-check": "@lrnwebcomponents/self-check/self-check.js", "course-model": "@lrnwebcomponents/course-model/course-model.js", diff --git a/elements/haxcms-elements/demo/dist/dev/appstore.json b/elements/haxcms-elements/demo/dist/dev/appstore.json index dce4bdac5b..d46abc97c9 100644 --- a/elements/haxcms-elements/demo/dist/dev/appstore.json +++ b/elements/haxcms-elements/demo/dist/dev/appstore.json @@ -647,6 +647,7 @@ "simple-tags": "@lrnwebcomponents/simple-fields/lib/simple-tags.js", "flash-card": "@lrnwebcomponents/flash-card/flash-card.js", "sorting-question": "@lrnwebcomponents/sorting-question/sorting-question.js", + "tagging-question": "@lrnwebcomponents/tagging-question/tagging-question.js", "twitter-embed": "@lrnwebcomponents/twitter-embed/twitter-embed.js", "self-check": "@lrnwebcomponents/self-check/self-check.js", "course-model": "@lrnwebcomponents/course-model/course-model.js", diff --git a/elements/haxcms-elements/lib/core/haxcms-site-builder.js b/elements/haxcms-elements/lib/core/haxcms-site-builder.js index b80f0f715e..dc9535c88b 100644 --- a/elements/haxcms-elements/lib/core/haxcms-site-builder.js +++ b/elements/haxcms-elements/lib/core/haxcms-site-builder.js @@ -609,11 +609,14 @@ class HAXCMSSiteBuilder extends I18NMixin(LitElement) { store.cmsSiteEditor.haxCmsSiteEditorUIElement && store.cmsSiteEditor.haxCmsSiteEditorUIElement.shadowRoot ) { - const editbtn = + // delay since it slides in + setTimeout(() => { + const editbtn = store.cmsSiteEditor.haxCmsSiteEditorUIElement.shadowRoot.querySelector( - "#editbutton", + "#editbutton" ); - editbtn.dataPulse = "1"; + editbtn.dataPulse = "1"; + }, 300); } // try to evaluate typing in merlin if ( diff --git a/elements/multiple-choice/lib/QuestionElement.js b/elements/multiple-choice/lib/QuestionElement.js index 3047db8373..6ea3492936 100644 --- a/elements/multiple-choice/lib/QuestionElement.js +++ b/elements/multiple-choice/lib/QuestionElement.js @@ -385,10 +385,10 @@ export class QuestionElement extends SchemaBehaviors(DDDSuper(LitElement)) { min-width: 160px; padding: var(--ddd-spacing-8); border: var(--ddd-border-md); - background-color: var(--simple-colors-default-theme-accent-1); - border-radius: var(--ddd-radius-xs); + border-radius: var(--ddd-radius-sm); + box-shadow: var(--ddd-boxShadow-sm); + background-color: light-dark(var(--ddd-theme-accent), transparent); transition: all 0.3s ease-in-out; - color: var(--simple-colors-default-theme-grey-12); --simple-toolbar-button-border-color: var( --simple-colors-default-theme-grey-4 ); @@ -437,6 +437,13 @@ export class QuestionElement extends SchemaBehaviors(DDDSuper(LitElement)) { box-shadow: var(--ddd-boxShadow-sm); border-color: black; } + p { + padding: 0; + margin: 0; + } + details p { + padding: var(--ddd-spacing-4); + } ul { list-style: none; padding: 0; @@ -485,8 +492,8 @@ export class QuestionElement extends SchemaBehaviors(DDDSuper(LitElement)) { border-radius: var(--ddd-radius-xs); } simple-toolbar-button { - background-color: light-dark(var(--ddd-theme-default-link), var(--ddd-theme-default-linkLight)); - color: light-dark(white, black); + background-color: var(--ddd-theme-primary, var(--ddd-theme-default-link)); + color: var(--lowContrast-override, var(--ddd-theme-bgContrast, black)); } simple-toolbar-button[disabled] { background-color: light-dark(var(--ddd-theme-default-limestoneLight), var(--ddd-theme-default-slateGray)); @@ -515,7 +522,7 @@ export class QuestionElement extends SchemaBehaviors(DDDSuper(LitElement)) { simple-fields-field::part(option-inner) { position: absolute; right: 0px; - color: light-dark(var(--ddd-theme-default-link), var(--ddd-theme-default-linkLight)); + color: light-dark(var(--ddd-theme-primary, var(--ddd-theme-default-link)), var(--ddd-theme-default-linkLight)); font-family: var(--ddd-font-navigation); font-size: var(--ddd-font-size-xs); bottom: 50%; @@ -523,19 +530,19 @@ export class QuestionElement extends SchemaBehaviors(DDDSuper(LitElement)) { padding: 0px; margin: 0px; } - ul, - ol { - gap: var(--ddd-spacing-4); - } - simple-icon { - display: inline-flex; - } - .feedback { - margin: var(--ddd-spacing-3) 0; - font-size: var(--ddd-font-size-m); - font-weight: bold; - text-align: center; - } + + h4 { + color: light-dark(var(--ddd-theme-primary, var(--ddd-theme-default-link)), var(--ddd-theme-default-linkLight)); + } + simple-icon { + display: inline-flex; + } + .feedback { + margin: var(--ddd-spacing-3) 0; + font-size: var(--ddd-font-size-sm); + font-weight: bold; + text-align: center; + } `, ]; } diff --git a/elements/tagging-question/demo/index.html b/elements/tagging-question/demo/index.html index c87fa01a6e..50190790e5 100644 --- a/elements/tagging-question/demo/index.html +++ b/elements/tagging-question/demo/index.html @@ -15,11 +15,25 @@ + + + + + + + + + + + + + +

Basic tagging-question demo