Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtelnov committed Aug 29, 2023
2 parents b544af8 + ae4c84f commit 1045344
Show file tree
Hide file tree
Showing 53 changed files with 5,367 additions and 234 deletions.
68 changes: 67 additions & 1 deletion src/defaultV2-theme/blocks/sd-completedpage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,74 @@
text-align: center;
height: auto;

// h3 {
// font-size: calcFontSize(1.5);
// }

h1 {
@include articleXXLargeFont;
}

h2 {
@include articleXLargeFont;
}

h3 {
font-size: calcFontSize(1.5);
@include articleLargeFont;
}

h4 {
@include articleMediumFont;
}

h5,
h6 {
color: $foreground;
}

span,
div,
p {
@include articleDefaultFont;
}

a {
color: $primary;
}

button {
display: flex;
align-items: center;
padding: calcSize(1.5) calcSize(4);
vertical-align: baseline;
text-align: center;
background-color: $background;
box-shadow: $shadow-small;
border: none;
border-radius: calcSize(0.5);
cursor: pointer;
user-select: none;
outline: solid calcSize(0.25) transparent;

&:hover {
background-color: $background-dark;
}
&:focus {
box-shadow: 0 0 0 2px $primary;
}

span {
display: flex;
align-items: center;
flex-grow: 1;
justify-content: center;
color: $primary;
font-weight: 600;
font-style: normal;
font-family: var(--font-family, $font-family);
font-size: $font-questiontitle-size;
line-height: multiply(1.5, $font-questiontitle-size);
}
}
}

Expand Down
68 changes: 68 additions & 0 deletions src/defaultV2-theme/blocks/sd-html.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,71 @@
.sd-html {
white-space: initial;
}

.sd-html {
h1 {
@include articleXXLargeFont;
}

h2 {
@include articleXLargeFont;
}

h3 {
@include articleLargeFont;
}

h4 {
@include articleMediumFont;
}

h5,
h6 {
color: $foreground;
}

span,
div,
p {
@include articleDefaultFont;
}

a {
color: $primary;
}

button {
display: flex;
align-items: center;
padding: calcSize(1.5) calcSize(4);
vertical-align: baseline;
text-align: center;
background-color: $background;
box-shadow: $shadow-small;
border: none;
border-radius: calcSize(0.5);
cursor: pointer;
user-select: none;
outline: solid calcSize(0.25) transparent;

&:hover {
background-color: $background-dark;
}
&:focus {
box-shadow: 0 0 0 2px $primary;
}

span {
display: flex;
align-items: center;
flex-grow: 1;
justify-content: center;
color: $primary;
font-weight: 600;
font-style: normal;
font-family: var(--font-family, $font-family);
font-size: $font-questiontitle-size;
line-height: multiply(1.5, $font-questiontitle-size);
}
}
}
72 changes: 71 additions & 1 deletion src/defaultV2-theme/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,74 @@ $base-unit: var(--sjs-base-unit, var(--base-unit, 8px));
@mixin borderLight {
border: calcSize(0.25) solid $border-light;
border-radius: calcCornerRadius(1);
}
}

@mixin articleXXLargeFont {
color: $foreground;
font-size: var(--sjs-article-font-xx-large-fontSize, 64px);
text-decoration: var(--sjs-article-font-xx-large-textDecoration, "none");
font-family: $font-family;
font-weight: var(--sjs-article-font-xx-large-fontWeight, 700);
font-style: var(--sjs-article-font-xx-large-fontStyle, "normal");
font-stretch: var(--sjs-article-font-xx-large-fontStretch, "normal");
letter-spacing: var(--sjs-article-font-xx-large-letterSpacing, 0);
line-height: var(--sjs-article-font-xx-large-lineHeight, 64px);
text-indent: var(--sjs-article-font-xx-large-paragraphIndent, 0px);
text-transform: var(--sjs-article-font-xx-large-textCase, "none");
}

@mixin articleXLargeFont {
color: $foreground;
font-size: var(--sjs-article-font-x-large-fontSize, 48px);
text-decoration: var(--sjs-article-font-x-large-textDecoration, "none");
font-family: $font-family;
font-weight: var(--sjs-article-font-x-large-fontWeight, 700);
font-style: var(--sjs-article-font-x-large-fontStyle, "normal");
font-stretch: var(--sjs-article-font-x-large-fontStretch, "normal");
letter-spacing: var(--sjs-article-font-x-large-letterSpacing, 0);
line-height: var(--sjs-article-font-x-large-lineHeight, 56px);
text-indent: var(--sjs-article-font-x-large-paragraphIndent, 0px);
text-transform: var(--sjs-article-font-x-large-textCase, "none");
}

@mixin articleLargeFont {
color: $foreground;
font-size: var(--sjs-article-font-large-fontSize, 32px);
text-decoration: var(--sjs-article-font-large-textDecoration, "none");
font-family: $font-family;
font-weight: var(--sjs-article-font-large-fontWeight, 700);
font-style: var(--sjs-article-font-large-fontStyle, "normal");
font-stretch: var(--sjs-article-font-large-fontStretch, "normal");
letter-spacing: var(--sjs-article-font-large-letterSpacing, 0);
line-height: var(--sjs-article-font-large-lineHeight, 40px);
text-indent: var(--sjs-article-font-large-paragraphIndent, 0px);
text-transform: var(--sjs-article-font-large-textCase, "none");
}

@mixin articleMediumFont {
color: $foreground;
font-size: var(--sjs-article-font-medium-fontSize, 24px);
text-decoration: var(--sjs-article-font-medium-textDecoration, "none");
font-family: $font-family;
font-weight: var(--sjs-article-font-medium-fontWeight, 700);
font-style: var(--sjs-article-font-medium-fontStyle, "normal");
font-stretch: var(--sjs-article-font-medium-fontStretch, "normal");
letter-spacing: var(--sjs-article-font-medium-letterSpacing, 0);
line-height: var(--sjs-article-font-medium-lineHeight, 32px);
text-indent: var(--sjs-article-font-medium-paragraphIndent, 0px);
text-transform: var(--sjs-article-font-medium-textCase, "none");
}

@mixin articleDefaultFont {
color: $foreground;
font-size: var(--sjs-article-font-default-fontSize, 16px);
text-decoration: var(--sjs-article-font-default-textDecoration, "none");
font-family: $font-family;
font-weight: var(--sjs-article-font-default-fontWeight, 400);
font-style: var(--sjs-article-font-default-fontStyle, "normal");
font-stretch: var(--sjs-article-font-default-fontStretch, "normal");
letter-spacing: var(--sjs-article-font-default-letterSpacing, 0);
line-height: var(--sjs-article-font-default-lineHeight, 28px);
text-indent: var(--sjs-article-font-default-paragraphIndent, 0px);
text-transform: var(--sjs-article-font-default-textCase, "none");
}
3 changes: 3 additions & 0 deletions src/dropdownListModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,9 @@ export class DropdownListModel extends Base {
if (options.name == "value") {
this.showInputFieldComponent = this.question.showInputFieldComponent;
}
if(options.name == "choicesLazyLoadEnabled" && options.newValue) {
this.listModel.setOnFilterStringChangedCallback(this.listModelFilterStringChanged);
}
}
protected focusItemOnClickAndPopup() {
if (this._popupModel.isVisible && this.question.value)
Expand Down
3 changes: 3 additions & 0 deletions src/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ export class ListModel<T extends BaseAction = Action> extends ActionContainer<T>
this.selectedItem = selectedItem;
}

public setOnFilterStringChangedCallback(callback: (text: string) => void) {
this.onFilterStringChangedCallback = callback;
}
public setItems(items: Array<IAction>, sortByVisibleIndex = true): void {
super.setItems(items, sortByVisibleIndex);
if(this.elementId) {
Expand Down
6 changes: 4 additions & 2 deletions src/question_imagepicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,11 @@ export class QuestionImagePickerModel extends QuestionCheckboxBase {
private reCalcGapBetweenItemsCallback: () => void;
public afterRender(el: HTMLElement): void {
super.afterRender(el);
if(el && el.querySelector(this.getObservedElementSelector())) {
const selector = this.getObservedElementSelector();
const observedElement = el && selector ? el.querySelector(selector): undefined;
if(!!observedElement) {
this.reCalcGapBetweenItemsCallback = () => {
this.gapBetweenItems = Math.ceil(Number.parseFloat(window.getComputedStyle(el.querySelector(this.getObservedElementSelector())).gap)) || 16;
this.gapBetweenItems = Math.ceil(Number.parseFloat(window.getComputedStyle(observedElement).gap)) || 16;
};
this.reCalcGapBetweenItemsCallback();
}
Expand Down
47 changes: 46 additions & 1 deletion src/themes/borderless-dark-panelless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,52 @@ const Theme = {
"--sjs-special-blue-forecolor": "rgba(48, 48, 48, 1)",
"--sjs-special-yellow": "rgba(255, 152, 20, 1)",
"--sjs-special-yellow-light": "rgba(255, 152, 20, 0.1)",
"--sjs-special-yellow-forecolor": "rgba(48, 48, 48, 1)"
"--sjs-special-yellow-forecolor": "rgba(48, 48, 48, 1)",
"--sjs-article-font-xx-large-fontSize": "64px",
"--sjs-article-font-xx-large-textDecoration": "none",
"--sjs-article-font-xx-large-fontWeight": "700",
"--sjs-article-font-xx-large-fontStyle": "normal",
"--sjs-article-font-xx-large-fontStretch": "normal",
"--sjs-article-font-xx-large-letterSpacing": "0",
"--sjs-article-font-xx-large-lineHeight": "64px",
"--sjs-article-font-xx-large-paragraphIndent": "0px",
"--sjs-article-font-xx-large-textCase": "none",
"--sjs-article-font-x-large-fontSize": "48px",
"--sjs-article-font-x-large-textDecoration": "none",
"--sjs-article-font-x-large-fontWeight": "700",
"--sjs-article-font-x-large-fontStyle": "normal",
"--sjs-article-font-x-large-fontStretch": "normal",
"--sjs-article-font-x-large-letterSpacing": "0",
"--sjs-article-font-x-large-lineHeight": "56px",
"--sjs-article-font-x-large-paragraphIndent": "0px",
"--sjs-article-font-x-large-textCase": "none",
"--sjs-article-font-large-fontSize": "32px",
"--sjs-article-font-large-textDecoration": "none",
"--sjs-article-font-large-fontWeight": "700",
"--sjs-article-font-large-fontStyle": "normal",
"--sjs-article-font-large-fontStretch": "normal",
"--sjs-article-font-large-letterSpacing": "0",
"--sjs-article-font-large-lineHeight": "40px",
"--sjs-article-font-large-paragraphIndent": "0px",
"--sjs-article-font-large-textCase": "none",
"--sjs-article-font-medium-fontSize": "24px",
"--sjs-article-font-medium-textDecoration": "none",
"--sjs-article-font-medium-fontWeight": "700",
"--sjs-article-font-medium-fontStyle": "normal",
"--sjs-article-font-medium-fontStretch": "normal",
"--sjs-article-font-medium-letterSpacing": "0",
"--sjs-article-font-medium-lineHeight": "32px",
"--sjs-article-font-medium-paragraphIndent": "0px",
"--sjs-article-font-medium-textCase": "none",
"--sjs-article-font-default-fontSize": "16px",
"--sjs-article-font-default-textDecoration": "none",
"--sjs-article-font-default-fontWeight": "400",
"--sjs-article-font-default-fontStyle": "normal",
"--sjs-article-font-default-fontStretch": "normal",
"--sjs-article-font-default-letterSpacing": "0",
"--sjs-article-font-default-lineHeight": "28px",
"--sjs-article-font-default-paragraphIndent": "0px",
"--sjs-article-font-default-textCase": "none"
},
"isPanelless": true
};
Expand Down
47 changes: 46 additions & 1 deletion src/themes/borderless-dark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,52 @@ const Theme = {
"--sjs-special-blue-forecolor": "rgba(48, 48, 48, 1)",
"--sjs-special-yellow": "rgba(255, 152, 20, 1)",
"--sjs-special-yellow-light": "rgba(255, 152, 20, 0.1)",
"--sjs-special-yellow-forecolor": "rgba(48, 48, 48, 1)"
"--sjs-special-yellow-forecolor": "rgba(48, 48, 48, 1)",
"--sjs-article-font-xx-large-fontSize": "64px",
"--sjs-article-font-xx-large-textDecoration": "none",
"--sjs-article-font-xx-large-fontWeight": "700",
"--sjs-article-font-xx-large-fontStyle": "normal",
"--sjs-article-font-xx-large-fontStretch": "normal",
"--sjs-article-font-xx-large-letterSpacing": "0",
"--sjs-article-font-xx-large-lineHeight": "64px",
"--sjs-article-font-xx-large-paragraphIndent": "0px",
"--sjs-article-font-xx-large-textCase": "none",
"--sjs-article-font-x-large-fontSize": "48px",
"--sjs-article-font-x-large-textDecoration": "none",
"--sjs-article-font-x-large-fontWeight": "700",
"--sjs-article-font-x-large-fontStyle": "normal",
"--sjs-article-font-x-large-fontStretch": "normal",
"--sjs-article-font-x-large-letterSpacing": "0",
"--sjs-article-font-x-large-lineHeight": "56px",
"--sjs-article-font-x-large-paragraphIndent": "0px",
"--sjs-article-font-x-large-textCase": "none",
"--sjs-article-font-large-fontSize": "32px",
"--sjs-article-font-large-textDecoration": "none",
"--sjs-article-font-large-fontWeight": "700",
"--sjs-article-font-large-fontStyle": "normal",
"--sjs-article-font-large-fontStretch": "normal",
"--sjs-article-font-large-letterSpacing": "0",
"--sjs-article-font-large-lineHeight": "40px",
"--sjs-article-font-large-paragraphIndent": "0px",
"--sjs-article-font-large-textCase": "none",
"--sjs-article-font-medium-fontSize": "24px",
"--sjs-article-font-medium-textDecoration": "none",
"--sjs-article-font-medium-fontWeight": "700",
"--sjs-article-font-medium-fontStyle": "normal",
"--sjs-article-font-medium-fontStretch": "normal",
"--sjs-article-font-medium-letterSpacing": "0",
"--sjs-article-font-medium-lineHeight": "32px",
"--sjs-article-font-medium-paragraphIndent": "0px",
"--sjs-article-font-medium-textCase": "none",
"--sjs-article-font-default-fontSize": "16px",
"--sjs-article-font-default-textDecoration": "none",
"--sjs-article-font-default-fontWeight": "400",
"--sjs-article-font-default-fontStyle": "normal",
"--sjs-article-font-default-fontStretch": "normal",
"--sjs-article-font-default-letterSpacing": "0",
"--sjs-article-font-default-lineHeight": "28px",
"--sjs-article-font-default-paragraphIndent": "0px",
"--sjs-article-font-default-textCase": "none"
},
"isPanelless": false
};
Expand Down
Loading

0 comments on commit 1045344

Please sign in to comment.